UPX before Nsis compression
This is a good question :D
Is there a way to compress our main apps with UPX before
the nsis compress it during compilation?
In that way will be smaller.
Thanks :up:
Archive: UPX before Nsis compression
UPX before Nsis compression
This is a good question :D
Is there a way to compress our main apps with UPX before
the nsis compress it during compilation?
In that way will be smaller.
Thanks :up:
try this
!system "[path_to_upx]\upx.exe file(s)"
on top of the script.
Compress the installer header itself
There is an example in the nsisconf.nsh file, you have to use !packhdr (!system won't work because it's executed before generating the file).
Compress files packaged by the installer
Use !system to call UPX
Note
UPX can give problems with older virus scanners, so you should only use it if those few KB's are really important.
Ok, done :D
[edit]!system "C:\path\upx.exe -9 app.exe" [/edit]
:up:
For extreme packing with UPX (may take a while) try:
--best --crp-ms=999999 --compress-icons=0 --nrv2d
Can you write a example like *mine*:
"C:\path\upx.exe -9 app.exe"
:D
Sure.. and to make it extra fun we'll use !defines. joy.
;---- Defines --------
!define AppDIR "C:\Progra~1\MyApp"
!define AppEXEName "MyApp.exe"
!define UPXDir "C:\Progra~1\UPX"
!define UPXEXENameAndParams "upx.exe --best --crp-ms=999999 --compress-icons=0 --nrv2d"
;--------------------
!System ${UPXDir}\${UPXEXENameAndParams} ${AppDIR}\${AppEXEName}"
;--------------------
!System seems to be limited to 8 chars (DOS).. so don't forget to truncate the dir & filenames with ~#.
;--- (and without !defines :() ---
!System "C:\Progra~1\UPX\UPX.exe --best --crp-ms=999999 --compress-icons=0 --nrv2d C:\Progra~1\MyApp\MyApp.exe"
Lastly, please don't compress your icons when using UPX. Be good and use "--compress-icons=0" along with your command-line parameters. :up:
done :D a little small :up: thanks dude
You're mighty welcome, dude.