Chris@409: #!/bin/bash Chris@409: Chris@1077: set -e Chris@1077: Chris@409: # Execute this from the top-level directory of the project (the one Chris@2374: # that contains the .app bundle). Supply the name of the application Chris@2374: # as argument. Chris@2374: # Chris@2374: # This now performs *only* the app deployment step - copying in Chris@2374: # libraries and setting up paths etc. It does not create a Chris@2374: # package. Use deploy-and-package.sh for that. Chris@409: Chris@2374: app="$1" Chris@2374: source="$app.app" Chris@2374: Chris@2374: if [ -z "$app" ] || [ ! -d "$source" ] || [ -n "$2" ]; then Chris@2374: echo "Usage: $0 " Chris@2374: echo " e.g. $0 MyApplication" Chris@2374: echo " The app bundle must exist in ./.app." Chris@2374: echo " Version number will be extracted from version.h." Chris@409: exit 2 Chris@409: fi Chris@409: Chris@1077: set -u Chris@1077: Chris@409: version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` Chris@1055: stem=${version%%-*} cannam@1648: stem=${stem%%pre*} Chris@1055: case "$stem" in cannam@1648: [0-9].[0-9]) bundleVersion="$stem".0 ;; cannam@1648: [0-9].[0-9].[0-9]) bundleVersion="$stem" ;; Chris@1055: *) echo "Error: Version stem $stem (of version $version) is neither two- nor three-part number" ;; Chris@409: esac Chris@409: Chris@409: echo Chris@745: echo "Copying in frameworks and plugins from Qt installation directory." Chris@745: Chris@745: deploy/osx/copy-qt.sh "$app" || exit 2 Chris@745: Chris@745: echo Chris@514: echo "Fixing up paths." Chris@514: Chris@514: deploy/osx/paths.sh "$app" Chris@514: Chris@514: echo Chris@1077: echo "Copying in qt.conf to set local-only plugin paths." Chris@1077: echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*" Chris@1077: echo "You probably want platforms/, accessible/ and imageformats/ subdirectories." Chris@1077: cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf Chris@1077: Chris@1077: echo Chris@1499: echo "Copying in plugin load checker." Chris@1499: cp checker/vamp-plugin-load-checker "$source"/Contents/MacOS/ cannam@1286: cannam@1286: echo cannam@1286: echo "Copying in plugin server." cannam@1345: cp piper-vamp-simple-server "$source"/Contents/MacOS/ Chris@1153: Chris@1153: echo Chris@2374: echo "Copying in lproj directories containing InfoPlist.strings translation files." Chris@2374: cp -r i18n/*.lproj "$source"/Contents/Resources/ Chris@2374: Chris@2374: echo Chris@1077: echo "Writing version $bundleVersion in to bundle." Chris@1077: echo "(This should be a three-part number: major.minor.point)" Chris@1077: Chris@1077: perl -p -e "s/SV_VERSION/$bundleVersion/" deploy/osx/Info.plist \ Chris@1077: > "$source"/Contents/Info.plist Chris@1077: Chris@1077: echo "Done: check $source/Contents/Info.plist for sanity please"