changeset 1909:12b96d6b1d66

Toward getting appimage build working in Docker
author Chris Cannam
date Fri, 29 Jun 2018 10:31:17 +0100
parents abddb04d2bf3
children 310670d04abe
files deploy/linux/deploy-appimage.sh deploy/linux/docker/build.sh
diffstat 2 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/linux/deploy-appimage.sh	Fri Jun 29 09:34:42 2018 +0100
+++ b/deploy/linux/deploy-appimage.sh	Fri Jun 29 10:31:17 2018 +0100
@@ -78,7 +78,12 @@
 cp -v "$targetdir/usr/local/lib/"* "$targetdir/usr/lib/"
 
 qtplugins="gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen xcb"
-qtlibdirs="$QTDIR /usr/lib/x86_64-linux-gnu/qt5 /usr/lib/x86_64-linux-gnu/qt /usr/lib/qt5 /usr/lib/qt"
+qtlibdirs="/usr/lib/x86_64-linux-gnu/qt5 /usr/lib/x86_64-linux-gnu/qt /usr/lib/qt5 /usr/lib/qt"
+
+QTDIR=${QTDIR:-}
+if [ -n "$QTDIR" ]; then
+    qtlibdirs="$QTDIR $qtlibdirs"
+fi
 
 for plug in $qtplugins; do
     for libdir in $qtlibdirs; do
@@ -102,5 +107,9 @@
 cp sv-dependency-builds/linux/appimage/AppRun-x86_64 "$targetdir/AppRun"
 chmod +x "$targetdir/AppRun"
 
-ARCH=x86_64 sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage "$targetdir" "SonicVisualiser-$version-x86_64.AppImage"
+# Do this with a separate extraction step, so as to make it work even
+# in situations where FUSE is unavailable like in a Docker container
+export ARCH=x86_64
+sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage --appimage-extract
+./squashfs-root/AppRun "$targetdir" "SonicVisualiser-$version-x86_64.AppImage"
 
--- a/deploy/linux/docker/build.sh	Fri Jun 29 09:34:42 2018 +0100
+++ b/deploy/linux/docker/build.sh	Fri Jun 29 10:31:17 2018 +0100
@@ -22,8 +22,12 @@
 dockerfile="Dockerfile_v${version}_${platform}"
 
 if [ ! -f "$dockerdir/$dockerfile" ]; then
-    echo "No matching docker file $dockerfile found in $dockerdir"
-    exit 1
+    echo "No matching docker file $dockerfile found in $dockerdir, trying again without version"
+    dockerfile="Dockerfile_${platform}"
+    if [ ! -f "$dockerdir/$dockerfile" ]; then
+        echo "No matching docker file $dockerfile found in $dockerdir either"
+        exit 1
+    fi
 fi
 
 dockertag="cannam/sonic-visualiser-$platform"