Chris@62: #!/bin/bash Chris@62: Chris@439: set -e Chris@437: Chris@62: # Execute this from the top-level directory of the project (the one Chris@619: # that contains the .app bundle). Supply the name of the application Chris@619: # as argument. Chris@619: # Chris@619: # This now performs *only* the app deployment step - copying in Chris@619: # libraries and setting up paths etc. It does not create a Chris@619: # package. Use deploy-and-package.sh for that. Chris@62: Chris@619: app="$1" Chris@619: source="$app.app" Chris@619: Chris@619: if [ -z "$app" ] || [ ! -d "$source" ] || [ -n "$2" ]; then Chris@619: echo "Usage: $0 " Chris@619: echo " e.g. $0 MyApplication" Chris@619: echo " The app bundle must exist in ./.app." Chris@619: echo " Version number will be extracted from version.h." Chris@62: exit 2 Chris@62: fi Chris@62: Chris@439: set -u Chris@439: Chris@62: version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` Chris@437: stem=${version%%-*} Chris@437: case "$stem" in Chris@437: [0-9].[0-9]) bundleVersion="$stem".0 ;; Chris@437: [0-9].[0-9].[0-9]) bundleVersion="$stem" ;; Chris@437: *) echo "Error: Version stem $stem (of version $version) is neither two- nor three-part number"; exit 1 ;; Chris@62: esac Chris@62: Chris@66: echo Chris@624: echo "Copying in Vamp plugins." Chris@66: Chris@624: for plugin in chp pyin ; do Chris@624: cp "$plugin.dylib" "$source/Contents/Resources/" Chris@624: done Chris@437: Chris@437: echo Chris@437: echo "Copying in frameworks and plugins from Qt installation directory." Chris@437: Chris@437: deploy/osx/copy-qt.sh "$app" || exit 2 Chris@66: Chris@62: echo Chris@62: echo "Fixing up paths." Chris@62: Chris@62: deploy/osx/paths.sh "$app" Chris@62: Chris@62: echo Chris@503: echo "Copying in qt.conf to set local-only plugin paths." Chris@503: echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*" Chris@503: echo "You probably want platforms/, accessible/ and imageformats/ subdirectories." Chris@503: cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf Chris@503: Chris@503: echo Chris@503: echo "Writing version $bundleVersion in to bundle." Chris@503: echo "(This should be a three-part number: major.minor.point)" Chris@503: Chris@503: perl -p -e "s/TONY_VERSION/$bundleVersion/" deploy/osx/Info.plist \ Chris@503: > "$source"/Contents/Info.plist Chris@503: Chris@503: echo "Done: check $source/Contents/Info.plist for sanity please"