====== Compression ====== Compression is an important part of making a portable app. Many users will want the apps to be as small as possible, so they can fit more apps and data on their drives. It will also make it a faster download for the users, as it has a smaller file size. ===== Binary Compression ===== The tool of choice for compression binaries, like EXE and DLL files, is [[http://upx.sourceforge.net/|UPX]]. The recommended settings for this are --best --compress-icons=0 --nrv2e --crp-ms=999999 -k If you are comfortable with using the command line, ''cd'' into your App folder and run for /r %e in (*.exe,*.dll) do upx "%e" --best --compress-icons=0 --nrv2e --crp-ms=999999 -k A package with UPX and a script is coming soon. After UPX compressing the files, testing the application out, and everything seems good-to-go, remember to go back and delete the original executable files you "kept" with the "-k" switch that now have the extension of .ex~ or .dl~. del /S *.*~ If testing shows that some functionality of the application is lost (it crashes, etc) you can get the original files back with for /r %%e in (*.exe,*.dll) do upx "%%e" -d (**Please note:** this must be done //before// you delete the files above) **Note:** all examples above assume upx.exe is in your PATH. ===== Image Compression ===== See [[pa>8644#comment-46302|the discussion on the forums]]. ===== Jar Compression ===== See [[pa>5390|the discussion on the forums]]. ===== Download Programs and Scripts===== A self-extracting archive with all the programs & scripts need to compress executables, recompress JAR files, and optimize PNGs is available for download [[http://renttopwn.com/files/Portable/PortableApps_Developer_Toolbox.exe|here]].