diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-07 14:09:46 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-07 19:53:02 +0200 |
| commit | 44f044061a4a4dfc8f2ad50a118710815b596d1e (patch) | |
| tree | e2ea1304a5412fe1c062c240c1ed2ac7e16f0e2c | |
| parent | ddccef68ae80bac6b4aa8583dd8e0a7c943b535c (diff) | |
Fix non-disk packaging on macOS.
| -rw-r--r-- | cscript | 4 | ||||
| -rw-r--r-- | platform/osx/make_dmg.sh | 23 |
2 files changed, 20 insertions, 7 deletions
@@ -674,10 +674,10 @@ def package(target, version, options): elif target.distro == 'centos' or target.distro == 'fedora' or target.distro == 'mageia': return package_rpm(target, cpu, version, options) elif target.platform == 'osx' and target.bits is None: - target.command('bash platform/osx/make_dmg.sh %s %s universal %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + target.command('bash platform/osx/make_dmg.sh %s %s universal no %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')] elif target.platform == 'osx' and target.bits == 64: - target.command('bash platform/osx/make_dmg.sh %s %s thin %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + target.command('bash platform/osx/make_dmg.sh %s %s thin %s %s %s' % (target.environment_prefix, target.directory, "yes" if options['disk'] else "no", target.apple_id, target.apple_password)) return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')] elif target.platform == 'docker': shutil.copyfile(target.deb, 'build/platform/docker') diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index 9099e5453..7b8ff8507 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -1,9 +1,10 @@ #!/bin/bash # -# Syntax: make_dmg.sh <environment> <builddir> <type> <apple-id> <apple-password> +SYNTAX="make_dmg.sh <environment> <builddir> <type> <disk> <apple-id> <apple-password>" # where <type> is universal or thin +# <disk> is yes or no # -# e.g. make_dmg.sh /Users/carl/osx-environment /Users/carl/cdist universal foo@bar.net opensesame +# e.g. make_dmg.sh /Users/carl/osx-environment /Users/carl/cdist universal yes foo@bar.net opensesame # Don't set -e here as egrep (used a few times) returns 1 if no matches # were found. @@ -15,15 +16,22 @@ DMG_SIZE=256 ENV=$1 ROOT=$2 TYPE=$3 -APPLE_ID=$4 -APPLE_PASSWORD=$5 +DISK=$4 +APPLE_ID=$5 +APPLE_PASSWORD=$6 if [ "$TYPE" != "universal" -a "$TYPE" != "thin" ]; then - echo "Syntax: $0 <builddir> <type>" + echo $SYNTAX echo "where <type> is universal or thin" exit 1 fi +if [ "$DISK" != "yes" -a "$DISK" != "no" ]; then + echo $SYNTAX + echo "where <disk> is yes or no" + exit 1 +fi + # This is our work area for making up the .dmgs mkdir -p build/platform/osx cd build/platform/osx @@ -503,6 +511,8 @@ rl=("$approot/MacOS/dcpomatic2_playlist" "$approot/Frameworks/"*.dylib) relink_relative "${rl[@]}" make_dmg "$appdir" "" "DCP-o-matic Playlist Editor" com.dcpomatic.playlist +if [ "$DISK" == "yes" ]; then + # DCP-o-matic Disk Writer .app setup "DCP-o-matic 2 Disk Writer.app" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_disk "$approot/MacOS" @@ -577,3 +587,6 @@ mv $pkgbin/* "$pkgroot/Library/Application Support/com.dcpomatic/" pkgbuild --root $pkgroot --identifier com.dcpomatic.disk.writer --scripts $pkgbase/scripts "DCP-o-matic Disk Writer.pkg" make_dmg "$appdir" "DCP-o-matic Disk Writer.pkg" "DCP-o-matic Disk Writer" com.dcpomatic.disk + +fi + |
