The problem was that relative paths would not work, since AppRun
(part of the AppImage) would chdir() into the AppImage mount point
(/tmp/.mount_xxxxx/usr), which would make glib's g_get_current_dir() return
that path, so all glib functions calling that would do the wrong thing.
For now, we fix this by patching away the chdir() in AppRun.
Details:
https://github.com/AppImage/AppImageKit/issues/172#issuecomment-
229993161
This fixes bug #1300.
$ cd $HOME
$ git clone https://github.com/AppImage/AppImageKit
$ cd AppImageKit
+
+Apply chdir.patch (required to fix sigrok bug #1300), then build:
+
+ $ patch -p1 < chdir.patch
$ ./build.sh
Temporary workaround for an AppImageKit issue:
--- /dev/null
+--- a/src/AppRun.c.orig 2018-10-11 20:59:25.978078674 +0200
++++ b/src/AppRun.c 2018-10-11 20:59:37.082078674 +0200
+@@ -156,9 +156,11 @@ int main(int argc, char *argv[]) {
+ size_t appdir_s = strlen(appdir);
+ char *usr_in_appdir = malloc(appdir_s + 5);
+ snprintf(usr_in_appdir, appdir_s + 5, "%s/usr", appdir);
++#if 0
+ ret = chdir(usr_in_appdir);
+ if (ret != 0)
+ die("Could not cd into %s\n", usr_in_appdir);
++#endif
+
+ // set environment variables
+ char *old_env;