Pelles C forum

C language => Tips & tricks => Topic started by: Vortex on December 13, 2004, 08:37:45 PM

Title: Sfx archive demo
Post by: Vortex on December 13, 2004, 08:37:45 PM
Hi friends,

Here is a tiny SFX archive demo using Jeremy Collake's compression library.

The stages of building the SFX archive:
Code: [Select]

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
Title: Sfx archive demo
Post by: Pelle on December 14, 2004, 09:14:54 PM
Hello,

Seems useful - thanks for the example!

Pelle
Title: Re: Sfx archive demo
Post by: Vortex on August 17, 2010, 08:14:10 PM
Updated project :

- bin2o replaced by bin2coff
- wcrt0.asm replaced by crt0.lib
Title: Re: Sfx archive demo
Post by: saliha on February 24, 2011, 10:44:31 AM
Thanks fro the demo..
It seems to be much useful..