Your wish is my command.DoubleDutch wrote:It would be good if there was a post compressor on the exe, but I'm sure that it can either be added as some kind of automatic tool.

(1) Download UPX (Win32 console version) from http://upx.sourceforge.net/
(2) Unzip it and put "upx.exe" in your PureBasic folder (next to PureBasic.exe).
(3) Compile the following single line to an exe called "AutoUPX.exe" and put it
somewhere easy and convenient to find (maybe also next to PureBasic.exe?):
Code: Select all
ShellExecute_(0,"",Chr(34)+#PB_Compiler_Home+"upx.exe"+Chr(34),"--best "+Chr(34)+ProgramParameter()+Chr(34),"",#SW_HIDE)
(5) Click the "New" button.
(6) Make a new entry that looks like the following, and click the "OK" button
when done. (Make sure the "Commandline" part matches the location where
you stored "AutoUPX.exe").

That's it! Now, whenever you create an executable, UPX will automatically compress it.
