diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-19 23:37:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-19 23:37:55 +0100 |
| commit | 287b8f505251d09c37d3089220fbdf2f9586d9c8 (patch) | |
| tree | 29b812980f8b627ab33a1370be390bf4b381de5e | |
| parent | 94d13e93d7187c873e3a37e4c9b71ab9f62ae43a (diff) | |
Allow player-only builds.
| -rw-r--r-- | cscript | 3 | ||||
| -rw-r--r-- | src/tools/wscript | 45 | ||||
| -rw-r--r-- | wscript | 2 |
3 files changed, 31 insertions, 19 deletions
@@ -363,6 +363,9 @@ def configure_options(target, options): if not options['gui']: opt += ' --disable-gui' + if options['player-only']: + opt += ' --player-only' + # Build Windows debug versions with static linking as I think gdb works better then if target.debug and target.platform == 'windows': opt += ' --static-dcpomatic' diff --git a/src/tools/wscript b/src/tools/wscript index 016e50d5a..4c6a74a47 100644 --- a/src/tools/wscript +++ b/src/tools/wscript @@ -35,31 +35,38 @@ def build(bld): if bld.env.TARGET_WINDOWS: uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE WINSOCK2 OLE32 DSOUND WINMM KSUSER ' - for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']: - obj = bld(features='cxx cxxprogram') - obj.uselib = uselib - obj.includes = ['..'] - obj.use = ['libdcpomatic2'] - obj.source = '%s.cc' % t - obj.target = t.replace('dcpomatic', 'dcpomatic2') - if t == 'server_test': - obj.install_path = None - - if not bld.env.DISABLE_GUI: - for t in ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server', 'dcpomatic_kdm', 'dcpomatic_player']: + if not bld.env.PLAYER_ONLY: + for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']: obj = bld(features='cxx cxxprogram') obj.uselib = uselib - if bld.env.BUILD_STATIC or bld.env.TARGET_LINUX: - obj.uselib += ' GTK' - obj.uselib += ' WXWIDGETS' obj.includes = ['..'] - obj.use = ['libdcpomatic2', 'libdcpomatic2-wx'] + obj.use = ['libdcpomatic2'] obj.source = '%s.cc' % t - if bld.env.TARGET_WINDOWS: - obj.source += ' ../../platform/windows/%s.rc' % t obj.target = t.replace('dcpomatic', 'dcpomatic2') + if t == 'server_test': + obj.install_path = None + + gui_tools = [] + if not bld.env.DISABLE_GUI: + if bld.env.PLAYER_ONLY: + gui_tools = ['dcpomatic_player'] + else: + gui_tools = ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server', 'dcpomatic_kdm', 'dcpomatic_player'] + + for t in gui_tools: + obj = bld(features='cxx cxxprogram') + obj.uselib = uselib + if bld.env.BUILD_STATIC or bld.env.TARGET_LINUX: + obj.uselib += ' GTK' + obj.uselib += ' WXWIDGETS' + obj.includes = ['..'] + obj.use = ['libdcpomatic2', 'libdcpomatic2-wx'] + obj.source = '%s.cc' % t + if bld.env.TARGET_WINDOWS: + obj.source += ' ../../platform/windows/%s.rc' % t + obj.target = t.replace('dcpomatic', 'dcpomatic2') - i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic2', bld) + i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic2', bld) def pot(bld): i18n.pot(os.path.join('src', 'tools'), 'dcpomatic.cc dcpomatic_batch.cc dcpomatic_kdm.cc dcpomatic_server.cc dcpomatic_player.cc', 'dcpomatic') @@ -48,6 +48,7 @@ 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') @@ -73,6 +74,7 @@ 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' |
