Hi friends,
Here is a tiny SFX archive demo using Jeremy Collake's compression library.
The stages of building the SFX archive:
jcalg1_test c9 Sample.exe Sample.jc ; compress the executable to be embedded to the SFX archive
bin2o Sample.jc Sample.obj _pData ; convert the archive ( binary code ) to COFF object file
pocc wcrt0.asm ; Assemble the tiny C run-time startup module
pocc /Ze Sfxdemo.c ; Compile the main SFX module
polink /SUBSYSTEM:WINDOWS /OUT:Sfxdemo.exe wcrt0.obj Sfxdemo.obj jcalg1_d_fast.obj Sample.obj kernel32.lib user32.lib
; Link all the object files + the decompression routine to create the final executable
Important notice, you need Polink V2.90.11 to build the project:
http://smorgasbordet.com/phpBB2/download.php?id=75
You need to run povars32.bat before building the project. Run the executable Sfxdemo.exe and it will extract the file test.exe
The compression library JCALG1 is available from:
http://www.collakesoftware.com
Bin2o.exe : f0dder's binary to MS COFF object file converter
The tool available from:
http://f0dder.has.it
Hello,
Seems useful - thanks for the example!
Pelle
Updated project :
- bin2o replaced by bin2coff
- wcrt0.asm replaced by crt0.lib
Thanks fro the demo..
It seems to be much useful..