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

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
« Reply #75 on: 2013-02-28 02:19:06 »
Luksy did you update the link for the latest ulgp after fixing the upper case issue?
« Last Edit: 2013-02-28 02:29:23 by LeonhartGR »

ThunderPeel2001

  • *
  • Posts: 156
    • View Profile
Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
« Reply #76 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?

luksy

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

ThunderPeel2001

  • *
  • Posts: 156
    • View Profile
Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
« Reply #78 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!

luksy

  • *
  • Posts: 375
    • View Profile
Re: [0.7] ulgp / ulpgGUI - lgp inserter / extractor / repacker
« Reply #79 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
necessary libs

« Last Edit: 2013-10-05 10:02:44 by luksy »

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #80 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
« Last Edit: 2013-10-05 15:48:17 by e1sunz »

luksy

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

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #82 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 :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #83 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!
« Last Edit: 2013-10-06 21:37:33 by DLPB »

luksy

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

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #85 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?

luksy

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


dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #87 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
« Last Edit: 2013-10-07 18:38:01 by e1sunz »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #88 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.

« Last Edit: 2013-10-07 21:11:35 by DLPB »

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #89 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
« Last Edit: 2013-10-07 19:53:30 by e1sunz »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #90 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.

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #91 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

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #92 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.
« Last Edit: 2013-10-07 20:54:09 by DLPB »

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #93 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

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

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #94 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.
« Last Edit: 2013-10-07 21:43:16 by DLPB »

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #95 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

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #96 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.
« Last Edit: 2013-10-07 21:53:57 by DLPB »

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #97 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
« Last Edit: 2013-10-07 22:01:41 by e1sunz »

luksy

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

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [1.0] ulgp - lgp inserter / extractor / repacker & library
« Reply #99 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?
« Last Edit: 2013-10-07 22:15:15 by DLPB »