Shadowsocks-Qt5 AppImage

Applications on Linux tend to be distributed by distributions, managed/packaged by distribution’s package managers. For upstream application developers, one way to ship the software to users is to create binary packages for mainstream Linux distributions. Don’t get me wrong, it is not too difficult, given we’ve now had Launchpad for Ubuntu, Copr for Fedora, OBS for OpenSUSE. Arch Linux has AUR, although that is just recipe collection.

By chance, I’ve seen Krita is shipping their software using AppImage. My attention was drawn over immediately. It looks very promising, given how many upstream apps are packaged in AppImage and how easy-to-use it is. The best part is that AppImage doesn’t require any tools (unlike flatpak which needs OS support). It basically acts similarly to the way how people ship applications on macOS, in bundles! Hence, there you go, my journey to pack Shadowsocks-Qt5 in AppImage.

Since you can easily find well documented procedures in their Wiki pages, I won’t bother logging it step by step but only a few hiccups I got. The tool I’m using is linuxdeployqt along with the vanilla AppImageKit. Both tools are distributed in AppImage format, how convenient! 🙂

As recommended, you should use a relatively old Linux distribution to make your AppImage file as compatible as possible (apps linked against newer GLIBC won’t be able to run with older GLIBC). I’ve chosen Debian Jessie as the host OS which has very similar software suite as Ubuntu Trusty does (so I can use Travis CI in the future to automate AppImage build).

One hiccup I got was a symbol error from libharfbuzz.so, see this issue. After a few days Googling, I found a similar issue which points to freetype and harfbuzz themselves. So I just tried to remove libfreetype.so and libharfbuzz.so from appdir directory, and packed with appimagetool, voila it works! I have to point out that linuxdeployqt will always try to put those necessary libraries into appdir when you use it to pack AppImage. In the end, I had to replace the last step with vanilla appimagetool. In another words, what I did was

linuxdeployqt ./appdir/usr/share/applications/shadowsocks-qt5.desktop -bundle-non-qt-libs
rm -f ./appdir/usr/lib/libharfbuzz.so.0
rm -f ./appdir/usr/lib/libfreetype.so.6
appimagetool ./appdir

An experimental AppImage file has been uploaded to the releases page, please give it try, especially if your Linux distribution doesn’t have Shadowsocks-Qt5 in the repository.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s