changeset 2377:995a4014a5c8

Further Mac deployment updates
author Chris Cannam
date Wed, 16 Oct 2019 15:29:37 +0100
parents 06246370f210
children d022c02b82b7
files deploy/osx/build-and-package.sh deploy/osx/deploy-and-package.sh deploy/osx/notarize.sh sv.pro
diffstat 3 files changed, 67 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/osx/build-and-package.sh	Wed Oct 16 15:29:37 2019 +0100
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# This script is very specific to certain Xcode and Qt versions -
+# review before running, or do a standard build and a deployment with
+# deploy-and-package.sh instead
+
+set -eu
+
+app="Sonic Visualiser"
+
+version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
+
+volume="$app"-"$version"
+dmg="$volume".dmg
+compatdmg="$volume-osx-10.7.dmg"
+
+./repoint install
+
+echo
+echo "Rebuilding for current macOS..."
+echo
+
+rm -rf .qmake.stash
+$HOME/Qt/5.13.1/clang_64/bin/qmake -r
+make clean
+make -j3
+deploy/osx/deploy-and-package.sh
+
+echo
+echo "Done, images are in $dmg and $compatdmg"
+echo
+
--- a/deploy/osx/deploy-and-package.sh	Wed Oct 16 15:29:03 2019 +0100
+++ b/deploy/osx/deploy-and-package.sh	Wed Oct 16 15:29:37 2019 +0100
@@ -1,6 +1,19 @@
 #!/bin/bash
 
-set -eu
+# Run this from the project root, without arguments, or with the
+# single argument --no-notarization to skip the notarize step
+
+set -e
+
+notarize=yes
+if [ "$1" = "--no-notarization" ]; then
+    notarize=no
+elif [ -n "$1" ]; then
+    echo "Usage: $0 [--no-notarization]"
+    exit 2
+fi
+
+set -u
 
 app="Sonic Visualiser"
 
@@ -9,7 +22,7 @@
 source="$app.app"
 volume="$app"-"$version"
 target="$volume"/"$app".app
-dmg="$app"-"$version".dmg
+dmg="$volume".dmg
 
 if [ -d "$volume" ]; then
     echo "Target directory $volume already exists, not overwriting"
@@ -21,6 +34,11 @@
     exit 2
 fi
 
+if [ "$notarize" = no ]; then
+    echo
+    echo "Note: The --no-notarization flag is set: won't be submitting for notarization"
+fi
+
 echo
 echo "(Re-)running deploy script..."
 
@@ -66,9 +84,14 @@
 
 codesign -s "Developer ID Application: Chris Cannam" -fv "$dmg"
 
-echo
-echo "Submitting dmg for notarization..."
+if [ "$notarize" = no ]; then
+    echo
+    echo "The --no-notarization flag was set: not submitting for notarization"
+else
+    echo
+    echo "Submitting dmg for notarization..."
 
-deploy/osx/notarize.sh "$dmg" || exit 1
+    deploy/osx/notarize.sh "$dmg" || exit 1
+fi
 
 echo "Done"
--- a/sv.pro	Wed Oct 16 15:29:03 2019 +0100
+++ b/sv.pro	Wed Oct 16 15:29:37 2019 +0100
@@ -19,7 +19,6 @@
 
 !win32 {
     PRE_TARGETDEPS += $$PWD/libbase.a
-    QMAKE_POST_LINK += cp checker/vamp-plugin-load-checker .
 }
 
 linux* {
@@ -81,3 +80,10 @@
         main/SVSplash.cpp \
         main/PreferencesDialog.cpp 
 
+macx* {
+    QMAKE_POST_LINK += cp checker/vamp-plugin-load-checker . && deploy/osx/deploy.sh $$shell_quote(Sonic Visualiser)
+}
+
+linux {
+    QMAKE_POST_LINK += cp checker/vamp-plugin-load-checker .
+}