[FF7] command line tools for LGP archives - LGP/UnLGP (v.5)

  • Thread starter Thread starter Aali
  • Start date Start date
Status
Not open for further replies.
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]
Code:
cd /d "c:\lgp\1""c:\lgp\unlgp.exe" "c:\lgp\1.lgp"
Windows PowerShell:
Code: [Select]
Code:
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 edited:
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]
Code:
cd /d "c:\lgp\1""c:\lgp\unlgp.exe" "c:\lgp\1.lgp"
Windows PowerShell:
Code: [Select]
Code:
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!
 
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.
 
I have encountered this warning when i tried to compile the Release 0.5b with mingw on win32 OS.

Code: [Select]
Code:
>make allgcc -Wall  lgp.c -o lgpgcc -Wall  unlgp.c -o unlgpunlgp.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]
Code:
int mkdir(const char *pathname, mode_t mode);

Just before the main function. So finally the result will be:
Code: [Select]
Code:
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 edited:
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.
 
any updates on creating a GUI for this utility?  I know it was discussed earlier but i haven't heard anything since.

lee
 
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.
 
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
 
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.
 
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.
 
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 edited:
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.
 
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
 
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.
 
Status
Not open for further replies.
Back
Top