>> Couldnt you read in the executable byte by byte into an unsigned char array? <<
Someone's already written this utility for you. This program will convert a binary file to a C data array declaration.
Printable View
>> Couldnt you read in the executable byte by byte into an unsigned char array? <<
Someone's already written this utility for you. This program will convert a binary file to a C data array declaration.
sweet
The self-extractors I've seen simply append the data to the end of the file.
You know how you have sections like .rsrc, .text, .code?
Well if you look at a WinZip SFX, you'll se another section called "_winzip_"
If you disassemble that SFX, you'll find that the _winzip_ section is simply a database that holds the zip file.
This is quite similar to the xd application posted above, but it puts the data in a different section.
Hm, perhaps you could even pre-pend the data, if you write a program that will modify the executable file header to specify the application entry point at a later offset, and then stick the archived files in front of the executable code. Not sure exactly how the executable file is structured, but I took a quick look at www.wotsit.org under MS's exe docs, and it does seem that there's a 'entry point offset' part in the file header.
Just use InstallShield and setup your project inside of it. All of this has already been done for you. No sense in re-inventing the wheel.
Unless I'm mistaken, the cheapest version of installshield is around $400. For that price I will gladly re-invent the wheel.
ARG!
http://nsis.sourceforge.net/
Go get NSIS! It's a FREE install file creator that you can customize incredibly. It's easy to use, and quite a few people use it (You'll occasionally see an installer with NSIS v2.01 or something like that at the bottom, made with NSIS!)
>>Unless I'm mistaken, the cheapest version of installshield is around $400.
MSVC 6 pro came with it a few years ago, I got the whole package for $160 canadian (academic pricing).