Author Topic: [PC] LGP inserter/extractor/repacker & library - ulgp (1.2)  (Read 107709 times)

luksy

  • *
  • Posts: 375
    • View Profile
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
ulgp v1.2.1 (forces lowercase files internally)
ulgp v1.3.2 (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.
« Last Edit: 2018-04-24 18:18:35 by Covarr »

Garrickus

  • *
  • Posts: 35
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #1 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


Kranmer

  • *
  • Posts: 766
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #2 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

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #3 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?

Aali

  • *
  • Posts: 1196
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #4 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.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #5 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.

Garrickus

  • *
  • Posts: 35
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #6 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?


luksy

  • *
  • Posts: 375
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #7 on: 2012-02-18 03:58:21 »
Not at the moment, I'll add that for the next version.

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: ulgp - lgp inserter / extractor / repacker
« Reply #8 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.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.2] ulgp - lgp inserter / extractor / repacker
« Reply #9 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.

nomad805

  • *
  • Posts: 16
    • View Profile
Re: [0.2] ulgp - lgp inserter / extractor / repacker
« Reply #10 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

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.2] ulgp - lgp inserter / extractor / repacker
« Reply #11 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.

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: [0.2] ulgp - lgp inserter / extractor / repacker
« Reply #12 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?

UGerstl

  • *
  • Posts: 376
  • Analyst and Backup-Manager
    • View Profile
Re: [0.2] ulgp - lgp inserter / extractor / repacker
« Reply #13 on: 2012-02-22 00:49:33 »
@Leonhart7413: You must start CMD.exe before you run it. (Hint: Windows-Key + R)

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #14 on: 2012-02-22 02:32:04 »
Stupid hash table bug in 0.2, don't use it, fixed in 0.3

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #15 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 :(

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #16 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.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #17 on: 2012-02-22 12:39:33 »
You need to understand how Command Line programs work leonhart.

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #18 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 :)

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #19 on: 2012-02-26 12:41:31 »
Luksy do I have permission to use your program for a release?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #20 on: 2012-02-26 12:45:09 »
I am pretty sure that the program was made to benefit the modding community.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #21 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

PitBrat

  • *
  • Posts: 1376
  • Change to feed the machine.
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #22 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.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.3] ulgp - lgp inserter / extractor / repacker
« Reply #23 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.

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.4] ulgp - lgp inserter / extractor / repacker
« Reply #24 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.