Archive: CONFIG.H? Header? Size?


Hi again,

On running MakeNSIS I am told that the available 'compiled-in functions' are 'NSIS_CONFIG_UNINSTALL_SUPPORT, NSIS_SUPPORT_NETSCAPEPLUGINS, NSIS_SUPPORT_ACTIVEXREG'.

I know that none of my projects will use the Netscape and ActiveX things, so how can I remove that functionality and make my headers smaller?

And if I then decide that I also won't need uninstall support, will I be able to do that easily?

The documentation mentions CONFIG.H a total of two times, but says nothing about what to do with it! Any help would be greatly appreciated!

Thanks guys!


you need to comment the features you don't need, and then rebuild the nsis project with Visual C++.


Okay, thanks RM.

Bugger that, I don't even have C++, nor do I want to fiddle around with the code!

Perhaps this could be a feature? A few commands that disable this for you when you compile?

I guess I can't really complain about the size anyway - it's great at 40k! Greedy, I guess. :)


Okay, well, I installed the soruce and had a look at the CONFIG.H file, and found out that removing Netscape, ActiveX and BGBG functionality, only took away about 2.3K from the header. So it's not worth it, really.


Did you recompile NSIS after you changed config.h?


A much, much better solution is to use UPX instead of bothering to compile stuff out.

The total header size is 20k after UPX, and you save only about 1kb by commenting stuff out. Download UPX here:
http://wildsau.idv.uni-linz.ac.at/mfx/upx.html

Use it with the following line in a .NSI file:
!packhdr "temp.dat" "d:\upx\upx -qq --best --compress-icons=1 temp.dat"

Check the NSIS help file, there's a little more documentation there (but not much).


Well, Rob, I don't have Visual C++, and I wouldn't have bothered, too much hassle for 2k.

Thanks, Edgewater. I've been using UPX recently after finding out about it. But just wondering, since there's probably only one icon, what's the point of --compress-icons=1?