Pack EXE with UPX from inside UESTUDIO

Building, compiling, or debugging issues

Pack EXE with UPX from inside UESTUDIO

Postby paulesimm » Wed Aug 10, 2011 1:17 pm

Can anyone tell me how to configure UESTUDIO to automatically compress the generated EXE with UPX.
Thanks
Paul
paulesimm
Newbie
 
Posts: 1
Joined: Wed Aug 10, 2011 1:06 pm

Re: Pack EXE with UPX from inside UESTUDIO

Postby Mofi » Thu Aug 11, 2011 2:26 am

Open Build - Select Compiler and press the button Edit Configuration. If you want packing the generated EXE with UPX only for the current project and not for all projects using this compiler configuration, you should press the button Make Configuration Local (Save in Project Directory).

Now scroll down to section [Build]. You should see there a Cmd0= command which builds the EXE. Insert below the command

Cmd1=path to upx.exe\upx.exe --best $T

You can use any upx parameter you want like --best. $T references the generated EXE (usually with a relative path to project directory). If the path to upx.exe contains a space character, it is better to use

Cmd1=""path to upx.exe\upx.exe" --best $T"

Please note that UPX is now always executed even if the build process failed because of a mistake in one of the source code files, but the target EXE is still available from a previous successful build.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Build / Compile / Debug