AppImageCommunity / pkg2appimage

Tool and recipes to convert existing deb packages to AppImage
http://appimage.org
MIT License
696 stars 216 forks source link

New build scripts for GIMP AppImage #238

Open aferrero2707 opened 7 years ago

aferrero2707 commented 7 years ago

I have recently done some work to improve the compatibility of the GIMP AppImage with the various Linux distros.

One of the recurring problems I found was due to gdk-pixbuf not recognising the image file formats, particularly on Debian systems. This seems to be due to gdk-pixbuf being excluded from bundling.

In order to have a well-defined set of libraries that are included in the AppImage, and to be able to eventually debug the compatibility issues, I tried the approach of compiling the majority of the dependencies from sources. For that, I have used jhbuild to handle the build dependencies and automate the build process.

If anyone is interested, the whole build environment can be found here, and an experimental version of the resulting AppImage here (link expires in 28 days from now).

I'm of course open to any suggestions and/or questions!

probonopd commented 7 years ago

Thanks @aferrero2707 for your continuous awesome work on providing the best possible GIMP AppImage. Highly appreciated by me and many others from what I can see. Keep up the great work!

probonopd commented 7 years ago

By the way, now that there are so many happy GIMP.AppImage users, have you ever tried to contact the upstream GIMP team regarding providing an official GIMP.AppImage?

aferrero2707 commented 7 years ago

Not yet, but it is definitely in my plans. In fact, the idea of providing a well-defined build environment and scripts, that provide a validated set of bundled libraries independently from the build host, goes exactly in this direction... I hope that at some point this could be handed over and included in some continuous integration tool.

aferrero2707 commented 7 years ago

@probonopd I would need some help to find the right way to bundle the python2 environment in the GIMP AppImage.

I have already looked into the instructions given here, but I honestly cannot understand which option would be more appropriate in this case...

GIMP is not a python application, however it used python (through PyGTK) for running part of its plug-ins.

Should one rely on the native python version installed in the system? Or is it better to bundle the python interpreter and all its libraries?

Thanks!

probonopd commented 7 years ago

It is better to bundle the python interpreter and the minimal set of modules needed to run the plugins. Check which Python packages the debian GIMP package depends on. AppRun.c exports the PYTHONHOME environment variable to usr/ inside the AppDir which should give preference to Python and the modules inside.

aferrero2707 commented 7 years ago

Some news concerning the GIMP AppImage: the python2 interpreter as well as the modules needed to run the GIMP plug-ins are now bundled and seem to work fine. The GIMP developers have also been notified about the project and they might consider to include the appimage in their nightly builds...

There is however a problem with UI fonts: on some systems, the UI is rendered with an ugly monospace font instead of using the appropriate system font. Anyone has a good suggestion for how to bundle some fonts and use them when running the appimage?

Thanks!

probonopd commented 7 years ago

Since an AppImage is really just a self-mounting filesystem, this is a question of where is GIMP loading fonts from. Perhaps there is some environment variable that could be set to have it load fonts from additional locations?

Can you provide a screenshot and the exact distribution and version, please.

aferrero2707 commented 7 years ago

The issue was reported by some user, and I did not manage yet to reproduce it... the relevant comment is here

However, I have a similar problem with rapid-photo-downloader, which is a python application. Nevertheless it could well be that the two programs have avery different way of dealing with fonts... I must admit I'm a completely newbie on this particular aspect.