• Advertisement

Archived

This topic is now archived and is closed to further replies.

OT: maximum .exe size

This topic is 6073 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
32MB is a huge executable. How''d you manage to pull that off? lots of resources compiled into the exe?

The largest executable file that I''ve seen was around 8MB that I can recall. If that is mainly code, then the project probably needs to be broken up into a few different dll''s and stuff. I wouldn''t be too surprised if there was some sort of limit, because, if I remember correctly, the earliest versions of DOS had an exe size limit.

J.W.

Share this post


Link to post
Share on other sites
quote:
Original post by jwace81
I wouldn''t be too surprised if there was some sort of limit, because, if I remember correctly, the earliest versions of DOS had an exe size limit.



The largest executable you could have in DOS was 64 KB''s, and that was because it was a 16 bit OS. Now you''re able to (in theory) have an executable of over 2 GB''s. Although, an executable over 32 MB is huge! The largest I''ve seen is 35 MB (it worked in Win98 as well as Win2K), and that was a install file for a demo, I guess they didn''t want you to rip their data files.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
quote:
The largest I''ve seen is 35 MB (it worked in Win98 as well as Win2K), and that was a install file for a demo, I guess they didn''t want you to rip their data files.


The executable itself wouldn''t have been 35mb - self-contained installation programs are generally just a small program with a large datafile appended to them.

Share this post


Link to post
Share on other sites
There''s this video codec called BINK that can make your video into an .exe with the player built in.

http://www.radgametools.com

I''ve seen executable made with this that have sizes of 100+ mb.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:

i have a resource which i compile into the exe: it is a .raw file of about 4Mbytes, but i don''t know which is the equivalent of:
char *pMap = (char *)LockResource(LoadResource(NULL, FindResource(NULL, MAKEINTRESOURCE(IDR_RAW), "RAW")));
to let me read the .raw file instead of compiling it into the .exe



Well, easy, in plain C that would be (''size'' is your raw file size)

char *pMap = (char *) malloc( size );
fp = fopen( "MYFILE.RAW", "rb" );
fread( pMap, 1, size, fp );
fclose( fp );

Share this post


Link to post
Share on other sites
quote:

There''s this video codec called BINK that can make your video into an .exe with the player built in.

http://www.radgametools.com

I''ve seen executable made with this that have sizes of 100+ mb.



Remember what happened when you tried to run a windows program under DOS? a message of the likes of
"this program can only be run under windows, bugger off!!"

that was what is called a Stub, and its a quite small DOS/CONSOLE program that is appended at the beginin of all windows executables, so you can inform a user that the program wont run in DOS, so the computer doesnt crash trying to run the windows program.

the same principle is applied on self extracting EXE, video EXEs and so on, but this time the stub is actually the player or extractor that is applied to the Data segment.

now this will sound like an echo, but 32 MB for a different kind of exectable as the ones mentioned above is way too much, keep your big resources out of the executable (It just CANT be only code).

Share this post


Link to post
Share on other sites

  • Advertisement