Closed probonopd closed 4 years ago
Thanks for your interest! That sounds great.
Mostly copy&paste from https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci. Pull request coming.
It's almost done but I am getting
me@host:~$ Downloads/DungeonRush-3390567-x86_64.AppImage
Effect #0: Death loaded
Effect #1: Blink (white) loaded
Effect #2: Vanish (30fm) loaded
Unable to load image res/drawable/0x72_DungeonTilesetII_v1_3.png! SDL_image Error: Couldn't open res/drawable/0x72_DungeonTilesetII_v1_3.png
Segmentation fault
The game is currently loading res/
from the current directory the user is in, rather from the directory in which the game main binary is located. Can you change that? E.g., compute the location of res/
based on /proc/self/exe
.
Something like this: https://github.com/aardappel/treesheets/commit/d0b4b60c270f73397ddf75ccb7759ec8d6b94765
Loading from the directory of binary makes sense to me. However, /proc/self/exe
is not portable and I'm still looking for a way to do that.
I think there's no cross-platform trivial way to get the directory of current executable. The only way seems feasible is to #define
and #ifdef
around to make the program portable.
ref: Finding current executable's path without /proc/self/exe
I don't know about how appimage works. Is it possible to make the entry point a shell script and then cd /path/to/bin && ./exe
?
Also note that the binary has been renamed in https://github.com/Rapiz1/DungeonRush/pull/12
Is it possible to make the entry point a shell script and then cd /path/to/bin && ./exe?
Yes, but it's a workaround:
Hi @Rapiz1. Would you like me to send a pull request that would make an AppImage?
Reference: https://discourse.appimage.org/t/how-to-add-a-system-envrionment-variable-in-an-appimage/1692