Merge player-only option into swaroop variant.
authorCarl Hetherington <cth@carlh.net>
Sat, 22 Sep 2018 20:58:24 +0000 (21:58 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 22 Sep 2018 20:58:24 +0000 (21:58 +0100)
cscript
src/tools/wscript
wscript

diff --git a/cscript b/cscript
index c38528143f07926c54ab64557a8eea65272fe149..bc1a96be005ded3632d60a35737298f80bd5d71a 100644 (file)
--- a/cscript
+++ b/cscript
@@ -338,7 +338,7 @@ def dependencies(target):
     return deps
 
 def option_defaults():
-    return { "player-only": False, "gui": True, "variant": None }
+    return { "gui": True, "variant": None }
 
 def configure_options(target, options):
     opt = ''
@@ -363,9 +363,6 @@ def configure_options(target, options):
     if not options['gui']:
         opt += ' --disable-gui'
 
-    if options['player-only']:
-        opt += ' --player-only'
-
     if options['variant'] is not None:
         opt += ' --variant=%s' % options['variant']
 
index 4c6a74a471ee23cdedd87294f2afee2c2e1d4c57..ed70e562739e5619ba9a2eb080cb6c1182e543f3 100644 (file)
@@ -35,7 +35,7 @@ def build(bld):
     if bld.env.TARGET_WINDOWS:
         uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE WINSOCK2 OLE32 DSOUND WINMM KSUSER '
 
-    if not bld.env.PLAYER_ONLY:
+    if bld.env.VARIANT != "swaroop":
         for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']:
             obj = bld(features='cxx cxxprogram')
             obj.uselib = uselib
@@ -48,7 +48,7 @@ def build(bld):
 
     gui_tools = []
     if not bld.env.DISABLE_GUI:
-        if bld.env.PLAYER_ONLY:
+        if bld.env.VARIANT == 'swaroop':
             gui_tools = ['dcpomatic_player']
         else:
             gui_tools = ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server', 'dcpomatic_kdm', 'dcpomatic_player']
diff --git a/wscript b/wscript
index 501bd4fb983df6544a71db6e4c1eb2817a5b119b..92a79bb9b031413d250c554eda913e767fa19880 100644 (file)
--- a/wscript
+++ b/wscript
@@ -48,7 +48,6 @@ def options(opt):
 
     opt.add_option('--enable-debug',      action='store_true', default=False, help='build with debugging information and without optimisation')
     opt.add_option('--disable-gui',       action='store_true', default=False, help='disable building of GUI tools')
-    opt.add_option('--player-only',       action='store_true', default=False, help='just build the player; no other tools')
     opt.add_option('--disable-tests',     action='store_true', default=False, help='disable building of tests')
     opt.add_option('--install-prefix',                         default=None,  help='prefix of where DCP-o-matic will be installed')
     opt.add_option('--target-windows',    action='store_true', default=False, help='set up to do a cross-compile to make a Windows package')
@@ -75,7 +74,6 @@ def configure(conf):
 
     # Save conf.options that we need elsewhere in conf.env
     conf.env.DISABLE_GUI = conf.options.disable_gui
-    conf.env.PLAYER_ONLY = conf.options.player_only
     conf.env.DISABLE_TESTS = conf.options.disable_tests
     conf.env.TARGET_WINDOWS = conf.options.target_windows
     conf.env.TARGET_OSX = sys.platform == 'darwin'
@@ -117,6 +115,7 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-O2')
 
     if conf.options.variant is not None:
+        conf.env.VARIANT = conf.options.variant
         conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_%s' % conf.options.variant.upper())
 
     #