You are here

UPX and autoupdate batch files

7 posts / 0 new
Last post
Bahamut
Bahamut's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-04-07 08:44
UPX and autoupdate batch files

This is a verbatim of the post I made in the original in the FxP forum. I need people to test the batch files and give feedback. Ways to make it better (how to implement certain features, not just suggestions) would also be greatly appreciated.

After much trial, error, and frustration, I finally got it to work.
Anyway, the batch files can be found here:
http://www.digital-signal.net/bahamut/batch/UPXAU/testing

Instructions:

  • Usage: [batch file] [file to prepare]
  • I will add echo messages in a later release.
  • As I stated before, only one file can be processed at a time.
  • I do not have error-catching mechanisms implemented yet. You may seriously screw something up, especially if you do not follow directions. I make no guarantee that this will work or that it won't do anything bad.
  • I try to give as much information as possible for debugging/troubleshooting. If there is something you think I can add to further this, let me know.
  • You will need UPX, Jacksum, Java, xdelta, and cp[1][2].
    cp, Jacksum, and Java are not strictly necessary; cp is needed for preparexdelta.bat (I can't figure out how to do it with copy or xcopy), and Jacksum (which depends on Java) is used to verify that everything is done correctly.
  • You must replace %rootdir% with the location of the programs (UPX/Jacksum/xdelta/cp).
  • You must cd to FirefoxPortable\App\firefox (this applies to all batch files.
  • The files in FirefoxPortable\App\firefox are modified; the files in the temp directory are not.
  • Since these are not ready for the regular joe, and is out for testing purposes mostly, the backup files made are not deleted. I strongly discourage using these batch files on a flash drive (copy FxP to a hard drive).
  • cp seems to give the backed up files the read-only flag.
  • You must use the original file as the argument. Remember to remove the read-only flag if you have to replace the modified file in FirefoxPortable\App\firefox.
  • You can change the options used by UPX and Jacksum, however, make sure that the changes are applied throughout the entire batch file (e.g. don't compare a sha256 sum to a sha1, don't use --best --all-methods the first time and -9 --all-filters the next)
  • xdelta does not tell you if the patch was applied correctly, but only if it could apply a patch.

File-specific:

  • preparexdelta.bat creates the temporary directories and copies the binary files to those directories. It doesn't accept any arguments.
  • xdeltatest.bat verifies that the whole process will indeed work. If the first checksum matches the last checksum, you should be good to go. If not, check that your directories are correct, that every program ran and did what it was supposed to do, and that the method/level/filter used by UPX are the same both times.
  • doxdelta.bat packs the files and creates the patch files. Patches are stored in FirefoxPortable\bak
  • prepareupdate.bat unpacks the files and restores them to the originals so that autoupdate can use a small update patch. The originals are re created in FirefoxPortable\likenew.

[Moderator RM: I'm in ur post, fixing ur links {insert lolcat here}]

ReneL
Offline
Last seen: 11 years 2 months ago
Joined: 2005-12-18 02:40
Download not working

The download link does not seem to work, can you check it?

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-04-07 08:44
Fixed.

Fixed.

Vintage!

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 7 years 5 months ago
Joined: 2006-11-18 10:26
link dorked

As I reported in the other thread on this topic, the first "cp" link is dorked, but can be overcome by someone with decent computer ski11z. Wink

Edit: I read your response in the other thread. Simultaneous posting doesn't work out so hot. Sad

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 13 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
One or The Other

Either direct people in the other thread to do this one... or use the other thread and delete this one. Posting the exact same thing to multiple threads is bad form (and against the guidelines).

Sometimes, the impossible can become possible, if you're awesome!

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-04-07 08:44
Would the comment I just

Would the comment I just made in the other thread suffice?

Vintage!

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-04-07 08:44
A totally redone batch file

A totally redone batch file will be done now that I know how to use for correctly. Most of the steps will be the same, though, so if you see any problems in these first files, don't hesitate to post.
Incomplete versions can be found here. I have uploaded a version with the help and version sections done. I'll probably have it ready for beta status tomorrow.

Vintage!

Log in or register to post comments