Hey, I’m trying to package GemRB as an AppImage and the creation itself is pretty standard and seems to work fine:
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DSTATIC_LINK=on
$ make -j4
$ make install DESTDIR=./AppDir
$ LD_LIBRARY_PATH=./AppDir/usr/lib/gemrb linuxdeploy-x86_64.AppImage --appdir=./AppDir --output=appimage
The image runs, but I can’t get it to find stuff packaged in AppDir. I know AppRun changes dir to usr, but using a relative path doesn’t work:
$ strace ./GemRB-b672fc7b7-x86_64.AppImage |& grep unhardcoded
access("../share/gemrb/unhardcoded", R_OK) = -1 ENOENT (No such file or directory)
access("../share/gemrb/unhardcoded", R_OK) = -1 ENOENT (No such file or directory)
stat("../share/gemrb/unhardcoded/shared", 0x7ffd51de6208) = -1 ENOENT (No such file or directory)
[ResourceManager/WARNING]: Invalid path given: ../share/gemrb/unhardcoded/shared (shared GemRB Unhardcoded data)
The AppDir has two shared dirs (to be fixed later / temporary), but only the first one is key:
$ ls AppDir/*/*
AppDir/etc/gemrb:
GemRB.cfg GemRB.cfg.noinstall.sample GemRB.cfg.sample
AppDir/share/gemrb:
GUIScripts minimal override unhardcoded
AppDir/usr/bin:
extend2da.py gemrb
AppDir/usr/lib:
libs...
AppDir/usr/share:
applications doc icons man pixmaps
So since it’s supposed to be running from AppDir/usr
, ../share/
should be correct. I also tried with share/
and files copied to the second share dir, and deeper backtracking (since the binary is in usr/bin), but nothing works. GemRB itself doesn’t change the CWD.
Any clues?