appimagetool don't bundle `immodules.cache` neither set `GTK_IM_MODULE_FILE`
This function is actually incomplete for pratical purposes: https://github.com/probonopd/go-appimage/blob/426deeeea1da0929c485a306a8ee7fc525551a72/src/appimagetool/appdirtool.go#L807
It's "incomplete" because immodules.cache file isn't copied and GTK_IM_MODULE_FILE isn't set in AppRun. So, the AppImage can have problems of compatibility with certain distros, according to my tests.
In GIMP testing AppImage (the word "testing" here means that we only use the AppImage for testing right now) actually needs to manually copy the file and adjusting its paths: https://gitlab.gnome.org/GNOME/gimp/-/blob/master/build/linux/appimage/bundle-gimp-appimage.sh?ref_type=heads#L171.
Reproduction steps:
- Use
appimagetool*.appimage deploy ...over a GTK based app - Observes lack of immodules.cache
Thanks for letting us know @brunvonlope. Most likely we need to handle immodules.cache in
https://github.com/probonopd/go-appimage/blob/6866993bd2a1b8b182a5f27d9f913dbd5c7aec45/src/appimagetool/appdirtool.go#L625-L675
and export GTK_IM_MODULE_FILE in AppRun.
To anyone reading this, a pull request would be highly appreciated. Thanks!