changeset 1286:2d48532a074b project-file-rework

OSX build updates
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 25 Oct 2016 14:58:36 +0100
parents ac6db2ee1beb
children 6eac13265750
files deploy/osx/deploy.sh deploy/osx/paths.sh deploy/osx/sign.sh
diffstat 3 files changed, 32 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/osx/deploy.sh	Tue Oct 25 14:48:56 2016 +0100
+++ b/deploy/osx/deploy.sh	Tue Oct 25 14:58:36 2016 +0100
@@ -46,8 +46,11 @@
 
 echo
 echo "Copying in plugin load checker helper."
-cp checker/plugin-checker-helper.app/Contents/MacOS/plugin-checker-helper \
-    "$source"/Contents/MacOS/
+cp checker/plugin-checker-helper "$source"/Contents/MacOS/
+
+echo
+echo "Copying in plugin server."
+cp piper-vamp-server "$source"/Contents/MacOS/
 
 echo
 echo "Writing version $bundleVersion in to bundle."
@@ -73,8 +76,13 @@
 
 echo "Done"
 
+echo
+echo "Code-signing volume..."
+
 deploy/osx/sign.sh "$volume" || exit 1
 
+echo "Done"
+
 echo
 echo "Making dmg..."
 
--- a/deploy/osx/paths.sh	Tue Oct 25 14:48:56 2016 +0100
+++ b/deploy/osx/paths.sh	Tue Oct 25 14:58:36 2016 +0100
@@ -30,24 +30,29 @@
 done
 
 for fwk in $frameworks; do
-        find "$app.app" -type f -print | while read x; do
-                current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
-                [ -z "$current" ] && continue
-                echo "$x has $current"
-                relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
-                        -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
-                echo "replacing with relative path $relative"
-                install_name_tool -change "$current" "@loader_path/$relative" "$x"
-        done
+    find "$app.app" -type f -print | while read x; do
+	if [ -x "$x" ]; then
+            current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
+            [ -z "$current" ] && continue
+            echo "$x has $current"
+            relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
+				       -e 's,[^/]*/,../,g' \
+				       -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
+            echo "replacing with relative path $relative"
+            install_name_tool -change "$current" "@loader_path/$relative" "$x"
+	fi
+    done
 done
 
 find "$app.app" -type f -print | while read x; do
-    qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }')
-    if [ -n "$qtdep" ]; then
-	echo
-	echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:"
-	echo $qtdep
-	exit 1
+    if [ -x "$x" ]; then
+	qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }')
+	if [ -n "$qtdep" ]; then
+	    echo
+	    echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:"
+	    echo $qtdep
+	    exit 1
+	fi
     fi
 done
 
--- a/deploy/osx/sign.sh	Tue Oct 25 14:48:56 2016 +0100
+++ b/deploy/osx/sign.sh	Tue Oct 25 14:58:36 2016 +0100
@@ -1,5 +1,7 @@
 #!/bin/bash 
 
+set -eu
+
 # Execute this from the top-level directory of the project (the one
 # that contains the .app bundle).  Supply the name of the .app bundle
 # as argument