wxPHP AppImage

Created by: jgmdev
Date: 06/25/2016 @ 12:24:06 pm
Views: 3842

So with all the fuzz about Canonical Snaps and RedHat Flatpak I also learned about AppImage. Since I haven't found the time to port wxPHP to PHP 7 I decided it was a good idea to create an appimage of it that includes latest php 5 version which is 5.6.23 at the time of writing this. The advantage here is that in this way we don't have to care about distro specific packaging and the appimage should work on most of the existing linux distributions, also I don't have to worry for the moment about PHP 7 since the appimage embeds a copy of PHP 5.

It is recommended to compile the AppImage on a old distro but since I have ArchLinux installed I decided to give it a try on it. After playing a bit with the final dependencies I got it working on Ubuntu 14.04 and Ubuntu 16.04 which isn't bad given that ArchLinux has newer packages/libraries.

I created a new repository (https://github.com/wxphp/appimage) to store the shell script that generates the appimage and all related files so if you have any suggestions to improve it and make the resulting appimage more portable please feel free to help.

I compiled two versions of the wxPHP AppImage, one that uses gtk2 and other that uses gtk3, both are for 64bits OS. For the gtk2 version you will need to have gtk2 libraries installed on your system and the same applies for gtk3 version. I tried to include the gtk2/gtk3 libs on the appimage itself but they weren't compatible on older distros, but using the distro provided libs seemed to work fine (at least on ubuntu 14.04 and 16.04).

For best distro compatibility I recommend the gtk2 version. The gtk3 version worked fine in Ubuntu 14.04 but not on Ubuntu 16.04 because its gtk3 lib contains additional symbols for the Mir display server. In any case you can try both and stick with the one that works for you or help improve the appimage packaging script to make it more portable. Finally here are the links to download:



Once you unpackage the .tar.xz packages you will have a wxphp-gtk2 or wxphp-gtk3 file, if they aren't executable then:

chmod 0755 wxphp-gtk*

You can double click them and a shell terminal should launch like this:


Also when executing them the files will show the wxphp icon:


You can invoke the files from cli like a normal php-cli binary:


I hope in the future to finish the new PHP extension generator (PEG) and get wxPHP working on PHP 7, but for the moment this is what I got, Enjoy!