Mercurial > hg > sonic-visualiser
comparison deploy/osx/deploy.sh @ 1398:6f5a40419b00 bqaudioio
Merge from branch bqresample
author | Chris Cannam |
---|---|
date | Wed, 07 Dec 2016 11:53:44 +0000 |
parents | 45c1a6bb69d8 |
children | 422d7ac46232 |
comparison
equal
deleted
inserted
replaced
1044:be5b29ce283b | 1398:6f5a40419b00 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | |
3 set -e | |
2 | 4 |
3 # Execute this from the top-level directory of the project (the one | 5 # Execute this from the top-level directory of the project (the one |
4 # that contains the .app bundle). Supply the name of the .app bundle | 6 # that contains the .app bundle). Supply the name of the .app bundle |
5 # as argument (the target will use $app.app regardless, but we need | 7 # as argument (the target will use $app.app regardless, but we need |
6 # to know the source) | 8 # to know the source) |
14 echo " but the .app name must include .app" | 16 echo " but the .app name must include .app" |
15 exit 2 | 17 exit 2 |
16 fi | 18 fi |
17 app=`basename "$source" .app` | 19 app=`basename "$source" .app` |
18 | 20 |
21 set -u | |
22 | |
19 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` | 23 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` |
20 case "$version" in | 24 stem=${version%%-*} |
25 case "$stem" in | |
21 [0-9].[0-9]) bundleVersion="$version".0 ;; | 26 [0-9].[0-9]) bundleVersion="$version".0 ;; |
22 [0-9].[0-9].[0-9]) bundleVersion="$version" ;; | 27 [0-9].[0-9].[0-9]) bundleVersion="$version" ;; |
23 *) echo "Error: Version $version is neither two- nor three-part number" ;; | 28 *) echo "Error: Version stem $stem (of version $version) is neither two- nor three-part number" ;; |
24 esac | 29 esac |
25 | 30 |
26 echo | 31 echo |
27 echo "Copying in frameworks and plugins from Qt installation directory." | 32 echo "Copying in frameworks and plugins from Qt installation directory." |
28 | 33 |
30 | 35 |
31 echo | 36 echo |
32 echo "Fixing up paths." | 37 echo "Fixing up paths." |
33 | 38 |
34 deploy/osx/paths.sh "$app" | 39 deploy/osx/paths.sh "$app" |
40 | |
41 echo | |
42 echo "Copying in qt.conf to set local-only plugin paths." | |
43 echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*" | |
44 echo "You probably want platforms/, accessible/ and imageformats/ subdirectories." | |
45 cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf | |
46 | |
47 echo | |
48 echo "Copying in plugin load checker helper." | |
49 cp checker/plugin-checker-helper "$source"/Contents/MacOS/ | |
50 | |
51 echo | |
52 echo "Copying in plugin server." | |
53 cp piper-vamp-simple-server "$source"/Contents/MacOS/ | |
54 | |
55 echo | |
56 echo "Writing version $bundleVersion in to bundle." | |
57 echo "(This should be a three-part number: major.minor.point)" | |
58 | |
59 perl -p -e "s/SV_VERSION/$bundleVersion/" deploy/osx/Info.plist \ | |
60 > "$source"/Contents/Info.plist | |
61 | |
62 echo "Done: check $source/Contents/Info.plist for sanity please" | |
35 | 63 |
36 echo | 64 echo |
37 echo "Making target tree." | 65 echo "Making target tree." |
38 | 66 |
39 volume="$app"-"$version" | 67 volume="$app"-"$version" |
47 cp -rp "$source" "$target" | 75 cp -rp "$source" "$target" |
48 | 76 |
49 echo "Done" | 77 echo "Done" |
50 | 78 |
51 echo | 79 echo |
52 echo "Copying in qt.conf to set local-only plugin paths." | 80 echo "Code-signing volume..." |
53 echo "Make sure all necessary Qt plugins are in $target/Contents/plugins/*" | |
54 echo "You probably want platforms/, accessible/ and imageformats/ subdirectories." | |
55 cp deploy/osx/qt.conf "$target"/Contents/Resources/qt.conf | |
56 | |
57 echo | |
58 echo "Writing version $bundleVersion in to bundle." | |
59 echo "(This should be a three-part number: major.minor.point)" | |
60 | |
61 perl -p -e "s/SV_VERSION/$bundleVersion/" deploy/osx/Info.plist \ | |
62 > "$target"/Contents/Info.plist | |
63 | |
64 echo "Done: check $target/Contents/Info.plist for sanity please" | |
65 | 81 |
66 deploy/osx/sign.sh "$volume" || exit 1 | 82 deploy/osx/sign.sh "$volume" || exit 1 |
83 | |
84 echo "Done" | |
67 | 85 |
68 echo | 86 echo |
69 echo "Making dmg..." | 87 echo "Making dmg..." |
70 | 88 |
71 hdiutil create -srcfolder "$volume" "$dmg" -volname "$volume" && | 89 hdiutil create -srcfolder "$volume" "$dmg" -volname "$volume" && |