changeset 2057:c0afaca5a029

Experiment with a custom AppRun that doesn't have to chdir
author Chris Cannam
date Thu, 01 Nov 2018 10:43:17 +0000 (2018-11-01)
parents c1745df7e211
children ed3f1b5094ad
files deploy/linux/AppRun deploy/linux/deploy-appimage.sh
diffstat 2 files changed, 28 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/AppRun	Thu Nov 01 10:43:17 2018 +0000
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+mydir=$(dirname "$0")
+case "$mydir" in
+    /*) ;;
+    *) mydir="$PWD/$mydir";;
+esac
+
+echo "AppImage root is $mydir"
+
+PATH="$mydir/usr/bin:$mydir/bin:$PATH"
+export PATH
+
+LD_LIBRARY_PATH="$mydir/usr/lib:$mydir/usr/lib/x86_64-linux-gnu:$mydir/usr/lib64:$LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH
+
+QT_PLUGIN_PATH="$mydir/usr/lib/qt5/plugins/:$mydir/usr/lib/i386-linux-gnu/qt5/plugins/:$mydir/usr/lib/x86_64-linux-gnu/qt5/plugins/:$mydir/usr/lib32/qt5/plugins/:$mydir/usr/lib64/qt5/plugins/:$QT_PLUGIN_PATH"
+export QT_PLUGIN_PATH
+
+XDG_DATA_DIRS="$mydir/usr/share:$XDG_DATA_DIRS:/usr/local/share:/usr/share"
+export XDG_DATA_DIRS
+
+GSETTINGS_SCHEMA_DIR="$mydir/usr/share/glib-2.0/schemas:$GSETTINGS_SCHEMA_DIR"
+export GSETTINGS_SCHEMA_DIR
+
+exec "$mydir/usr/bin/sonic-visualiser" "$@"
--- a/deploy/linux/deploy-appimage.sh	Thu Nov 01 10:19:43 2018 +0000
+++ b/deploy/linux/deploy-appimage.sh	Thu Nov 01 10:43:17 2018 +0000
@@ -106,7 +106,8 @@
 cp "icons/sv-icon.svg" "$targetdir/"
 cp "icons/sonic-visualiser.svg" "$targetdir/"
 
-cp sv-dependency-builds/linux/appimage/AppRun-x86_64 "$targetdir/AppRun"
+cp "deploy/linux/AppRun" "$targetdir/"
+
 chmod +x "$targetdir/AppRun"
 
 # Do this with a separate extraction step, so as to make it work even