Qhimm.com Forums

Final Fantasy 7 => FF7 Tools => Topic started by: luksy on 2012-02-17 12:50:52

Title: [PC] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: luksy on 2012-02-17 12:50:52
I rewrote aalis lgp tools to support repacking, useful for mods etc. so all files don't need to be dumped to disk just to overwrite a few.

The main archive contains the source, feel free to use the lgp interface in any projects.

ulgp v1.2 (https://www.dropbox.com/s/o770wtunby0k89y/ulgp_v1.2.7z?dl=0)
ulgp v1.2.1 (https://www.dropbox.com/s/ujbsxgiufstrs1p/ulgp_v1.2.1.7z?dl=0) (forces lowercase files internally)
ulgp v1.3.2 (https://www.dropbox.com/s/osyipq9pccnwb7b/ulgp_v1.3.2.7z?dl=0) (no memory mapping, use if you get memory errors)

App tl;dr:

Extract magic.lgp to a folder named "magic"
ulgp -x magic.lgp

Create magic.lgp from a folder named "magic"
ulgp -c magic.lgp

Overwrite files in magic.lgp from those in a folder named "magic"
ulgp -r magic.lgp

GUI should be self-explanatory, the two versions are to match the xp and vista/7/8 visual styles

Run install.bat to associate .lgp files with ulgp, once installed simply double click on an .lgp file to extract to the default folder. Hold shift and right click on any folder to create / add to an .lgp file using the files inside.

Read the readme for advanced usage!, e.g. if you need to distribute mods etc.

Major thanks to Aali for the original lgp code.
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: Garrickus on 2012-02-17 20:22:59
First of all, did you get aali's permission to mess around with his stuff? Not sure if he cares but you should always ask.

Secondly, this may be pretty useful, cheers.

Thirdly, I scanned them for anyone who cares:

Code: [Select]
Malwarebytes' Anti-Malware 1.46
www.malwarebytes.org

Database version: 4406

Windows 6.1.7600
Internet Explorer 8.0.7600.16385

17/02/2012 21:19:11
mbam-log-2012-02-17 (21-19-11).txt

Scan type: Quick scan
Objects scanned: 1
Time elapsed: 31 second(s)

Memory Processes Infected: 0
Memory Modules Infected: 0
Registry Keys Infected: 0
Registry Values Infected: 0
Registry Data Items Infected: 0
Folders Infected: 0
Files Infected: 0

Memory Processes Infected:
(No malicious items detected)

Memory Modules Infected:
(No malicious items detected)

Registry Keys Infected:
(No malicious items detected)

Registry Values Infected:
(No malicious items detected)

Registry Data Items Infected:
(No malicious items detected)

Folders Infected:
(No malicious items detected)

Files Infected:
(No malicious items detected)

Code: [Select]

Avira AntiVir Personal
Report file date: 17 February 2012  21:21

Scanning for 3466019 virus strains and unwanted programs.

The program is running as an unrestricted full version.
Online services are available:

Licensee        : Avira AntiVir Personal - Free Antivirus
Serial number   : 0000149996-ADJIE-0000001
Platform        : Windows 7 x64
Windows version : (plain)  [6.1.7600]
Boot mode       : Normally booted
Username        : Ryan
Computer name   : RYAN-VAIO

Version information:
BUILD.DAT       : 10.2.0.707     36070 Bytes  25/01/2012 13:11:00
AVSCAN.EXE      : 10.3.0.7      484008 Bytes  03/07/2011 11:53:33
AVSCAN.DLL      : 10.0.5.0       47464 Bytes  03/07/2011 11:53:33
LUKE.DLL        : 10.3.0.5       45416 Bytes  03/07/2011 11:53:34
LUKERES.DLL     : 10.0.0.1       12648 Bytes  10/02/2010 23:40:49
AVSCPLR.DLL     : 10.3.0.7      119656 Bytes  03/07/2011 11:53:34
AVREG.DLL       : 10.3.0.9       88833 Bytes  13/07/2011 04:35:09
VBASE000.VDF    : 7.10.0.0    19875328 Bytes  06/11/2009 09:05:36
VBASE001.VDF    : 7.11.0.0    13342208 Bytes  14/12/2010 00:29:09
VBASE002.VDF    : 7.11.19.170 14374912 Bytes  20/12/2011 06:03:08
VBASE003.VDF    : 7.11.21.238  4472832 Bytes  01/02/2012 08:29:51
VBASE004.VDF    : 7.11.21.239     2048 Bytes  01/02/2012 08:29:51
VBASE005.VDF    : 7.11.21.240     2048 Bytes  01/02/2012 08:29:51
VBASE006.VDF    : 7.11.21.241     2048 Bytes  01/02/2012 08:29:52
VBASE007.VDF    : 7.11.21.242     2048 Bytes  01/02/2012 08:29:52
VBASE008.VDF    : 7.11.21.243     2048 Bytes  01/02/2012 08:29:52
VBASE009.VDF    : 7.11.21.244     2048 Bytes  01/02/2012 08:29:54
VBASE010.VDF    : 7.11.21.245     2048 Bytes  01/02/2012 08:29:54
VBASE011.VDF    : 7.11.21.246     2048 Bytes  01/02/2012 08:29:54
VBASE012.VDF    : 7.11.21.247     2048 Bytes  01/02/2012 08:29:54
VBASE013.VDF    : 7.11.22.33   1486848 Bytes  03/02/2012 08:17:25
VBASE014.VDF    : 7.11.22.56    687616 Bytes  03/02/2012 08:18:38
VBASE015.VDF    : 7.11.22.92    178176 Bytes  06/02/2012 08:13:56
VBASE016.VDF    : 7.11.22.154   144896 Bytes  08/02/2012 08:18:23
VBASE017.VDF    : 7.11.22.220   183296 Bytes  13/02/2012 08:18:55
VBASE018.VDF    : 7.11.23.34    202752 Bytes  15/02/2012 08:13:51
VBASE019.VDF    : 7.11.23.35      2048 Bytes  15/02/2012 08:13:51
VBASE020.VDF    : 7.11.23.36      2048 Bytes  15/02/2012 08:13:51
VBASE021.VDF    : 7.11.23.37      2048 Bytes  15/02/2012 08:13:51
VBASE022.VDF    : 7.11.23.38      2048 Bytes  15/02/2012 08:13:51
VBASE023.VDF    : 7.11.23.39      2048 Bytes  15/02/2012 08:13:51
VBASE024.VDF    : 7.11.23.40      2048 Bytes  15/02/2012 08:13:51
VBASE025.VDF    : 7.11.23.41      2048 Bytes  15/02/2012 08:13:51
VBASE026.VDF    : 7.11.23.42      2048 Bytes  15/02/2012 08:13:51
VBASE027.VDF    : 7.11.23.43      2048 Bytes  15/02/2012 08:13:52
VBASE028.VDF    : 7.11.23.44      2048 Bytes  15/02/2012 08:13:52
VBASE029.VDF    : 7.11.23.45      2048 Bytes  15/02/2012 08:13:52
VBASE030.VDF    : 7.11.23.46      2048 Bytes  15/02/2012 08:13:52
VBASE031.VDF    : 7.11.23.64     27136 Bytes  16/02/2012 08:13:52
Engineversion   : 8.2.10.2 
AEVDF.DLL       : 8.1.2.2       106868 Bytes  25/10/2011 14:10:59
AESCRIPT.DLL    : 8.1.4.5       442745 Bytes  13/02/2012 08:19:51
AESCN.DLL       : 8.1.8.2       131444 Bytes  27/01/2012 08:20:22
AESBX.DLL       : 8.2.4.5       434549 Bytes  01/12/2011 18:53:58
AERDL.DLL       : 8.1.9.15      639348 Bytes  11/09/2011 00:44:22
AEPACK.DLL      : 8.2.16.3      799094 Bytes  13/02/2012 08:19:45
AEOFFICE.DLL    : 8.1.2.25      201084 Bytes  01/01/2012 15:08:14
AEHEUR.DLL      : 8.1.3.27     4391285 Bytes  13/02/2012 08:19:33
AEHELP.DLL      : 8.1.19.0      254327 Bytes  20/01/2012 08:33:34
AEGEN.DLL       : 8.1.5.21      409971 Bytes  03/02/2012 08:30:54
AEEXP.DLL       : 8.1.0.20       70004 Bytes  14/02/2012 08:20:48
AEEMU.DLL       : 8.1.3.0       393589 Bytes  23/11/2010 00:26:52
AECORE.DLL      : 8.1.25.4      201079 Bytes  14/02/2012 08:20:42
AEBB.DLL        : 8.1.1.0        53618 Bytes  08/08/2010 11:18:01
AVWINLL.DLL     : 10.0.0.0       19304 Bytes  14/01/2010 12:03:38
AVPREF.DLL      : 10.0.3.2       44904 Bytes  03/07/2011 11:53:33
AVREP.DLL       : 10.0.0.10     174120 Bytes  17/05/2011 21:03:36
AVARKT.DLL      : 10.0.26.1     255336 Bytes  03/07/2011 11:53:33
AVEVTLOG.DLL    : 10.0.0.9      203112 Bytes  03/07/2011 11:53:33
SQLITE3.DLL     : 3.6.19.0      355688 Bytes  28/01/2010 12:57:58
AVSMTP.DLL      : 10.0.0.17      63848 Bytes  16/03/2010 15:38:56
NETNT.DLL       : 10.0.0.0       11624 Bytes  19/02/2010 14:41:00
RCIMAGE.DLL     : 10.0.0.35    2589544 Bytes  03/07/2011 11:53:32
RCTEXT.DLL      : 10.0.64.0      97640 Bytes  03/07/2011 11:53:32

Configuration settings for the scan:
Jobname.............................: ShlExt
Configuration file..................: C:\Users\Ryan\AppData\Local\Temp\1832cb41.avp
Logging.............................: Default
Primary action......................: interactive
Secondary action....................: ignore
Scan master boot sector.............: on
Scan boot sector....................: on
Boot sectors........................: C:,
Process scan........................: off
Scan registry.......................: off
Search for rootkits.................: off
Integrity checking of system files..: off
Scan all files......................: Intelligent file selection
Scan archives.......................: on
Recursion depth.....................: 20
Smart extensions....................: on
Macro heuristic.....................: on
File heuristic......................: Advanced

Start of the scan: 17 February 2012  21:21

Starting the file scan:

Begin scan in 'C:\Users\Ryan\Tools\ulgp_v0.1\ulgp.exe'


End of the scan: 17 February 2012  21:21
Used time: 00:00 Minute(s)

The scan has been done completely.

      0 Scanned directories
      1 Files were scanned
      0 Viruses and/or unwanted programs were found
      0 Files were classified as suspicious
      0 files were deleted
      0 Viruses and unwanted programs were repaired
      0 Files were moved to quarantine
      0 Files were renamed
      0 Files cannot be scanned
      1 Files not concerned
      0 Archives were scanned
      0 Warnings
      0 Notes

Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: Kranmer on 2012-02-17 20:49:59
Nice work luksy, this will be very usefull and will save a lot of time, thanks.

also Seizmik, Aali gave his permission to use his source code a long time ago here
http://forums.qhimm.com/index.php?topic=8641.msg109896#msg109896
and here
http://forums.qhimm.com/index.php?topic=8641.msg110268#msg110268
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: DLPB_ on 2012-02-17 21:42:29
@Seizmik of course he did, and he has worked on projects here before, there's no need to go hysterical thinking a virus might lurk there...

and if he had created a virus, you do realise it would not show up on any virus scanner?
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: Aali on 2012-02-17 22:26:15
I haven't tried the program in question so I can't say anything about its quality but seeing as luksy is the author it should be pretty good :)

This is exactly the kind of re-use I intended for my code.
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: DLPB_ on 2012-02-17 23:09:23
It has done exactly what I wanted it to do as well... cut down on decoding the whole files.  Less space needed now and faster :)  Plus both decode encode in 1 executable and use of folder inputs outputs.
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: Garrickus on 2012-02-18 02:26:48
Well I didn't mean to sound like a tosser, but I see your point. As soon as I posted that I went and found some other tools and stuff that lurky had done, alas I had no idea.

Also, just an idea, is it already possible to extract a particular file if you know it's name via come command?

Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-02-18 03:58:21
Not at the moment, I'll add that for the next version.
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: sl1982 on 2012-02-20 17:53:02
Nice work! This will make automated installers much quicker. No need to extract the whole damn lgp and repack it.
Title: Re: [0.2] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-02-21 13:22:15
0.2 is up, added support for extracting / inserting individual files, hopefully that should be just about it, bugs aside.
Title: Re: [0.2] ulgp - lgp inserter / extractor / repacker
Post by: nomad805 on 2012-02-21 21:34:15
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
Title: Re: [0.2] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-02-22 00:16:56
Sounds like whatever you used to edit battle.lgp in the past was simply appending files on the end and updating the toc, assuming the file still works in game you can dump the files and repack, the ~900 Mb of extra data will be old files you don't need.
Title: Re: [0.2] ulgp - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-02-22 00:45:52
When I double click the program it opens cmd and closes really quick. Is it because I'm using windows 7?
Title: Re: [0.2] ulgp - lgp inserter / extractor / repacker
Post by: UGerstl on 2012-02-22 00:49:33
@Leonhart7413: You must start CMD.exe before you run it. (Hint: Windows-Key + R)
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-02-22 02:32:04
Stupid hash table bug in 0.2, don't use it, fixed in 0.3
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-02-22 11:25:53
Stupid hash table bug in 0.2, don't use it, fixed in 0.3
Opened cmd and run... still does it :(
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-02-22 12:35:40
The bug was unrelated to whatever problem you are having, try this:

create a directory somwhere, copy in an lgp file and ulgp.exe.

Make sure neither is selected, hold shift, right click -> "open command window here".

Type:

ulgp d whatever.lgp somefolder

and press enter. If you still can't get it to run I have no idea what your issue is.
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: DLPB_ on 2012-02-22 12:39:33
You need to understand how Command Line programs work leonhart.
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-02-22 12:54:19
You need to understand how Command Line programs work leonhart.

Sorry I've done it before but I forgot... I thought this was more automated... I'll try again thanks :)
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: sl1982 on 2012-02-26 12:41:31
Luksy do I have permission to use your program for a release?
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: DLPB_ on 2012-02-26 12:45:09
I am pretty sure that the program was made to benefit the modding community.
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-02-26 12:49:40
Sure thing sl, free use was implied with the caveats - I'm not responsible if it causes your release to launch a nuclear arsenal  ;D
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-04-11 04:03:42
I'm trying to use this tool but I've encountered a problem.
When I attempt to update an LGP, files with capitalized names are ignored.
Lowercase files are inserted into the LGP, but uppercase files are not.

It works if I'm creating a new LGP file.  Then all the file names are converted to lowercase inside the LGP.
If the file already exists inside the LGP, then the new file with a capitalized name is ignored and not added.

Thanks for this tool.
I really want to use it, so I'll manage a workaround somehow.
Title: Re: [0.3] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-04-11 04:12:01
Cheers PitBrat, I'll look into it, I actually have a better version ready but I'll double check that filenames are case-insensitive.
Title: Re: [0.4] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-04-11 23:07:32
0.4 should fix the case issue, overwriting should be a bit faster, and it's also localized (please check the translations for me http://dl.dropbox.com/u/3227870/msg.mc, and feel free to send other languages). I'm not including the dll's in the exe any longer for now, that may change back again depending on feedback.
Title: Re: [0.4] ulgp - lgp inserter / extractor / repacker
Post by: DLPB_ on 2012-04-11 23:49:12
that may change back again depending on feedback.

I urge everyone to join me in opposing Luksy in his separate dll's disaster   :P

The ulgp exe was only around 165KB with both dll's when compressed with upx.  Now, both dll's separately take up over 1 MB and have to be placed either in program folder or system32.  For the amount that these separate dll's "save" (around 100 KB per app?), I would much rather have the dll's integrated into the exe.  In my opinion it makes things more complicated, especially for modders, and somewhere down the line people are going to be moaning that the app isn't working.

I have made the case against my own translator!
What say all of you?  :o
Title: Re: [0.4.1] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-04-12 00:46:08
 :-P

0.4.1 has some language & syntax fixes in the message table courtesy of UGerstl
Title: Re: [0.4.2] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-04-13 05:26:23
0.4.2 fixes a tiny issue that could cause a crash, there are now two binaries so people who already have the dlls can use the smaller of the two.
Title: Re: [0.4.2] ulgp - lgp inserter / extractor / repacker
Post by: Dark_Ansem on 2012-04-13 06:28:39
thank you :D
Title: Re: [0.4.2] ulgp - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-04-13 22:24:19
Awesome improvements!  This tool takes 4 minutes off the install time for Bootleg.
Thank you.
Title: Re: [0.4.3] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-04-15 00:22:53
Tidied some other stuff up, hopefully this should be final.
Title: Re: [0.4.3] ulgp - lgp inserter / extractor / repacker
Post by: bladearrowney on 2012-05-10 05:32:40
This tool is giving me fits, hoping you can help me out. I can get it to run, but when I point it at a lgp file, say char.lgp in field, I get one of the following

If in a location that contains spaces, the result is that it just tells me the correct usage. a location such as W:\The Dump\field\ will throw that, along with "W:\The Dump\field". Doesn't seem to like spaces or quotes

Second, if I put it in a more friendly location, such as C:\field, I get different results depending on how I launch the command prompt. If launched normally, I tend to get something like
Dumping C:\field\...
Access is denied.
If I launch as administrator, I get
Dumping C:\field...
The system cannot find the file specified

I have made sure that these locations have full access permissions for user group "Everyone" so there should be no access issue. I have 6 hard drives (#7 died a couple days ago with 250GB of media on it D: ) and I've tried moving the folder with the lgp around to see what would happen. Always the same result.

Am I doing it wrong? I'm executing the program from command prompt using ulgp.exe d c:\field char.lgp
Title: Re: [0.4.3] ulgp - lgp inserter / extractor / repacker
Post by: luksy on 2012-05-10 06:09:10
Sadly I was a little naive with the paths in that I don't try and resolve them at all, that explains the issue with spaces, I'll fix it so quoted paths will work.

Your second issue is because you have the flevel and folder arguments swapped, try "ulgp.exe d char.lgp c:\field"
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-05-15 04:31:54
0.5 - Wildcards should work again for .lgp paths when encoding, and a GUI for those who can't / won't use the command line.
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-05-15 14:02:50
0.5 - Wildcards should work again for .lgp paths when encoding, and a GUI for those who can't / won't use the command line.

Thank you!
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: dkma841 on 2012-05-15 16:57:16
Was waiting for a GUI for this thanks alot Lusky ;) main tool we needed from the start, now will make life much more easier :)
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-06-28 23:19:53
Help.
When I use the .5 command line version of this tool (with and without included libs) it fails with the error "The file exists."
When I use the exact same command line with the .4.3 version of the tool, it works.
What's up? Is this a user error on my part?
Here's the command line:
    ulgp e char.lgp vchar

It always fails with .5 but works with .4.3.
I really need to use .5 because there are spaces in some of the paths I'm encoding.

EDIT:
I also tested the GUI version of .5 and it works, but it won't accept command line input.
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-06-28 23:27:58
I'll have a look ASAP, should be able to in a couple of hours.

Ok this should fix it, I buggered up the windows file open method

http://dl.dropbox.com/u/3227870/ulgp_v0.6.7z
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-07-12 22:01:46
The gui version is so helpful! Thank you!
Title: ulgp insufficient space to process this command
Post by: kakumeishisou on 2012-07-17 19:07:31

hello everyone and sorry in advance for my English.
 I use ulgp recently and I have a concern with the recompiled file in the battle.lgp.
 641mo from the battle. lgp can accommodate more data comes mainly from ca enfaite ulgp that tells me is message format failed or insufficient space to process this command.
 workaround for this problem.
 thank you in advance.




Title: Re: ulgp insufficient space to process this command
Post by: luksy on 2012-07-17 23:39:14
hello everyone and sorry in advance for my English.
 I use ulgp recently and I have a concern with the recompiled file in the battle.lgp.
 641mo from the battle. lgp can accommodate more data comes mainly from ca enfaite ulgp that tells me is message format failed or insufficient space to process this command.
 workaround for this problem.
 thank you in advance.

If you're going to use google translate you might as well just write directly in French, I'll understand better. Are you using the GUI?
Title: Re: ulgp insufficient space to process this command
Post by: norikoteiko on 2012-07-18 21:42:58
he is using the ulgp gui i got the same  issu with this gui
alis lgp is the better option with the LGP Frontend gui
Title: Re: ulgp insufficient space to process this command
Post by: kakumeishisou on 2012-07-18 21:56:14
Bonjour à tous et désolé d'avance pour mon anglais.J'utilise ulgp récemment et j'ai un problème pour recompiler dans le battle.lgp
a partir de 641 mo ou un peu plus ca dépend .
ulgp m'indique "espace insuffisant pour traiter cette commande"et donc comment contourner cette limite du battle.
thank
yes i use gui.
Title: Re: [0.5] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-07-19 01:35:05
I have no idea how your battle.lgp came to be 640 megs, even with all the models installed it should come to about ~180, the problem is you are running out of memory. I will try and fix this issue anyway, in the meantime start with a fresh battle.lgp from the CD.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-07-21 08:25:17
The new version shouldn't give the out of memory errors in case you have enormous lgp files for whatever reason:

ulgp v0.7 (http://dl.dropbox.com/u/3227870/ulgp_v0.7.7z)

ulgpGUI v0.7 (http://dl.dropbox.com/u/3227870/ulgpGUI_v0.7.7z)



Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-07-21 17:30:56
Thank you Luksy... I still need to install the Joker cards by Grimmy and new RedXII battle model so I'll test it there when I do :) .

~edit~Luksy take care with 0.7 gui. I was trying to re-encode my battle lgp and place the new models and change some back and now sometimes battle freezes with "something very bad happened" error. I realized it was ulgp 0.7 when I tried to replace some field models and they wouldn't change in my char.lgp and then tried with 0.5 gui and worked great for char.lgp. now I need to re-encode my battle.lgp older backup again I guess and test it.

Thanks you Luksy for this awesome release but look into 0.7 please.

~edit~ Now I'm trying to install the "Grimmy's Diamond Weapon" world model in world_us.lgp with 0.5 gui and gives me an error that says "the volume for the file has been externally altered..."
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-08-14 22:11:05
I'm getting the error "The volume for a file has been externally altered so that the opened file is no longer valid." too.
It works on some systems but not on others.
I use the command line version .6 and .7 and both give the same errors.
Sometimes .7 will run without a reported error, but it doesn't update the .lgp archive if the file already exists inside the archive.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: omega res novae on 2012-08-14 22:18:42
i got that error when doing cait siths weapons with ulgpgui 0.5 and no error report with ulgpgui 0.7

a thing i dont like is when encoding the battle.lgp if i pick a spot where the battle lgp is already at it wont overwrite it or notify me of an error again using ulgpgui0.5/0.7
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-08-14 22:32:45
I've tested ulgp 0.7 with a few other .lgp archives.
Battle.lgp seems to cause the problem.
Ulgp 0.7 will update existing files in .lgp archives other that battle.lgp.
It usually fails to update existing files in battle.lgp.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-08-14 22:34:46
I have a fixed version ready, I just need to find the time to release it, sorry been ultra busy these days!
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: omega res novae on 2012-08-14 22:50:32
@pitbrat battle.lgp is the only one ive messed with so far. But its nice to know im not crazy

@luksy thats great! does this do something similar to 7zip and if it does, is it possible to integrate this with 7zip because its open source?
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-08-15 04:46:08
Here's one for testing

http://dl.dropbox.com/u/3227870/ulgp.7z

It works with both command line and GUI, I'd be grateful if people test it as I don't have the time at the moment.

@squall8cloud7
This is far more simple than 7zip, it only supports lgp files.

I suppose it'd be possible to fork 7zip and add the lgp code, but I don't have the time and patience. 7zip doesn't have any extensibility features that I know of, which is a shame because I looked into it some time ago.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: omega res novae on 2012-08-15 04:54:10
updated battle lgp on first try. hopefully this cotinues to work this well. great job luksy
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: Antonia on 2012-08-15 04:55:49
Here's one for testing

Thanks Luksy. 

I'm gonna be sleeping soon, but have plans to be using this a lot over the next few days, and I know PitBrat said he was needing this for his Bootleg 040 release, so that should definitely get it some good testing too.  :)

ETA: I was doing some tinkering and testing, and dropped this version over the one bundled with Bootleg 0039 (prior to it being used by the program).

It seemed to dump everything ok, but it hard crashes when trying to encode char.lgp

I know there are like 3 files in there that gave the last version some errors about being externally modified and no longer valid or something, but beyond that, it's hard for me to offer much, since none of these are my projects or work, so I can't really be sure what's happening.

Doubt it's much use, but the "more info" box from windows when I tried to manually use the GUI version on the same encode operation:

Code: [Select]
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: ulgp.exe
  Application Version: 0.0.0.8
  Application Timestamp: 502b272d
  Fault Module Name: ulgp.exe
  Fault Module Version: 0.0.0.8
  Fault Module Timestamp: 502b272d
  Exception Code: c0000005
  Exception Offset: 00005540
  OS Version: 6.0.6002.2.2.0.768.3
  Locale ID: 1033
  Additional Information 1: fd00
  Additional Information 2: ea6f5fe8924aaa756324d57f87834160
  Additional Information 3: fd00
  Additional Information 4: ea6f5fe8924aaa756324d57f87834160

Read our privacy statement:
  http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
 

The most specific I can be is that I think it's trying to encode to:
C:\Temp\Bootleg\Bootleg_Setup\Data_Working\field\char.lgp
Taking (all?) files from:
C:\Temp\Bootleg\Bootleg_Setup\char_lgp.patch

Would need PitBrat's input to be more specific and/or accurate.  I'll update if I discover anything else that may be helpful.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: xenokain on 2012-08-18 03:54:04
I used this tool and it works great on  battle.lgp but i have the same error when it comes to repacking char.lgp.It just locks up.I'm on win7 ultimate 64 bit if that helps.

Another thing i noticed.Im trying to use squeeble 's tutorial on model conversion.I'm supposed to extract certain files which belong to the adamantoise model from gqaa-gqda.With LGP tools after extracting battle.lgp from gqaa-gqda it lists 22 files but with ulgp it lists 29 files.Which is the correct one and why is there a difference in how much was extracted?I thought ulgp was just gui on top of lgptools.squeeble's topic is long dead so i cant post there.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-08-18 22:24:55
I noticed a couple other things.
The R switch no longer works from the command line.
It just pulls up the GUI interface.
Also, when using D to extract files, if a file doesn't exist in the .LGP archive, ULGP halts with the message 'File not found. Press any key to continue . . .'
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: Sebuzzie on 2012-08-19 00:15:15
The download links aren't working for me. Is anyone else experiencing this?
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2012-08-19 08:27:16
I've probably complicated things too much by trying to integrate the GUI and console apps, I'll hack away at it again this evening into something hopefully bug-free, sorry for the mess!

To answer a couple of things: I removed r because I didn't think anyone used it, is it necessary pitbrat? Also this isn't just an lgptools wrapper, think of it as lgptools with more functionality, well if it were bugless of course...
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-08-19 16:02:33
No, the R switch really isn't necessary.
I only used it to fix magic.lgp because the Avalanche installer damages magic.lgp.
Avalanche buggers up the sky_b.tex file.
I already implemented a redundant, manual fix.

Your ulgp tool is immensely useful.
Thanks for your continued support.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: Mendelevium on 2012-08-19 18:44:31
Your GUI simplified matters some; not that I am inept at using a command line, but hey I am a lazy modder ;).
This tool works nicely for me, so thank you for making it! :3.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: xenokain on 2012-08-19 22:06:06
Nevermind i tried xp and ulgp extracts 29 files and so does lgptools so the correct number is 29.using win7 lgptools only extracted 22 files while ulgp extracted 29 so it was lgptools that gave less files on win7.ulgp is working fine.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2012-09-08 02:20:12
Just to help...when using 0.5 gui to recompile world_us.lgp an error occurred:
The volume for a file has been externally altered so that the opened file is no longer valid.

I'm not sure if I've done something wrong but I succeeded in recompiling with Aali's using the command line.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: PitBrat on 2012-09-09 20:32:47
I still receive errors when trying to UPDATE archives even with the 0.8 version of ULGP.
ULGP won't update certain files and crashes with others.

I have better luck by creating an entirely new .lgp archive.
  Extract all of the files from the .lgp archive into a temporary folder.
  Copy the new files over the old files in the temporary folder.
  Use ULGP to compile the files from the temporary folder into a new .lgp archive.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: DLPB_ on 2012-09-09 20:48:57
Last I heard Luksy was going back to doing things the way he used to  8-)
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: Grondoval on 2012-12-24 20:17:14
I have a problem with encoding:

i dumped battle.lgp, i inserted last bombing mission projects battle models there and when i try to encode i get a error that says:

"El volumen para un archivo ha sido alterado externamente, por lo que el archivo abierto ya no es valido."

I´m using ulgpGUI_v0.7
Title: Re: ulgp - lgp inserter / extractor / repacker
Post by: aladore384 on 2012-12-25 03:36:21
Well I didn't mean to sound like a tosser, but I see your point. As soon as I posted that I went and found some other tools and stuff that lurky had done, alas I had no idea.

I don't mean to insist, but it's not about luksy being famous. IMO what you did is a very anti-open source behaviour. If Aali didn't want his project and his code to be used freely (as in used by the commoners like me, but also modified and/or improved) he wouldn't give all the technical information (the source code). This has been later proved by Aali himself stating "This is exactly the kind of re-use I intended for my code.".

Your reaction would have been legimitate if luksy took all the credits for himself, but he didn't. Far from that, his very first words explicitly give (some/major, your call) credits to Aali. Indeed, the first two words of the original post are : "I rewrote" as in it's based on someone else's work and the third ("aalis") gives you the original author's name.

I didn't have a chance to get to know Aali or luksy, but they seem both highly respectable gentlemen to my eyes : the former for creating an awesome tool plus giving the code, the latter for improving the code plus giving the credit where it is due and both of them for doing all of this for free on their free time (am I overusing the word "free" ?). This is exactly what the open source philosophy is to me.

As for the virus scan, it just isn't your job. Generally speaking, on boards it isn't the duty of the users to do so but of the administrators/moderators. But I won't blame you for being cautious and trying to be helpful.

It seems like you were well-intended and you just overdid things. I hope my post doesn't sound like pure lecturing, I just wanted to give my opinion on that (which can be a valid definition of lecturing, but you know what I mean).
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: dkma841 on 2012-12-25 12:37:35
I have a problem with encoding:

i dumped battle.lgp, i inserted last bombing mission projects battle models there and when i try to encode i get a error that says:

"El volumen para un archivo ha sido alterado externamente, por lo que el archivo abierto ya no es valido."

I´m using ulgpGUI_v0.7
Try downloading the GUI version instead and if you still get problems just simply get Aalis LGP/ULGP tool and if you want GUI for that if your not used to command line you can download a GuI for that called Lgp Frontend make a folder place your battle.lgp and all the stuff listed in one place then do it's job
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2013-02-20 22:03:52
This should be close to final (famous last words) please test

https://dl.dropbox.com/u/3227870/ulgp.7z
https://dl.dropbox.com/u/3227870/libs.7z
https://dl.dropbox.com/u/3227870/source.7z

I'm all ears for questions / suggestions, just make sure you RTFM!
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: DLPB_ on 2013-02-21 16:16:13

Code: [Select]
C:\Documents and Settings\Administrator\Desktop\7Related\bin>lgp\lgp.exe c:\game
s\ff7\data\field\char.lgp -f charfiles
Adding "charfiles\ACGD.hrc"
Adding "charfiles\ACGE.rsd"
Adding "charfiles\ACGF.P"
Adding "charfiles\ACHA.rsd"
Adding "charfiles\ACHA1.rsd"
Adding "charfiles\ACHA2.rsd"
Adding "charfiles\ACHA3.rsd"
Adding "charfiles\ACHB.P"
Adding "charfiles\ACHB1.p"
Adding "charfiles\ACHB2.p"
Adding "charfiles\ACHB3.p"
Adding "charfiles\ACHC.rsd"
Adding "charfiles\ACHC1.rsd"
Adding "charfiles\ACHC1100.rsd"
Adding "charfiles\ACHD.P"
Adding "charfiles\ACHD1.p"
Adding "charfiles\ACHE.TEX"
Adding "charfiles\ACHF.TEX"
Adding "charfiles\ACIA.TEX"
Adding "charfiles\ACIB.rsd"
Adding "charfiles\ACIB0.rsd"
Adding "charfiles\ACIC.P"
Adding "charfiles\ACID.rsd"
Adding "charfiles\ACID1.rsd"
Adding "charfiles\ACIE.P"
Adding "charfiles\ACIE1.p"
Adding "charfiles\ACIF.rsd"
Adding "charfiles\ACIF1.rsd"
Adding "charfiles\ACIF2.rsd"
Adding "charfiles\ACJA.P"
Adding "charfiles\ACJA1.p"
Adding "charfiles\ACJA2.p"
Adding "charfiles\ACJB.rsd"
Adding "charfiles\ACJB0.rsd"
Adding "charfiles\ACJC.P"
Adding "charfiles\ACJD.rsd"
Adding "charfiles\ACJD1.rsd"
Adding "charfiles\ACJE.P"
Adding "charfiles\ACJE1.p"
Adding "charfiles\ACJF.rsd"
Adding "charfiles\ADAA.P"
Adding "charfiles\ADAB.rsd"
Adding "charfiles\ADAC.P"
Adding "charfiles\ADAD.rsd"
Adding "charfiles\ADAE.P"
Adding "charfiles\ADAF.rsd"
Adding "charfiles\ADAF1.rsd"
Adding "charfiles\ADBA.P"
Adding "charfiles\ADBA1.p"
Adding "charfiles\ADBB.rsd"
Adding "charfiles\ADBC.P"
Adding "charfiles\ADBD.rsd"
Adding "charfiles\ADBE.P"
Adding "charfiles\ADBF.rsd"
Adding "charfiles\ADBF1.rsd"
Adding "charfiles\ADCA.P"
Adding "charfiles\ADCA1.p"
Adding "charfiles\ADCB.A"
Adding "charfiles\ADCD.A"
Adding "charfiles\AQAD.A"
Adding "charfiles\FXCC.A"
Adding "charfiles\sbad.tex"
Adding "charfiles\sbae.tex"
AQAD.A: invalid path.

Why invalid path?

Does same thing with other instructions.  It is always 1 file. I am not sure if it adds it anyway.   Other than that things seem ok.



Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2013-02-21 21:10:20
lgp doesn't strictly support uppercase characters, I used to just convert everything to lowercase.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: DLPB_ on 2013-02-22 02:37:46
This is completely unacceptable. I demand you fix this.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2013-02-22 04:12:03
dir charfiles /l /b /s | lgp char.lgp

 8)
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: DLPB_ on 2013-02-22 04:13:37
 :o

Seems everything is okay now :)
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: Kaldarasha on 2013-02-22 17:46:02
OK, what is the special trick to use this under Windows7 64bit. I tried different versions of ulgp and it's ever the same.
A cmd window is opening and then it closed immediately. I'm sure that I need some strange .dlls in my SysWOW64 folder, but I have no idea which.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2013-02-22 20:40:58
http://windows.microsoft.com/en-US/windows7/Command-Prompt-frequently-asked-questions
http://en.wikipedia.org/wiki/Command-line_interface

This isn't an interactive app, you have to specify the parameters on the command line.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: LeonhartGR on 2013-02-28 02:19:06
Luksy did you update the link for the latest ulgp after fixing the upper case issue?
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: ThunderPeel2001 on 2013-09-30 15:44:39
This should be close to final (famous last words) please test

https://dl.dropbox.com/u/3227870/ulgp.7z
https://dl.dropbox.com/u/3227870/libs.7z
https://dl.dropbox.com/u/3227870/source.7z

I'm all ears for questions / suggestions, just make sure you RTFM!

This all seems to be working fine for me. I guess this would be v0.8 once it was all compiled?
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2013-09-30 15:46:21
I might just tag it 1.0, I have an updated version ready too, will post tomorrow at some point.
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: ThunderPeel2001 on 2013-09-30 15:49:23
I might just tag it 1.0, I have an updated version ready too, will post tomorrow at some point.

Awesome!
Title: Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
Post by: luksy on 2013-10-05 09:59:32
New and hopefully final version, aside from bugs if any are found.

Check the readme for how to use (syntax based on tar), if you don't have the gcc and boost libraries installed download the libs archive below and copy it to the same folder as ulgp (or install in system32 if you prefer).

The main archive contains the source, feel free to use the lgp interface in any projects.

ulgp (http://dl.dropbox.com/u/3227870/ulgp.7z)
necessary libs (http://dl.dropbox.com/u/3227870/libs.7z)

Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-05 15:09:14
downloaded and placed the libs in ulgp folder when i open ulgp a command prompt comes for a split second then disappears, later installed the libs into system 32 and ulgp still the same thing? on windows 7 32bit
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-05 22:20:44
This is a non-interactive command line app, you need to open a prompt in the folder (hold shift and right click n the folder -> open command window here). Read the readme.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-06 16:57:14
Can't manage to replace some files in battle.lgp and char.lgp with other files pretty confusing with command prompt  :-X yes i read the readme many times and still can't get it
Anyways many thanks for creating this awesome program i guess il have to wait for the gui version :)
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-06 18:45:40
Command line is very easy but you just have to learn it.  And only once.  The command line is a lot faster than a GUI can hope to be because you can create quick batch files to do the jobs for you, and when used with an installer they are invaluable.  GUI for a tool like this is clunky...

I used to avoid command line as much as I could, but once you learn the basics, it really isn't bad at all!
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 00:15:32
Can't manage to replace some files in battle.lgp and char.lgp with other files pretty confusing with command prompt  :-X yes i read the readme many times and still can't get it
Anyways many thanks for creating this awesome program i guess il have to wait for the gui version :)

If you post what you tried maybe I can point you in the right direction.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 00:27:20
Yeah guess i should try learning command line once and for all will be handy later surely :)
And Luksy i tried those commands said in readme i think in command i typed '-r battle.lgp '  then pressed enter think it said error, il give a proper look tomorrow in bed now on phone xD
Do i have to specify where those lgp's are placed maybe?
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 01:14:11
You need to specify precisely what you are inserting into an lgp archive, unlike extracting it won't automatically read all files in the current directory (it doesn't accept wildcards either). For an example of how to overwrite files in an existing archive, let's say in your current directory you have "battle.lgp", and two files "foo" and "bar", to overwrite the files in the lgp run this:

ulgp -r battle.lgp foo bar

Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 18:32:02
Think im kinda getting it now, but the amount of files i want to replace the files within battle.lgp are aaaa to smda. I placed ulgp, battle.lgp and those p files all in one folder in the desktop folder called battle.lgp and tried this command in readme first
Quote
   Edit the files, then overwrite the file inside the archive
      ulgp -r flevel.lgp -C flevel gldelev
Not sure what gldelev means.. so replaced flevel words with battle and it said it replaced only 1 file but it can't find the path
http://imgur.com/08xdXYh

Also tried your command now it also says path not found
http://imgur.com/oYzPjao

Sorry for bothering you was just playing about and learning how to do this with the cmd lol il use aalis lgp for the time being, just his don't have the replace files directly but have to extract all files then replace then archive again, takes some time :P
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 18:44:18
edit.

There are two Cs... I'd change the second one to use t (target) or another letter, Luksy :)
Not a good idea to use case letter for 2 different operations (and I'd make all ops case insensitive).

@e1sunz

What you want is this:

1.  Place all files that are to be encoded into a folder (call it myfiles) .  Place it in same place as ulgp.exe.

2. open command prompt

3. use ulgp -r PathToLGPArchive myfiles

Where PathToLGPArchive is obviously something like C:\FF7\data\field\flevel.lgp

4. If extracting all files you would use
  ulgp -x PathToLGPArchive -C myextractedfiles 

5. if extracting specific file (in this case dyne and del1)
 ulgp -x PathToLGPArchive -C myextractedfiles  dyne del1

Also, Kranmer will make likely the app neater by adding the libs to the executable and compressing.  So don't worry about that either.

Also, gldelev is just a file name inside flevel.

Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 19:45:55
Finally some progress thanks alot DLPB!
It all looks well in the command prompt here:
http://imgur.com/BVUOj3O
It finished in an instant but then i noticed the battle.lgp still has the same file size but the date modified changed.. tried it in game and nothing changed, im using the steam version if that's maybe why or abit dodgy, am trying to apply mods from here, didn't convert to 1998 yet:
http://forums.qhimm.com/index.php?topic=14405.0
Replacing files within lgp is nothing new done this plenty times and had no problem using aalis lgp tools with GUI.. im too dumb to use this afterall lol, this isn't too important it's ok was just trying out this awesome program with cmd :)
Also, Kranmer will make likely the app neater by adding the libs to the executable and compressing.  So don't worry about that either.
Also, gldelev is just a file name inside flevel.
Cool! and oh right
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 20:08:01
Change myfiles to "Thefiles" and make sure that the files you want to add to the lgp archive are INSIDE the Thefiles folder.  tell me what happens.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 20:29:00
Did that and checked, and also just realized it said in command prompt after doing it, it says 'inserting 0 files' :o
http://i.imgur.com/ylRHrOY.png
and it also made another new folder within 'TheFiles' folder called 'TheFiles' aswell but is empty
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 20:47:13
Remove the -C from the one with -r.  It then adds the file, and I think that is how it is supposed to be.  But there is still an error message.  Luksy will have to explain that.

Surely this program still allows adding of files from folders?  Try this and then see if the file has been updated

ulgp -r PATHANDFILE thefiles

Where "thefiles" is a folder in same place as ulgp.exe, and contains the files that are to be added.
and PATHANDFILE is the lgp file.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 21:01:21
i moved everything in ulgp and the libs inside the "thefiles" folder in desktop before and checked again & the battle.lgp file is placed in a new empty folder at C:\new like before
(http://i.imgur.com/28UrmTj.png)
Maybe the best option is to simply extract to a folder replace files manually then lgp archive again? but not to use the direct replace
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 21:03:41
The ulgp and libs have to be outside the folder.  The "Thefiles" folder should be in the SAME PLACE (the same folder) as ulgp.

The ulgp.exe locates the folder "Thefiles"  from the same path.

Thefiles ONLY CONTAINS the files you want to update.  The ones you want to be placed into the ulgp archive.

In other words lets just do this:

Place ulgp and libs in a folder called "theprogram"  and then inside "theprogram" place a new folder "thefiles". Then you go back to place where ulgp is (one folder back) and open ulgp in command prompt.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 21:40:05
Ok only left the files i want to replace with in "thefiles" and inside the including "ulgp" folder and inside that has the ulgp content so i right clicked on "thefiles" folder and clicked 'Open command window here' then did what you said now i got this:
http://i.imgur.com/TP0E7aJ.png
also tried 'Open command window here' on the ulgp folder inside and the results abit different
http://i.imgur.com/9zpzpq5.png
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 21:41:58
Nope.  That's all wrong.

Do what I said above with "theprogram" folder and "thefiles" folder.  That way it can't go wrong.  And right click "theprogram" folder to bring the command prompt up when you do it.

edit.

And after you have done that, wait.  because either my command using -r above is wrong, or there is something wrong with ulgp.  It can append single files but doesnt seem to allow appending of files from folder, which it should (or at least it used to :P).

Like you said before, you can use -c to create new archive but that shouldnt need to be done.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 21:56:20
Ohhh right ok made a folder in desktop and in there 2 seperate folder "ulgp" and "the files" right clicked on "ulgp" folder and clicked Open Command prompt here then did what you said:
http://i.imgur.com/pUDMtmV.png
Oh just realised took up too much thread space just for my own thing sorry! I think i should give up now but i did learn a thing or two from this lol :) think i got a dodgy pc? meh Thanks alot both of you
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 22:00:52
Go back one dir with cd .. And type this:

dir /b thefiles | ulgp\ulgp -r C:\new\battle.lgp -C thefiles -e
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 22:11:44
Go back one dir with cd .. And type this:

dir /b thefiles | ulgp\ulgp -r C:\new\battle.lgp -C thefiles -e

Is this the new way to encode (append) files from a folder?
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 22:16:18
That's one way, I might just have to add support for standard globbing as this is obviously too complicated. As for the switches, they are based on the tar command. Also I'm keeping the libs separate as my apps will all be using them anyway, I'll make an installer or something.

Oh and I'll redo the GUI soon too.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-07 22:17:02
|
that straight up line key on keyboard i can't press because it's located underneath Esc key and it's got 3 symbols in one :o i press it this comes ` or with Shift then this ¬ so how on earth can i make it do that straight line button in that same key? XD never mind i give up, thanks again :D
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 22:18:07
Just copy the text and right click in the command window > paste
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-07 22:19:03
yeah the best way to do it is to add  a normal encoder option.  Use some other flag.  Most people who are encoding are encoding from a folder anyway...  i dont see any real need to specify 1 or 2 files to be appended.  In nearly every case, having files inside the target folder is simple and works (and you can still append 1 or 2 files this way).

Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: Kranmer on 2013-10-07 22:33:51
Having trouble compiling the source in MinGW, i have installed MinGW GCC 4.8.1 and Boost 1.54.0 but i keep getting errors trying to compile main.cpp
Code: [Select]
C:\Temp\cc76I0PB.o:main.cpp:(.text+0x45): undefined re
ference to `boost::filesystem::path::parent_path() const'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0x4c0): undefined r
eference to `lgp::Archive::Archive()'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0x4f2): undefined r
eference to `lgp::Archive::addLgp(std::string const&)'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0x6bf): undefined r
eference to `lgp::Archive::addFile(std::string const&)'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0x79e): undefined r
eference to `lgp::Archive::write(std::string const&) const'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0xed0): undefined r
eference to `boost::system::generic_category()'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0xedc): undefined r
eference to `boost::system::generic_category()'
C:\Temp\cc76I0PB.o:main.cpp:(.text+0xee8): undefined r
eference to `boost::system::system_category()'
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: C:\Temp\cc76I0PB.o: bad reloc address 0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
any help you can give would be nice, thanks
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 22:41:06
If boost was compiled with mingw you need to link the filesystem and system dll's when compiling (just add them directly like any other object file), if not you'll need to link to the import libs instead.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: Kranmer on 2013-10-07 22:47:56
I am kind of a newbie when it comes to compiling (usually i just follow directions and it works), so i don't fully understand what you mean but i have tried Compiling boost myself and using a precompiled version from http://nuwen.net/mingw.html and both fail to compile, i did try adding the libs to the same folder as the ULGP source but still got errors, guess this may be out of my league.
Also another small question but why is boost used on this version of ULGP but not on previous ?
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 23:02:30
It just occurred to me you're not linking the lgp object file either, anyway try downloading my libs archive and copy it to the same dir as the source, and run this

g++ -std=c++11 -O3 main.cpp lgp.cpp *boost*.dll
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: Kranmer on 2013-10-07 23:10:18
OK i have now put the source and the libs into the same folder, then typed "g++ -std=c++11 -O3 main.cpp lgp.cpp *boost*.dll" and it did this

EDIT- Sorry that was my fault, i corrupted my MinGW installation, reinstalled and now i get
Code: [Select]
C:\MinGW\ulgp>g++ -std=c++11 -O3 main.cpp lgp.cpp *boost*.dll
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: i386 architecture of input file `libboost_filesystem.dll' is incompa
tible with i386:x86-64 output
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: i386 architecture of input file `libboost_system.dll' is incompatibl
e with i386:x86-64 output
C:\Users\Kram2\AppData\Local\Temp\cccsYswN.o:main.cpp:(.text+0x27): undefined re
ference to `boost::filesystem::path::codecvt()'
C:\Users\Kram2\AppData\Local\Temp\cccsYswN.o:main.cpp:(.text+0x48): undefined re
ference to `boost::filesystem::path_traits::convert(char const*, char const*, st
d::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&,
std::codecvt<wchar_t, char, int> const&)'
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/
bin/ld.exe: C:\Users\Kram2\AppData\Local\Temp\cccsYswN.o: bad reloc address 0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-07 23:21:51
Ah this might be to do with a std::to_string conflict, maybe the mingw distro you downloaded includes those functions because standard mingw hasn't got around to it yet, adl might be causing my own to_string function to conflict with the std:: versions, I'll change the name.

edit: I've updated the source in the lgp.7z archive, hopefully the conflict is gone now (haven't tested!).

edit2: Ah ok saw the updated, basically you're trying to link my boost libs which are 32bit using your 64bit mingw, that won't work, you'll either have to fix your boost lib issue or just use the standard mingw.

Also I'm using boost filesystem because 1. I've become a bit of a portability nut, 2. boost::filesystem is in C++ TR2 and will probably be part of the standard library at some point, and 3. the winapi functions are a pain in the ass!
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: Kranmer on 2013-10-08 00:36:12
I'm still getting the same errors, i'm guessing its just me, i will just give up on building the source for now, thanks anyway :)
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-08 01:18:23
It should work with plain mingw and the boost dlls I built

http://sourceforge.net/projects/mingw/files/latest/download

You need to make sure you uninstall the other mingw because it's probably modified your PATH env. variable, IIRC normal mingw won't though so you'll have to add it manually.


As for making changes to the interface, the reason things are the way they are now means I don't need to second guess what the user is attempting to do, which would actually be relatively easy if it weren't for magic.lgp and the insane lgp path handling.

It doesn't help that the windows dir function is schizophrenic: dir /b gives a raw dump of local filenames, dir /s gives a recursive dump using relative paths but with full dir info.  Use them together and for some reason the paths are now absolute, which isn't a problem for any other file except magic.lgp.

Making changes to the interface to fix these issues will result in either a loss of flexibility, or require even more options which in a way complicates things further, most of the complexity of the syntax can be fixed with batch files anyway.

Come to think of it this can be resolved mostly by allowing dirs to be specified in the file list, I'll update it.

What does everyone think?

Ok with a few tiny changes things are a lot easier for non-magic.lgp archives and it still remains as flexible as before.
Entire folders can be specified in the file list, so if you want to create an archive from scratch from a single folder, it's enough to say

ulgp -c foo.lgp thefolder

Note that this WON'T work for magic.lgp because paths are important, magic.lgp would have to be

dir /b thefolder | ulgp -c foo.lgp -eC thefolder

I'll upload the changes later.

Actually this will cause problems if you need to overwrite...sigh. I'll think of something.

Ok got it, was actually fairly straightforward and should make all of us happy.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: Kranmer on 2013-10-08 23:47:28
Thanks luksy i finally got it working, installed the latest version of MinGW from that link (i was downloading from their sourceforge site and it was downloading a old installer) and removed all my old environment paths and started fresh, in the end the final command i used to get it working was
g++ -I C:\MinGW\ulgp\boost_1_54_0 -std=c++11 -O3 main.cpp lgp.cpp *boost*.dll
Thanks again.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-09 00:24:38
Cool, I'll have the updated version uploaded soon.

Ok one for testing

https://dl.dropboxusercontent.com/u/3227870/ulgp_v1.1.7z

Basically the only change is that if you do not specify any files when creating or appending, all files are read, so these should now all work as expected:

dump all:
ulgp -x archive.lgp -C targetFolder

create lgp from scratch using all files / folders in targetFolder
ulgp -c archive.lgp -C targetFolder

overwrite all files
ulgp -r archive.lgp -C targetFolder
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-09 13:04:03
Seems to work a charm. After kranmer places it all together and after upx, it comes out at 225KB

1 small issue though.  When using wrong tag (like -e instead of -r), the app hangs.  But that's small potato.

Good job!
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-09 13:58:25
The app isn't hanging, it's waiting for input on the command line if you use -e.

Also I can appreciate wanting to plonk everything into one file, but that defeats the idea of keeping the code separate and the file size to a minimum, you end up distributing multiple copies of the libs with every app. Not that I have other apps planned but you never know. And I've kind of gone off upx too, compression is understandable for distribution (that's where 7zip comes in) but not necessary for the actual executable with today's storage spaces.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-09 14:37:46
For me it just makes things nice and neat to have it in 1 package (especially with installer) .  After upx and all the files in the exe, it comes out as around 220 KB not bad!

I know why you want it separate too tho.  8-)

Obviously if I had like 5 of your programs I had to distribute with an installer, it would be pointless combining all the files.  I just think a standalone command line tool should be 1 exe.   It isn't any biggie anyway, you release the source so people can use it.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-10 05:58:48
Ok here's what are ideally the final versions of the commandline and GUI app

http://goo.gl/WxHoSa

(the google shorterner is just to let me know how many times it's been clicked).

This archive has all the libs and source included, I tested it briefly but would appreciate anyone who can chip in (Dan...:D)
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: LeonhartGR on 2013-10-10 12:22:21
I love GUIs... hehe! Thanks!
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: Kranmer on 2013-10-10 16:36:40
Thanks for the new version Luksy, having problems making a LGP with sub folders using the GUI or command line, i tried using
dir /b thefolder | ulgp -c foo.lgp -eC thefolder
as you posted that previously but it still doesn't do sub folders,
Dan has told me that -r works with sub folders but -c doesn't.
But anyway other then sub folders everything else seems to be working great :) Thanks
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-10 21:44:33
That's odd, I'll check again later, I could have sweared it was working, I even made a test script.

edit: Seems to be working for me, by the way if you don't specify any files it will automatically add everything in the specified folder so you can just do ulgp -c foo.lgp -C thefolder

To get a better idea of what's going on, post a dump of the directory structure you have and run ulgp with the -v flag

The commandline app doesn't dump the files with -t due to a bug, but that isn't causing your issue.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-11 12:06:04
I run ulgp -c foo.lgp -C folder1

With -v I get
"inserting 2 files/folders
Inserting folder2\config2
Inserting "config"
Writing lgp file to foo.lgp

But on decode, no folders.

Structure is >

\folder1\folder2

Inside folder1 there is a file called config
Inside folder2 there is a file called config2

Inside foo after -c all there is is config and config2
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-11 13:48:25
This is entirely intended and you should get the same results with classic lgp, folders are only preserved for identical filenames in separate folders, i.e if you have foo.txt in the folders test1 and test2 it should work fine. Unique filenames are stripped of their paths.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-11 14:01:07
This is entirely intended and you should get the same results with classic lgp, folders are only preserved for identical filenames in separate folders, i.e if you have foo.txt in the folders test1 and test2 it should work fine. Unique filenames are stripped of their paths.

But -r kept them?

Surely sometimes different files in different folders are necessary?
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-11 22:11:26
That's because when the lgp was created, the path was stripped. When you used -r, you now have two files with the same filename, so the new one is inserted with its path. The only file that uses paths is magic.lgp, and it only uses them for files with identical filenames — the only reason lgp even exists is so the files can be looked up in the hash table, so unique filenames have no need for a path.

I can change this of course if it makes more sense to always keep paths, it's just something that will never be necessary for actual game files.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-11 22:22:09
Is this true of lgp files outside of ff7?  if so there is prob no point.  :)
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-11 22:23:45
I haven't checked ff8 yet, I don't think lgp is used anywhere else.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-12 00:08:56
ulgp.exe seems to be working great!  8)  Very useful tool. 

Download FF7LGP 1.1 (https://dl.dropboxusercontent.com/u/36889302/Programs/FF7LGP.bat)

And I have just done some research and created a batch file (above) that will encode/decode all LGP files in FF7 using ulgp.exe.  You just place any LGP file (like flevel.lgp) in a folder called LGPs.  The folder is placed in the same place as ulgp.exe.  Double click FF7LGP.bat (which is also in same place as ulgp.exe) and then select either d or e. It will do the rest.  To create all necessary folders (it will place them in a new folder called Files) just select f.

so d: decode to folders (it will obviously create all decode folders  here because ulgp does that)
e: encode from folders
f: create entire folder structure.
c: close command prompt

I highly recommend selecting f before anything else.
This will set all the folders up for you.
With Luksy's permission I can distribute this in a ready made zip file with his exe

Always make sure you back up your lgp files before using ulgp based programs.

It will work with ALL lgp archives, even non-English ones like gflevel.lgp.

take flevel as an example.

Running d will place all flevel files into Files\DecFlevel

Running e will encode from Files\EncFlevel

If you have any problems or think something needs changing, let me know.

edit.  1.1 is released :P
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-12 04:43:25
Yeah if it wasn't clear anyone has permission to do whatever they want!

I think next I'll make an explorer right-click extension like 7-zip's, and a registry key to associate .lgp files.
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-12 10:50:03
I'll wait until you have updated the readme on main post.  That way I can distribute that with the program :)
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: dkma841 on 2013-10-12 14:44:45
I think next I'll make an explorer right-click extension like 7-zip's, and a registry key to associate .lgp files.
That'l be really handy :)
Title: Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-14 12:26:30
Here's a batch file that will associate .lgp files with the commandline version of ulgp, once it's run you can double click an .lgp file and it'll automatically extract it to a folder with the same name as the lgp file + ".files" in the same folder as the lgp file.

To use the batch file, copy it to the same directory as ulgp.exe and run it, 'i' installs, 'u' uninstalls. If you move ulpg you'll need to reinstall to update the path.

https://dl.dropboxusercontent.com/u/3227870/install.bat

Hopefully I'll get round to making a right click handler for the reverse too at some point.
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-17 04:29:52
Updated, I've simplified the syntax again as most people won't need to mess around with the other options

ulgp v1.2 (https://dl.dropboxusercontent.com/u/3227870/ulgp_v1.2.7z)

tl;dr:

Extract magic.lgp to a folder named "magic"
ulgp -x magic.lgp

Create magic.lgp from a folder named "magic"
ulgp -c magic.lgp

Overwrite files in magic.lgp from those in a folder named "magic"
ulgp -r magic.lgp

Run install.bat to associate .lgp files with ulgp, once installed simply double click on an .lgp file to extract to the default folder. Hold shift and right click on any folder to create / add to an .lgp file using the files inside.

The GUI now comes in two flavours depending on your version of Windows, the only changes are visual.

As always the readme contains full info.
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-10-17 04:35:46
http://www.youtube.com/watch?v=juHgQBB2tLU

I'll test it later on :)

edit.  Looks good to me!  Decode encode working fine here.
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-10-18 04:27:24
Made minor changes, GUI is a single exe but matches both the Xp and Vista+ styles accordingly. Not changing version  :P
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: DLPB_ on 2013-12-29 18:28:13
For anyone else, just a note.  The -r (overwrite files) option has some sort of bug and is sometimes not updating files.  Luksy will be looking at this shortly I am guessing.

edit.

Turns out I was being stupid.  The problem is that ulgp has to be fed lowercase files (including lower case extentions).
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-12-30 23:53:03
1.2.1 forces all chars to lowercase, I'll leave both up just in case because I can't remember if case is used at all internally in the games, if it causes problems just use 1.2 and make sure the filenames match 100%

https://dl.dropboxusercontent.com/u/3227870/ulgp_v1.2.1.7z
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: Grimmy on 2013-12-31 02:21:43
What about new file names? Like a new texture or p file that did not exist before added to any lgp. Would it matter if that file was upper or lower cased. It seems like a pointless check since the game and driver both ignore case when loading a file.
Title: Re: [1.2] ulgp - lgp inserter / extractor / repacker & library
Post by: luksy on 2013-12-31 02:58:05
1.2 will happily accept two files separately as foo.bar and foo.BAR, this apparently is an issue because some people have been changing the case of the files they dump. It's an issue because the in-game lgp lookup probably just returns the first case-insensitive match it finds, so if for instance you have added foo.BAR as a replacement for foo.bar, foo.bar isn't actually overwritten in 1.2. When the game looks up foo.bar it'll just return whichever is first in the table (presumably). New files won't be affected I guess, assuming the in game lookup is case-insensitive as you say.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: obesebear on 2014-11-04 19:33:50
Per DLPB's request, I'm filing a bug report for 1.2.1.   Upon attempting to compile a heavily modified battle.lgp that will be 1.04Gb or larger, it throws the error "the volume for a file has been externally altered so that the opened file is no longer valid".  However, using a compiled version of Aali's code from http://forums.qhimm.com/index.php?topic=8641.0 will compile it just fine (though in instances like barret's attack, his shells will no longer appear. and there are a few other texture errors).   Your version has fixed whatever that problem is, it just won't compile it if it's too big it seems.

Also tried compiling the 1.04Gb battle.lgps using Aali's code and using 1.2.1 to then dump that.  It errors saying battle.lgp cannot be found
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: Kaldarasha on 2014-11-05 06:30:50
Use a tool to allow the process to use more than 3GByte ram and it will work.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: Aali on 2014-11-05 14:34:57
Per DLPB's request, I'm filing a bug report for 1.2.1.   Upon attempting to compile a heavily modified battle.lgp that will be 1.04Gb or larger, it throws the error "the volume for a file has been externally altered so that the opened file is no longer valid".  However, using a compiled version of Aali's code from http://forums.qhimm.com/index.php?topic=8641.0 will compile it just fine (though in instances like barret's attack, his shells will no longer appear. and there are a few other texture errors).   Your version has fixed whatever that problem is, it just won't compile it if it's too big it seems.

Also tried compiling the 1.04Gb battle.lgps using Aali's code and using 1.2.1 to then dump that.  It errors saying battle.lgp cannot be found

I would like to see that broken LGP you produced with my tool. If you could come up with a set of source files that produce a broken LGP file with my tool and a working one with ulgp that would be even better.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: obesebear on 2014-11-06 00:08:43
I would like to see that broken LGP you produced with my tool. If you could come up with a set of source files that produce a broken LGP file with my tool and a working one with ulgp that would be even better.
Well holy hell, I was testing the different lgps i had compiled to make sure I uploaded the correct one, but this time the textures and shells showed up.   But in the next fight they didn't at first, but did during the second attack. I even recompiled one from scratch again. 

My problem must have something to do with 60fps.  Though it is still strange that luksy's version keeps producing errors.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: quantumpencil on 2015-04-26 06:43:02
Could anyone explain to me what exactly causes the "Volume of a file has been externally altered" output in the command line? I'm having that issue now while trying to compile my battle.lgp file for my (soon to be released) mod. A few months ago I used this tool fine and didn't seem to have any problems. There exist plenty of mods which have larger battle.lgp files though -- so is there a work around for this?

Thanks,

QP
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: luksy on 2015-05-01 09:19:10
The previous version seems to choke with larger files due to all the memory-mapping going on, I've switched back to regular filestreams again which should fix the issue

https://dl.dropboxusercontent.com/u/3227870/ulgp_v1.3.7z

Command-line only for now, the invocation has a changed a little and is much simpler, just keep in mind that you must be in the directory where you want the files to be dumped/packed (the archive itself can be anywhere).
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: DLPB_ on 2015-05-06 02:58:30
I've had a look and I think the syntax needs a little tweak.  The easiest and most common use people have is:

List:
Code: [Select]
ulgp l FileExtract:
Code: [Select]
ulgp x File FolderAdd:
Code: [Select]
ulgp a File Folder
It's simple and it requires no effort or change apart from the x and a.

imho that should be the default behaviour.

The only other feature would then be to extract specific files, and that can just use something like

Code: [Select]
ulgp f File Folder Filter
So the f flag would have a third parameter being the Filter for specific files.  For example, "cor" would return all "corel" fields and so on.

Code: [Select]
ulgp f c:\ff7\data\field\flevel.lgp MyFields cor
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: luksy on 2015-05-14 01:42:37
I managed to re-introduce some bugs in v1.3, so they're fixed, and I've reworked the interface as follows:

There are no more commands, the first argument is autodetected as either a file or a folder. If it's a file it extracts, if a folder it archives the files in the folder.

If the second argument is omitted, it creates a folder from the stem of the lgp file if extracting (e.g. magic.lgp => magic/), or it adds .lgp to the folder when archiving, otherwise it uses the second argument as the target archive / folder.

Any other arguments are a list of files to extract / add, relative to the folder, if no files are specified it extracts / adds all files.

This also means you can just drag a file or a folder on top of the exe and it should do what you expect.

https://dl.dropboxusercontent.com/u/3227870/ulgp_v1.3.1.7z

(64bit only for now, will get round to a 32bit version).
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: DLPB_ on 2015-05-14 02:46:28
This is much better now :)
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: luksy on 2015-05-22 02:49:53
I've replaced the file list with a single regex pattern, and recompiled for 32bit

https://dl.dropboxusercontent.com/u/3227870/ulgp_v1.3.2.7z

Keep in mind the pattern is regex, not a globbing pattern, so something like

  ulgp magic.lgp somedir "foo|bar"

can be used to extract "foo" and "bar" only, and

  ulgp magic.lgp somedir "x.*"

extracts all files beginning with x. The glob-like pattern "x*" would only extract files with two characters.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: DLPB_ on 2016-03-29 14:07:40
I have created a batch file to make modifying / decoding lgp archives in FF7 easier.

lgp_edit  is HERE (https://drive.google.com/file/d/0B3Kl04es5qkqU0tOaE1zMzFDR2c/view?usp=sharing)

The batch file uses Luksy's ulgp tool.

Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: obesebear on 2016-03-29 14:10:21
Genuine question.  Why is this easier?  With the current ulgp, you drag the lgp over it and it extracts, or you drag the extracted folder over it and it compiles.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: DLPB_ on 2016-03-29 14:13:33
This can keep all your archives in one place and continually add files from "add" folder. Or can decode to "new" folder.  Or create new archive entirely from "new" folder.  It's a lot easier to see the benefits when you have a lot of archives you are continually testing with various files (especially when the number of files becomes very large like with char.lgp).

Plus one folder can keep the original archives for you to use again without having to keep copy pasting from game root.  This doesn't make ulgp any easier - it makes managing large edits to numerous lgps easier.  And it does it without having to know the command line.

I'm not sure how useful this will be for people, but it's definitely been useful for me.  8)
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: Ark14 on 2017-11-23 08:46:28
Can't seem to find a working link for the last version. Can anyone reupload it, please.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: Cid on 2017-11-24 09:10:49
This should help a lot, but all the links are broken. :-(
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: luksy on 2017-11-25 05:51:16
Sorry for the expired links, updated the first post.
Title: Re: [FF7] LGP inserter/extractor/repacker & library - ulgp (1.2)
Post by: Ark14 on 2017-11-25 06:20:50
Thank you very much.