Mercurial > hg > vamp-plugin-pack
comparison deploy/osx/deploy.sh @ 34:efb73feb1061
Enough MacOS bits to be able to do a quick proof-of-concept test
author | Chris Cannam |
---|---|
date | Fri, 13 Dec 2019 14:14:57 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
33:dd41d7369ed5 | 34:efb73feb1061 |
---|---|
1 #!/bin/bash | |
2 | |
3 set -e | |
4 | |
5 # Execute this from the top-level directory of the project (the one | |
6 # that contains the .app bundle). Supply the name of the application | |
7 # as argument. | |
8 # | |
9 # This now performs *only* the app deployment step - copying in | |
10 # libraries and setting up paths etc. It does not create a | |
11 # package. Use deploy-and-package.sh for that. | |
12 | |
13 app="$1" | |
14 source="$app.app" | |
15 | |
16 if [ -z "$app" ] || [ ! -d "$source" ] || [ -n "$2" ]; then | |
17 echo "Usage: $0 <app>" | |
18 echo " e.g. $0 MyApplication" | |
19 echo " The app bundle must exist in ./<app>.app." | |
20 echo " Version number will be extracted from version.h." | |
21 exit 2 | |
22 fi | |
23 | |
24 set -u | |
25 | |
26 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` | |
27 stem=${version%%-*} | |
28 stem=${stem%%pre*} | |
29 case "$stem" in | |
30 [0-9].[0-9]) bundleVersion="$stem".0 ;; | |
31 [0-9].[0-9].[0-9]) bundleVersion="$stem" ;; | |
32 *) echo "Error: Version stem $stem (of version $version) is neither two- nor three-part number" ;; | |
33 esac | |
34 | |
35 echo | |
36 echo "Copying in frameworks and plugins from Qt installation directory." | |
37 | |
38 deploy/osx/copy-qt.sh "$app" || exit 2 | |
39 | |
40 echo | |
41 echo "Fixing up paths." | |
42 | |
43 deploy/osx/paths.sh "$app" | |
44 | |
45 echo | |
46 echo "Copying in qt.conf to set local-only plugin paths." | |
47 echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*" | |
48 echo "You probably want platforms/, accessible/ and imageformats/ subdirectories." | |
49 cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf | |
50 | |
51 echo | |
52 echo "Writing version $bundleVersion in to bundle." | |
53 echo "(This should be a three-part number: major.minor.point)" | |
54 | |
55 perl -p -e "s/PACK_VERSION/$bundleVersion/" deploy/osx/Info.plist \ | |
56 > "$source"/Contents/Info.plist | |
57 | |
58 echo "Done: check $source/Contents/Info.plist for sanity please" |