Mercurial > hg > easyhg
comparison deploy/osx/deploy.sh @ 672:88fa1544b407
Merge from branch qt5. There's much more to be done before we can make another release, but clearly it's going to be done using qt5
author | Chris Cannam |
---|---|
date | Wed, 05 Dec 2018 09:44:10 +0000 |
parents | 8f3075eeaac2 |
children | 8121a6f9abca |
comparison
equal
deleted
inserted
replaced
665:88061103b878 | 672:88fa1544b407 |
---|---|
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) |
11 echo "Usage: $0 <source.app> <target-dmg-basename>" | 13 echo "Usage: $0 <source.app> <target-dmg-basename>" |
12 exit 2 | 14 exit 2 |
13 fi | 15 fi |
14 app=EasyMercurial | 16 app=EasyMercurial |
15 | 17 |
18 set -u | |
19 | |
16 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' src/version.h` | 20 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' src/version.h` |
17 case "$version" in | 21 case "$version" in |
18 [0-9].[0-9]) bundleVersion="$version".0 ;; | 22 [0-9].[0-9]) bundleVersion="$version".0 ;; |
19 [0-9].[0-9].[0-9]) bundleVersion="$version" ;; | 23 [0-9].[0-9].[0-9]) bundleVersion="$version" ;; |
20 *) echo "Error: Version $version is neither two- nor three-part number" ;; | 24 *) echo "Error: Version $version is neither two- nor three-part number" ;; |
21 esac | 25 esac |
26 | |
27 echo | |
28 echo "Copying in frameworks and plugins from Qt installation directory." | |
29 | |
30 deploy/osx/copy-qt.sh "$app" || exit 2 | |
31 | |
32 echo | |
33 echo "Fixing up paths." | |
34 | |
35 deploy/osx/paths.sh "$app" | |
36 | |
37 echo | |
38 echo "Copying in qt.conf to set local-only plugin paths." | |
39 echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*" | |
40 echo "You probably want platforms/, accessible/ and imageformats/ subdirectories." | |
41 cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf | |
42 | |
43 echo "Writing version $bundleVersion in to bundle." | |
44 echo "(This should be a three-part number: major.minor.point)" | |
45 | |
46 perl -p -e "s/EASYHG_VERSION/$bundleVersion/" deploy/osx/Info.plist \ | |
47 > "$source"/Contents/Info.plist | |
48 | |
49 echo "Done: check $source/Contents/Info.plist for sanity please" | |
50 | |
51 echo | |
52 echo "Copying in helper scripts" | |
53 cp easyhg-extdiff.sh "$source"/Contents/MacOS/ | |
54 cp easyhg-merge.sh "$source"/Contents/MacOS/ | |
55 chmod +x "$source"/Contents/MacOS/easyhg-extdiff.sh "$source"/Contents/MacOS/easyhg-merge.sh | |
22 | 56 |
23 echo | 57 echo |
24 echo "Making target tree." | 58 echo "Making target tree." |
25 | 59 |
26 volume="$app"-"$version" | 60 volume="$app"-"$version" |
29 | 63 |
30 mkdir "$volume" || exit 1 | 64 mkdir "$volume" || exit 1 |
31 | 65 |
32 ln -s /Applications "$volume"/Applications | 66 ln -s /Applications "$volume"/Applications |
33 cp COPYING "$volume/COPYING.txt" | 67 cp COPYING "$volume/COPYING.txt" |
34 cp -RPp "$source" "$target" | 68 cp -rp "$source" "$target" |
35 | 69 |
36 echo "Done" | 70 echo "Done" |
37 | 71 |
38 echo "Writing version $bundleVersion in to bundle." | 72 deploy/osx/sign.sh "$volume" || exit 1 |
39 echo "(This should be a three-part number: major.minor.point)" | |
40 | |
41 perl -p -e "s/EASYHG_VERSION/$bundleVersion/" deploy/osx/Info.plist \ | |
42 > "$target"/Contents/Info.plist | |
43 | |
44 echo "Done: check $target/Contents/Info.plist for sanity please" | |
45 | 73 |
46 echo | 74 echo |
47 echo "Making dmg..." | 75 echo "Making dmg..." |
48 | 76 |
49 hdiutil create -srcfolder "$volume" "$dmg" -volname "$volume" && | 77 hdiutil create -srcfolder "$volume" "$dmg" -volname "$volume" && |