Hi,
I need to be able to specify the compression method used from command-line so for example my debug builds will use no compression and build faster and my release builds will use lzma which will add 10 seconds to my build time.
Is this currently possible or should I file a RFE?
Thanks,
Gili
Setting cmopression method from command-line
4 posts
Put this at the top of your script:
SetCompressor "${comptype}"
When you compile, pass in "... /DCOMPTYPE={zlib,bzip2,lzma} ..."
SetCompressor "${comptype}"
When you compile, pass in "... /DCOMPTYPE={zlib,bzip2,lzma} ..."
Many thanks 😉 I am consistently impressed with how flexible NSIS is!
Gili
Gili
makensis.exe has a few commands that you might be able to use:
For a complete list of makensis commands, see the NSIS help file.
edit: Or dienjd's idea works too!
- Use the /X command to specify a command
EXAMPLE: /XSetCompress off - Use the /D command to !define 'debug'
EXAMPLE: in command line, use /Ddebug. Then in your script, you can use:
!ifdef debug
SetCompress off
!else
SetCompressor zlib
!endif
For a complete list of makensis commands, see the NSIS help file.
edit: Or dienjd's idea works too!