phpdesktop compression

Hi Matt,

There is a “minified” version of phpdesktop available, it has smaller PHP binaries. See:
100 MB – phpdesktop-chrome-31.6-php-5.4.24
71 MB – phpdesktop-chrome-31.6-php-5.4.24-minified
104 MB – phpdesktop-chrome-31.6-php-5.5.8
71 MB – phpdesktop-chrome-31.6-php-5.5.8-minified
In the PHP minified version many extensions were removed, also the “icu” dlls were removed that add unicode support to PHP. This makes the PHP binaries smaller by 33 MB by minifiying only PHP 5.5.8.
The phpdesktop binaries itself are only 0.5 MB (the phpdesktop-chrome.exe file).
Most of the size is taken by the Chromium/CEF binaries. These are the *.dll and *.pak files in the root directory (cef.pak, d3dcompiler_43.dll, etc.). See the CEF README.txt file to know which of these files are required and which are optional, it also explains which files provide what features:
https://code.google.com/p/phpdesktop/source/browse/phpdesktop-chrome/cef/README.txt
You can remove the following files if you do not need Html5 Audio/Video support, webgl, CSS 3d, nor developer tools:
cef.pak
d3dcompiler_43.dll
d3dcompiler_46.dll
devtools_resources.pak
ffmpegsumo.dll
libEGL.dll
libGLESv2.dll
This will save you 13 MB and will make phpdesktop in total only 59 MB. After compressing using 7z algorithm with Ultra/Lzma compression this will give you a 19 MB compressed file for distribution (both Inno Setup and NSIS installer support 7z compression).
There are still 10 extensions in the PHP minified binaries, they take about 3 MB in size, you can remove them as well if you don’t need them. If you don’t need SSL/HTTPS then you you can remove libeay32.dll and ssleay32.dll files and save save some more space. After these changes it will be 55 MB uncompressed and 17 MB compressed.
If uncompressed size matters to you then you could use a tool named UPX (http://en.wikipedia.org/wiki/UPX , http://upx.sourceforge.net/). It can reduce size of dll files by about 60%. After running upx on libcef.dll, icudt.dll and php5.dll I have reduced the size from 55 MB uncompressed to 22 MB uncompressed (uncompressed in the sense that all files reside freely on hard drive and not inside an archive file).
There is also phpdesktop MSIE version with Internet Explorer engine that gives you smaller binaries (about 5 MB after compression), but has its caveats, it depends on IE version installed on user’s computer.
Best regards,
Czarek
https://groups.google.com/forum/#!msg/phpdesktop/G3hb0TeoPGA/AmYGUEj6ldAJ