Add a cscript option to build the disk tools.
authorCarl Hetherington <cth@carlh.net>
Sun, 29 Mar 2020 22:36:48 +0000 (00:36 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 29 Mar 2020 22:36:48 +0000 (00:36 +0200)
cscript

diff --git a/cscript b/cscript
index f7d9ea0bab78ed8b58799581c4291f57e406662f..aa2a46b41bf54f725a8f95d14e533c1cf9afe260 100644 (file)
--- a/cscript
+++ b/cscript
@@ -196,7 +196,7 @@ deb_depends['unstable'].extend(['libboost-filesystem1.67.0',
                                 'libx264-155',
                                 'libcurl4'])
 
-def build_disk(target):
+def can_build_disk(target):
     # We can build dcpomatic2_disk on platforms that have Boost process and can build the lwext4
     # library.  For now, just whitelist good ones here.
     #
@@ -370,13 +370,13 @@ def dependencies(target):
     # This dependency is to get that binary, which is added into
     # the appropriate place later
     deps.append(('openssl', 'carl'))
-    if build_dist(target):
+    if can_build_disk(target):
         deps.append(('lwext4', 'carl2'))
 
     return deps
 
 def option_defaults():
-    return { "gui": True, "variant": None }
+    return { "gui": True, "variant": None, "disk": False }
 
 def configure_options(target, options):
     opt = ''
@@ -414,7 +414,7 @@ def configure_options(target, options):
     if target.debug and target.platform == 'windows':
         opt += ' --static-dcpomatic'
 
-    if build_disk(target):
+    if can_build_disk(target) and options['disk']:
        opt += ' --enable-disk'
 
     return opt