Remove hard-coded environment location in OS X build.
authorCarl Hetherington <cth@carlh.net>
Sun, 20 Oct 2019 21:38:57 +0000 (23:38 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 20 Oct 2019 21:38:57 +0000 (23:38 +0200)
cscript
platform/osx/make_dmg.sh

diff --git a/cscript b/cscript
index 9bd4ebc394e094b4a60e8f9a4cc602d6ae591282..22c719ea0dac3c7c57d9f39b22543426601d948a 100644 (file)
--- a/cscript
+++ b/cscript
@@ -640,10 +640,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 universal' % target.directory)
+        target.command('bash platform/osx/make_dmg.sh %s %s universal' % (target.environment_prefix, target.directory))
         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 thin' % target.directory)
+        target.command('bash platform/osx/make_dmg.sh %s %s thin' % (target.environment_prefix, target.directory))
         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')
index 9b1dd0e0e9e48956d11cb410995bb3e8691118fa..f944e6eab44d9a07ef61eb9685685284ed9e2958 100644 (file)
@@ -1,9 +1,9 @@
 #!/bin/bash
 #
-# Syntax: make_dmg.sh <builddir> <type>
+# Syntax: make_dmg.sh <environment> <builddir> <type>
 # where <type> is universal or thin
 #
-# e.g. make_dmg.sh /Users/carl/cdist
+# e.g. make_dmg.sh /Users/carl/osx-environment /Users/carl/cdist universal
 
 # Don't set -e here as egrep (used a few times) returns 1 if no matches
 # were found.
@@ -12,9 +12,9 @@ version=`git describe --tags --abbrev=0 | sed -e "s/v//"`
 
 # DMG size in megabytes
 DMG_SIZE=256
-ENV=/Users/carl/Environments/dcpomatic
-ROOT=$1
-TYPE=$2
+ENV=$1
+ROOT=$2
+TYPE=$3
 
 if [ "$TYPE" != "universal" -a "$TYPE" != "thin" ]; then
     echo "Syntax: $0 <builddir> <type>"