Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Win32 how big custom resource can be?

Trying to create something similar to SFX (self extract installer), I was including the setup files in one exe using custom resource in visual c++. When the size of the setup files reached over ~900 MB, the linker cannot generate an exe with the resources embedded. Strange thing is that the linker does generate an exe without any warnings. The exe generated is an statically linked MFC App (main app of the exectuable). However, non of the resource is included. I have watched the exe size during the linking from a console. It was showing 900 MB for awhile befored dropped to the 2MB exe in the end. If I removed some of the files (say total size will be 500MB), the exe is generated all OK with all the resources embedded. Is there a pratical size limit for the custom resource? Note that the final size of the executable is about 1GB which is way less that 2GB win32 app can address. So I am wondering is this a vc++ 2010 bug or feature? BTW, I also used /expectedoutputsize trick. But it does not help except the linking is much faster with a bigger expected output size.

like image 934
Zhichao Avatar asked Jul 25 '12 18:07

Zhichao


1 Answers

Belated answer. Might be helpful to others. May be not an answer to your question, but this may be a solution to your problem. Check for 'Bitrock installer'. This also gives Self Extract Installer. I used it successfully in many of my projects for deployment.

like image 184
prabhakaran Avatar answered Oct 23 '22 23:10

prabhakaran