From 1aec1ccf0bc4399d5770ed7d3b7bf7b6300c7368 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 30 Dec 2020 12:32:27 +0100 Subject: dmg fixes. --- cscript | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'cscript') diff --git a/cscript b/cscript index bd51a0207..48acd1046 100644 --- a/cscript +++ b/cscript @@ -688,14 +688,15 @@ def package(target, version, options): return package_debian(target, cpu, 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 hasattr(target, 'archs') and sorted(target.archs) == sorted(('arm64', 'x86_64')): - target.command('bash platform/osx/make_dmg.sh %s %s arm-intel-64 %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 hasattr(target, 'archs') and sorted(target.archs) == sorted(('i386', 'x86_64')): - target.command('bash platform/osx/make_dmg.sh %s %s intel-32-64 %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 hasattr(target, 'arch') and target.arch == 'arm64': - target.command('bash platform/osx/make_dmg.sh %s %s arm64 %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password)) + elif target.platform == 'osx': + name = '' + if sorted(target.archs) == sorted(('arm64', 'x86_64')): + name = 'arm-intel-64' + elif sorted(target.archs) == sorted(('i386', 'x86_64')): + name = 'intel-32-64' + elif target.archs == ['arm64']: + name = 'arm64' + target.command('bash platform/osx/make_dmg.sh %s %s %s %s %s' % (target.environment_prefix, target.directory, name, target.apple_id, target.apple_password)) packages = [] for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg'): a = os.path.abspath(x) -- cgit v1.2.3