changeset 1907:82a8b639c9ec

Merge from branch appimage
author Chris Cannam
date Thu, 28 Jun 2018 21:24:42 +0100
parents a3cd06d89a45 (current diff) 2fcfc87aa65a (diff)
children abddb04d2bf3
files repoint-lock.json
diffstat 4 files changed, 146 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/.travis.yml	Thu Jun 28 12:53:05 2018 +0100
+++ b/.travis.yml	Thu Jun 28 21:24:42 2018 +0100
@@ -28,4 +28,13 @@
 
 script:
   - make -j3
-
+  - if [[ "$TRAVIS_OS_NAME" = "linux" ]] ; then ./deploy/linux/deploy-appimage.sh ; fi
+  
+deploy:
+  provider: bintray
+  on: appimage
+  file: deploy/linux/bintray.json
+  user: cannam
+  skip_cleanup: true
+  key:
+    secure: WKfxOEdkLeD2wGnEiuh+M8bIcdCxigPW8yQjrMsgUrdUAYPpJeJCYpOd4KxpXp/KPKFBRHW7ZiaVO82eitviJOp4jPc3gYxkKMNWDEAiMGcfVjKm4SsHwzSsMVFfhukRl2CTnBJBkPqH1rCeSIrr2jbHud8sOdjj4VIB4/UoT8NLoJQBMoRSleYNaI+h8noIoL1f4RLh2PMx5ffyFB4mvzpKhon3poxDj0U00eMdSm9S456oz7PaZbyQfskVPtc9MsovMw3Gx4OBoC+99t3rjQNvaVrVz3q+lhOYZa7fl960HCY8ZJxXogMFZ5GtH/OUvDwlp/usgjx2CLGNfyFM8xgVGOzu5F0uXyKfnIdhkmSdqoVVcybEOVyTkTGWZNMpgWgSHWyc/SaRxqAQpl00z0q+hqaDeqr0iWs/M+tAjUXevCcWj3OgR70tlz7y807P6QMb9PVYk1pSaeiQ4Z3ooT4fs9U2g04m8o3n0/ksFey2ZXa5px+0Aqt5Yp8PGxOQF+HKXgzq1e8HGl+rvYMO6Zx6a9ape7SlqnFozDKiXezhM+ZxXdjsikh+bVZ1aLHrKSD6o3Us+QTeX6LaMs1dIxRiqs5ZnWWUsfKvFOhIt5kgSpZ/RHZqZwF7VUts+3xPAPfVZVwpKfPyT1+4cEFw1gFRxnoA2mi+IcviPZ69NZI=
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/bintray.json	Thu Jun 28 21:24:42 2018 +0100
@@ -0,0 +1,28 @@
+{
+    "package": {
+        "name": "sonic-visualiser",
+        "repo": "sonic-visualiser",
+        "subject": "sonic-visualiser",
+        "desc": "Sonic Visualiser",
+        "website_url": "https://sonicvisualiser.org/",
+        "vcs_url": "https://code.soundsoftware.ac.uk/hg/sonic-visualiser",
+        "licenses": ["GPL-2.0"],
+        "public_download_numbers": false,
+        "public_stats": false
+    },
+
+    "version": {
+        "name": "Continuous",
+        "desc": "Uploaded from continuous integration server"
+    },
+
+    "files": [
+        {
+            "includePattern": "\./(SonicVisualiser-.*-x86_64\\.AppImage)",
+            "uploadPattern": "$1",
+            "matrixParams": { "override": 1 }
+        }
+    ],
+
+    "publish": true
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deploy-appimage.sh	Thu Jun 28 21:24:42 2018 +0100
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+set -eu
+
+program=sonic-visualiser
+checker=vamp-plugin-load-checker
+piper=piper-vamp-simple-server
+
+get_id() {
+    if [ -d .hg ]; then
+        hg id | sed 's/[+ ].*$//'
+    elif [ -d .git ]; then
+        git rev-parse --short HEAD
+    else
+        echo "WARNING: can't figure out revision from VCS metadata" 1>&2
+        echo "unknown"
+    fi
+}
+
+version=$(get_id)
+
+targetdir="${program}.AppDir"
+
+echo "Target dir is $targetdir"
+
+if [ -d "$targetdir" ]; then
+    echo "Target directory exists, not overwriting"
+    exit
+fi
+
+mkdir "$targetdir"
+
+mkdir -p "$targetdir"/usr/bin
+mkdir -p "$targetdir"/usr/lib
+
+cp "$program" "$checker" "$piper" "$targetdir"/usr/bin/
+
+ldd /usr/lib/x86_64-linux-gnu/libpulse.so.0 || true
+
+add_dependencies() {
+
+    local binary="$1"
+
+    for lib in $(ldd "$binary" | egrep '=> (/usr)?(/local)?/lib/' | \
+                     sed 's/^.*=> //' | sed 's/ .*$//'); do
+
+        base=$(basename "$lib")
+        if grep -v '^#' sv-dependency-builds/linux/appimage/excludelist |
+                grep -q "^$base$" ; then
+#            echo "excluding: $lib"
+            continue
+        fi
+        
+        mkdir -p "$targetdir/$(dirname $lib)"
+
+        if [ ! -f "$targetdir/$lib" ]; then
+
+            cp -Lv "$lib" "$targetdir/$lib"
+            chmod +x "$targetdir/$lib"
+
+            # copy e.g. /usr/lib/pulseaudio/libpulsecommon-*.so up a
+            # level to something in the load path
+            last_element=$(basename $(dirname "$lib"))
+            case "$last_element" in
+                lib) ;;
+                *-gnu) ;;
+                *) cp -v "$targetdir/$lib" "$targetdir/$(dirname $(dirname $lib))"
+            esac
+            
+            add_dependencies "$lib"
+            
+        fi
+    done
+}
+
+add_dependencies "$program"
+
+cp -v "$targetdir/usr/local/lib/"* "$targetdir/usr/lib/"
+
+qtplugins="gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen xcb"
+qtlibdirs="/usr/lib/x86_64-linux-gnu/qt5 /usr/lib/x86_64-linux-gnu/qt /usr/lib/qt5 /usr/lib/qt"
+
+for plug in $qtplugins; do
+    for libdir in $qtlibdirs; do
+        lib=$(find $libdir/plugins -name libq$plug.so -print 2>/dev/null || true)
+        if [ -n "$lib" ]; then
+            if [ -f "$lib" ]; then
+                mkdir -p "$targetdir/$(dirname $lib)"
+                cp -v "$lib" "$targetdir/$lib"
+                chmod +x "$targetdir/$lib"
+                add_dependencies "$lib"
+                break
+            fi
+        fi
+    done
+done
+
+cp "$program.desktop" "$targetdir/"
+
+cp "icons/sv-icon.svg" "$targetdir/"
+
+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"
+
--- a/repoint-lock.json	Thu Jun 28 12:53:05 2018 +0100
+++ b/repoint-lock.json	Thu Jun 28 21:24:42 2018 +0100
@@ -7,7 +7,7 @@
       "pin": "71202259002d"
     },
     "svgui": {
-      "pin": "13e17e61f898"
+      "pin": "be935f9b2ae6"
     },
     "svapp": {
       "pin": "d4c16eed673d"
@@ -37,7 +37,7 @@
       "pin": "d90244c003be"
     },
     "sv-dependency-builds": {
-      "pin": "a69c1527268d"
+      "pin": "f1a9b270e043"
     },
     "icons/scalable": {
       "pin": "1c6516ba7fc1"