annotate deploy/osx/deploy.sh @ 2423:0c3ea15c099d

Wording
author Chris Cannam
date Thu, 05 Dec 2019 09:00:27 +0000
parents 9ca6872a5d0f
children
rev   line source
Chris@409 1 #!/bin/bash
Chris@409 2
Chris@1077 3 set -e
Chris@1077 4
Chris@409 5 # Execute this from the top-level directory of the project (the one
Chris@2374 6 # that contains the .app bundle). Supply the name of the application
Chris@2374 7 # as argument.
Chris@2374 8 #
Chris@2374 9 # This now performs *only* the app deployment step - copying in
Chris@2374 10 # libraries and setting up paths etc. It does not create a
Chris@2374 11 # package. Use deploy-and-package.sh for that.
Chris@409 12
Chris@2374 13 app="$1"
Chris@2374 14 source="$app.app"
Chris@2374 15
Chris@2374 16 if [ -z "$app" ] || [ ! -d "$source" ] || [ -n "$2" ]; then
Chris@2374 17 echo "Usage: $0 <app>"
Chris@2374 18 echo " e.g. $0 MyApplication"
Chris@2374 19 echo " The app bundle must exist in ./<app>.app."
Chris@2374 20 echo " Version number will be extracted from version.h."
Chris@409 21 exit 2
Chris@409 22 fi
Chris@409 23
Chris@1077 24 set -u
Chris@1077 25
Chris@409 26 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
Chris@1055 27 stem=${version%%-*}
cannam@1648 28 stem=${stem%%pre*}
Chris@1055 29 case "$stem" in
cannam@1648 30 [0-9].[0-9]) bundleVersion="$stem".0 ;;
cannam@1648 31 [0-9].[0-9].[0-9]) bundleVersion="$stem" ;;
Chris@1055 32 *) echo "Error: Version stem $stem (of version $version) is neither two- nor three-part number" ;;
Chris@409 33 esac
Chris@409 34
Chris@409 35 echo
Chris@745 36 echo "Copying in frameworks and plugins from Qt installation directory."
Chris@745 37
Chris@745 38 deploy/osx/copy-qt.sh "$app" || exit 2
Chris@745 39
Chris@745 40 echo
Chris@514 41 echo "Fixing up paths."
Chris@514 42
Chris@514 43 deploy/osx/paths.sh "$app"
Chris@514 44
Chris@514 45 echo
Chris@1077 46 echo "Copying in qt.conf to set local-only plugin paths."
Chris@1077 47 echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*"
Chris@1077 48 echo "You probably want platforms/, accessible/ and imageformats/ subdirectories."
Chris@1077 49 cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf
Chris@1077 50
Chris@1077 51 echo
Chris@1499 52 echo "Copying in plugin load checker."
Chris@1499 53 cp checker/vamp-plugin-load-checker "$source"/Contents/MacOS/
cannam@1286 54
cannam@1286 55 echo
cannam@1286 56 echo "Copying in plugin server."
cannam@1345 57 cp piper-vamp-simple-server "$source"/Contents/MacOS/
Chris@1153 58
Chris@1153 59 echo
Chris@2374 60 echo "Copying in lproj directories containing InfoPlist.strings translation files."
Chris@2374 61 cp -r i18n/*.lproj "$source"/Contents/Resources/
Chris@2374 62
Chris@2374 63 echo
Chris@1077 64 echo "Writing version $bundleVersion in to bundle."
Chris@1077 65 echo "(This should be a three-part number: major.minor.point)"
Chris@1077 66
Chris@1077 67 perl -p -e "s/SV_VERSION/$bundleVersion/" deploy/osx/Info.plist \
Chris@1077 68 > "$source"/Contents/Info.plist
Chris@1077 69
Chris@1077 70 echo "Done: check $source/Contents/Info.plist for sanity please"