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=75You 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.comBin2o.exe : f0dder's binary to MS COFF object file converter
The tool available from:
http://f0dder.has.it