Author Topic: [FF7] command line tools for LGP archives - LGP/UnLGP (v.5)  (Read 60567 times)

Shuffle

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #100 on: 2009-08-28 16:40:44 »
thanks

Fleet Command

  • Crazy poster
  • *
  • Posts: 135
  • Karma: 0
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #101 on: 2009-08-28 21:14:34 »
To extracts 1.lgp, which resides in "c:\lgp", into "c:\lgp\1\", you must have entered the following commands:

In Command Prompt:
Code: [Select]
cd /d "c:\lgp\1"
"c:\lgp\unlgp.exe" "c:\lgp\1.lgp"

Windows PowerShell:
Code: [Select]
set-location 'c:\lgp\1'
& 'c:\lgp\unlgp.exe' 'c:\lgp\1.lgp'


unlgp will extract the files into whatever folder unlgp is in
so put unlgp and the lgp into C:\lgp\1
I'm afraid that's wrong. (See above.) It is possible to have UnLGP.exe write files to a folder in which unlgp.exe does not exist. All you have to do is to specify the full path to UnLGP.exe. UnLGP.exe writes the contents into current folder.
« Last Edit: 2009-08-28 21:27:39 by Fleet Command »

Shuffle

  • Fast newbie
  • *
  • Posts: 28
  • Karma: 0
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #102 on: 2009-08-29 18:29:29 »
To extracts 1.lgp, which resides in "c:\lgp", into "c:\lgp\1\", you must have entered the following commands:

In Command Prompt:
Code: [Select]
cd /d "c:\lgp\1"
"c:\lgp\unlgp.exe" "c:\lgp\1.lgp"

Windows PowerShell:
Code: [Select]
set-location 'c:\lgp\1'
& 'c:\lgp\unlgp.exe' 'c:\lgp\1.lgp'


unlgp will extract the files into whatever folder unlgp is in
so put unlgp and the lgp into C:\lgp\1
I'm afraid that's wrong. (See above.) It is possible to have UnLGP.exe write files to a folder in which unlgp.exe does not exist. All you have to do is to specify the full path to UnLGP.exe. UnLGP.exe writes the contents into current folder.
Big thanks!

Kranmer

  • Freak
  • *
  • Posts: 767
  • Karma: 9
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #103 on: 2009-09-07 19:39:33 »
Hi guys. I have decided to put all the files needed to compile LGP/UNLGP into a archive so that people who dont even know anything about compiling source code can compile Aali's code with ease. I will still continue to build the binaries as they are updated anyway but i thought that it might be a good idea to put this up here anyway so other people build the code if they want to.

Ok first you can get all the files needed to compile the source code here (also its 138mb uncompressed but its 16MB compressed which took a while to do)
http://www.mediafire.com/?ziwdnzum4mn
This is all the files needed to compile LGP/UNLGP in a self extracting file so run it once and extract it
PLEASE NOTE YOU MUST EXTRACT TO A FOLDER WITHOUT SPACES. so for example C:\ would be fine but C:\Program Files\ is NOT fine because it has a space.
Also for the rest of this guide i will be using C:\ for an example but if you put it somwhere else thats fine.

Now Then you have extracted the compiler to C:\ so go to the "compiler" folder on your C drive and run MSYS once then close it. (we do this to create the folder needed for future steps)

Now you need the source code from page 1. This can be gotten many ways but the easyist is to go to
http://backup.ninjaloot.se:8000
then click on "BROWSE" then click on each file in turn and then right click on "RAW" and "SAVE TARGET AS" and save all 4 files the same way to your "C:\compiler\home\username\" folder
(also the above statement is using "Internet Exporer" and also the "username" part of the path is always different for everyone so just put there what the name of the folder in your MSYS folder)

Now Aali's source code is in C:\compiler\home\username\ you now need to open MAKEFILE with "Notepad" or any editor and look for the words
cc
replace both lots of cc with
gcc
then save the "MAKEFILE"

Now open "MSYS" in "C:\compiler" again and type
make

Now it will compile LGP/UNLGP binaries (EXE files) and your done.


Also you may get a WARNING in MSYS when making the binaries you can ignore this. It is a warning and not a error and doesnt appear to have any effect on the program.

And if this is to compilcated i will try to make it simpler but i presonally feel its very straight forward as is.

Vegeta_Ss4

  • Fast newbie
  • *
  • Posts: 42
  • Karma: 1
  • Dark Wizard of the Savegame
    • View Profile
    • Black Chocobo
lgp/unlgp - command line tools for LGP archives
« Reply #104 on: 2009-09-11 08:51:30 »
I have encountered this warning when i tried to compile the Release 0.5b with mingw on win32 OS.

Code: [Select]
>make all
gcc -Wall  lgp.c -o lgp
gcc -Wall  unlgp.c -o unlgp
unlgp.c: In function `main':
unlgp.c:163: warning: implicit declaration of function `mkdir'

I have fixed adding the following line in file unlgp.c in order to prevent that warning:

Code: [Select]
int mkdir(const char *pathname, mode_t mode);


Just before the main function. So finally the result will be:
Code: [Select]
int mkdir(const char *pathname, mode_t mode);

int main(int argc, char *argv[])

That's All. I hope you find useful this info.

Bye.
« Last Edit: 2009-09-12 14:54:10 by Vegeta_Ss4 »

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 115
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #105 on: 2009-09-11 09:13:57 »
You get an A for effort, but that is really not the way to solve that problem.
Find the correct header file and #include it, if it's compatible with other build environments I'll add it to the repo.

pyrozen

  • Freak
  • *
  • Posts: 793
  • Karma: 0
  • Team Avalanche Member
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #106 on: 2009-10-18 16:55:47 »
any updates on creating a GUI for this utility?  I know it was discussed earlier but i haven't heard anything since.

lee

arew264

  • Cool newbie
  • *
  • Posts: 94
  • Karma: 0
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #107 on: 2009-12-14 00:54:54 »
any updates on creating a GUI for this utility?  I know it was discussed earlier but i haven't heard anything since.

lee

If there's still interest, I could look into it after this week.

LeeHiOoO was working on one in VB, but that seems to have stalled.

Hellbringer616

  • No life
  • *
  • Posts: 1915
  • Karma: 12
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #108 on: 2009-12-21 11:35:31 »
So is there any improving this at all? I seem to have never run into any issues to speak of. Should we update this to v1.0 and call it good? :-D

sithlord48

  • No life
  • *
  • Posts: 1479
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
lgp/unlgp - command line tools for LGP archives
« Reply #109 on: 2010-02-27 20:13:50 »
kranmer, thanks for the ez compile set up . for windows. i plan to release an installer based on on the most recent source code that i have (0.5 i think) should be released soon provided aali's does not object to it.....

EDIT: installer for windows / linux can be found at the page below
http://dopplereffect.shacknet.nu/lgp_tools_multipack_by_sithlord48-1.0.zip

EDIT#2 updated link was broken
« Last Edit: 2012-06-15 17:44:50 by sithlord48 »

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3238
  • Karma: 112
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #110 on: 2010-05-17 16:20:28 »
I know I know

Now then,  Aali, I think there may be a problem with the program compiling the flevel.lgp.   I haven't tried it myself, but others have claimed it becomes corrupt when trying to edit a modified one.

LeeHiOoO

  • Crazy poster
  • *
  • Posts: 128
  • Karma: 0
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #111 on: 2010-05-26 03:09:40 »
Is source not available anymore? =/

Kranmer

  • Freak
  • *
  • Posts: 767
  • Karma: 9
    • View Profile
lgp/unlgp - command line tools for LGP archives
« Reply #112 on: 2010-05-26 08:19:45 »
Is source not available anymore? =/

Well Aali's website for the source has been down for awhile but if you want it i have still have the latest source (0.5) i have uploaded it here for you
http://www.mediafire.com/?zhoeiydtwtq

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 115
    • View Profile
Re: lgp/unlgp - command line tools for LGP archives
« Reply #113 on: 2010-06-11 00:19:11 »
Hmm, the source was not supposed to be down.. The mercurial repository is no longer necessary though so I will probably just provide a .zip archive.

sithlord48

  • No life
  • *
  • Posts: 1479
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
« Last Edit: 2012-06-15 17:45:14 by sithlord48 »

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #115 on: 2011-04-11 10:57:26 »
I wrote a GUI frontend for this tool, but unlgp.exe needs to be updated to take this format.

unlgp.exe SourceLGP DestinationFolder

That way it will work properly with my frontend, and allow the user to select a destination folder for the extracted files. (As it is, it just dumps them in the same folder as my tool.)

(The GUI is written in C#, and will require the .Net Framework  v3.5, which most ppl already have.. I will also include the source code, and give permission for anyone to maintain the GUI if I'm not around to do so.)

I won't include the original tools, unless given permission, as it stands, my GUI is a standalone app, and requires you to download and install lgp.exe\unlgp.exe to the same directory as it's .exe file. (But with permission, I could pack them either in the same archive, or even inside the .exe itself, to help keep things more tidy, but, that would make updating the tools themselves a bit more work, because they would need repacked into the GUI tool, etc,.)
« Last Edit: 2011-04-11 15:22:18 by Wutai Clan »

Aali

  • No life
  • *
  • Posts: 1197
  • Karma: 115
    • View Profile
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #116 on: 2011-04-11 12:18:03 »
Surely you could just set the working directory before executing unlgp? :)

Its not that its difficult for me to make that change but it would take a while before I get around to it.

Wutai Clan

  • Crazy poster
  • *
  • Posts: 115
  • Karma: 0
    • View Profile
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #117 on: 2011-04-11 12:48:09 »
Nvm.
« Last Edit: 2011-04-12 11:57:17 by Wutai Clan »

nomad805

  • Fast newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #118 on: 2012-02-21 21:35:36 »
can someone please tell me how to use this imma noob lol i tried using the aalis lgp with the gui front end but it duznt unpack everything i notice...like my battle lgp is over a gigabyte but when i unpack it its less than 100 mb idk what im doing wrong lol

Bosola

  • Fire hazard!
  • No life
  • *
  • Posts: 1753
  • Karma: 15
    • View Profile
    • My YouTube Channel
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #119 on: 2012-02-21 21:58:24 »
can someone please tell me how to use this imma noob lol i tried using the aalis lgp with the gui front end but it duznt unpack everything i notice...like my battle lgp is over a gigabyte but when i unpack it its less than 100 mb idk what im doing wrong lol

Firstly, this thread pertains to the old version of LGP/unLGP - the thread for the new tools is this one, though you've already posted in it.

Secondly, don't cross-post the same question to multiple threads.

LeonhartGR

  • No life
  • *
  • Posts: 2376
  • Karma: 31
  • ~Whatever...~ Finally married to my "Rinoa"!
    • View Profile
    • LeonhartGR Productions
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #120 on: 2012-02-21 21:59:51 »
Firstly, this thread pertains to the old version of LGP/unLGP - the thread for the new tools is this one, though you've already posted in it.

Secondly, don't cross-post the same question to multiple threads.

Ahhh... link doesn't work :)

UGerstl

  • Insane poster
  • *
  • Posts: 380
  • Karma: 5
  • Analyst and Backup-Manager
    • View Profile

LeonhartGR

  • No life
  • *
  • Posts: 2376
  • Karma: 31
  • ~Whatever...~ Finally married to my "Rinoa"!
    • View Profile
    • LeonhartGR Productions
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #122 on: 2012-02-21 22:33:29 »
This link should work: http://forums.qhimm.com/index.php?topic=12831

Oh! I dl this already. Can't get it to work in windows 7 i need to open cmd probably, that's why I was using lgp tools until i got a corrupted magic.lgp

UGerstl

  • Insane poster
  • *
  • Posts: 380
  • Karma: 5
  • Analyst and Backup-Manager
    • View Profile
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #123 on: 2012-02-21 23:04:14 »
The lgp tools (with GUI) are well known for corrupting files.

DLPB

  • No life
  • *
  • Posts: 9256
  • Karma: 301
  • For I realized that God's a young man, too.
    • View Profile
Re: LGP/UnLGP - command line tools for LGP archives [v.5]
« Reply #124 on: 2012-02-24 07:36:11 »
can someone please tell me how to use this imma noob lol i tried using the aalis lgp with the gui front end but it duznt unpack everything i notice...like my battle lgp is over a gigabyte but when i unpack it its less than 100 mb idk what im doing wrong lol

Yeah, it is called google.  Yes it really can help you, it did me years ago too.  Help is good for people who have exhausted other lines of inquiry, not those who just can't be arsed trying.  Look up "command line programs" and then use the program on this thread.

Luksy's command line program which is modified from this one (with a few fixes) is also good start.
« Last Edit: 2012-02-24 07:42:07 by DLPB »