Pack EXE with UPX from inside UESTUDIO

Pack EXE with UPX from inside UESTUDIO

1
NewbieNewbie
1

    Aug 10, 2011#1

    Can anyone tell me how to configure UESTUDIO to automatically compress the generated EXE with UPX.
    Thanks
    Paul

    6,688587
    Grand MasterGrand Master
    6,688587

      Aug 11, 2011#2

      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.