Support unmounting on macOS and Windows.
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index cd74e8ef5771903baa062759b7298bb3aabd1b41..aeddb1cdd9d71ff49c339a12caf26b57b2ea1991 100644 (file)
--- a/cscript
+++ b/cscript
@@ -364,8 +364,7 @@ def dependencies(target, options):
     # Let's use C++11 mode if we can
     cpp_lib_options = {'force-cpp11': True} if (
             (target.platform == 'osx' and target.bits == 64) or
-            (target.platform == 'windows')
-            else {}
+            (target.platform == 'windows')) else {}
 
     deps.append(('libdcp', None, cpp_lib_options))
     deps.append(('libsub', None, cpp_lib_options))
@@ -675,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')