7-Zip compression - part II (SFXs) - patchers, read this!

Discussion about NBA Live 2003.

7-Zip compression - part II (SFXs) - patchers, read this!

Postby Santiago Roza (Kq) on Wed Oct 01, 2003 9:12 am

Creating an automatic SFX with 7-Zip is a bit tricky. Here is the entire procedure, step by step:

- Make a .7z archive with ALL the contents you need to pack (including the install batch file, of course). Make sure you select "Ultra" method and check "Create solid archive", for maximum compression. Do NOT check "Create SFX..."!
- If needed, make sure the batch installer that comes with the archive copies itself to the NBA Live 2003 main folder (so the user can re-run it from there when needed) It should copy Don Daily's auto-installation tools as well.
- Now copy this three files to a folder: your .7z archive, the file config.txt provided here, and the file 7zS.sfx included in the 7-Zip package (get it from 7-zip.org)
- Edit config.txt as needed (with the prompt info and the install file that should be run)
- Open a MS-DOS window in that folder, and type this:
copy /b 7zs.sfx + config.txt + archive.7z archive.exe
- Now archive.exe (the SFX) is ready. When you run it, it will prompt for OK/Cancel, then unpack all files to a temp folder, and run the included installation.
- If you want to change the icon of the .EXE, use an external program like ResourceHacker:
http://rpi.net.au/~ajohnson/resourcehacker
- You can use UPX (Ultimate Packer for eXecutables) to compress the SFX included in the .EXE, which will save about 65 Kb.
http://upx.sourceforge.net


**** START OF CONFIG.TXT FILE ****
;!@Install@!UTF-8!
Title="NTeams cyberfaces - screenshots"
BeginPrompt="Do you want to view the NTeams cyberface screenshots?"
RunProgram="install.bat /T:%%T"
;!@InstallEnd@!
***** END OF CONFIG.TXT FILE *****



Here you'll find my example of an automated 7z-based SFX: it just contains three cyberface previews, and it shows them when you run the SFX (the .EXE icon has been changed with ResourceHacker).
http://nteams.nbalive.org/upload/faces_preview.exe


If you want to create a simpler, extract-only (non-automatic) SFX, just check the "Create SFX..." option when you're adding your files to the .7z archive. This kind of self-extractor will just prompt for the extract folder, unpack the files there, and won't run any commands automatically.
User avatar
Santiago Roza (Kq)
 
Posts: 61
Joined: Thu Sep 12, 2002 11:52 am
Location: Buenos Aires, Argentina

Postby Nick on Wed Oct 01, 2003 12:58 pm

Thanks KQ. I'll be coming back to this thread for sure, could you sticky it Andrew? maybe chuck it in Patching issues too.
User avatar
Nick
Barnsketball
Contributor
 
Posts: 6536
Joined: Sun Sep 15, 2002 9:01 pm
Location: Melbourne, Australia


Return to NBA Live 2003

Who is online

Users browsing this forum: No registered users and 4 guests