diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-21 01:18:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-21 01:18:11 +0100 |
| commit | 48ac836c1adf20629d75592bc87bf64d18c54139 (patch) | |
| tree | 79c2cd46bf2fd9481a07dc460988b900dc64915c | |
| parent | 65e3ca1c4a31fdb73df295ef636301cd7435b755 (diff) | |
Add swaroop variant and use it to remove the screen options from the View menu.
| -rw-r--r-- | cscript | 5 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 12 | ||||
| -rw-r--r-- | wscript | 4 |
3 files changed, 18 insertions, 3 deletions
@@ -338,7 +338,7 @@ def dependencies(target): return deps def option_defaults(): - return { "player-only": "False", "gui": True } + return { "player-only": "False", "gui": True, "variant": None } def configure_options(target, options): opt = '' @@ -366,6 +366,9 @@ def configure_options(target, options): if options['player-only']: opt += ' --player-only' + if options['variant'] is not None: + opt += ' --variant=%s' % options['variant'] + # 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/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 119656726..0f0d84df2 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -115,6 +115,8 @@ public: , _history_items (0) , _history_position (0) , _history_separator (0) + , _view_full_screen (0) + , _view_dual_screen (0) { #if defined(DCPOMATIC_WINDOWS) @@ -355,8 +357,10 @@ private: optional<int> c = Config::instance()->decode_reduction(); _view_cpl = view->Append(ID_view_cpl, _("CPL"), _cpl_menu); view->AppendSeparator(); +#ifndef DCPOMATIC_VARIANT_SWAROOP _view_full_screen = view->AppendCheckItem(ID_view_full_screen, _("Full screen\tF11")); _view_dual_screen = view->AppendCheckItem(ID_view_dual_screen, _("Dual screen\tShift+F11")); +#endif setup_menu (); view->AppendSeparator(); view->Append(ID_view_closed_captions, _("Closed captions...")); @@ -547,8 +551,12 @@ private: void setup_menu () { - _view_full_screen->Check (_mode == Config::PLAYER_MODE_FULL); - _view_dual_screen->Check (_mode == Config::PLAYER_MODE_DUAL); + if (_view_full_screen) { + _view_full_screen->Check (_mode == Config::PLAYER_MODE_FULL); + } + if (_view_dual_screen) { + _view_dual_screen->Check (_mode == Config::PLAYER_MODE_DUAL); + } } void setup_screen () @@ -65,6 +65,7 @@ def options(opt): opt.add_option('--static-curl', action='store_true', default=False, help='link statically to libcurl') opt.add_option('--workaround-gssapi', action='store_true', default=False, help='link to gssapi_krb5') opt.add_option('--force-cpp11', action='store_true', default=False, help='force use of C++11') + opt.add_option('--variant', help='build variant', choices=['swaroop']) def configure(conf): conf.load('compiler_cxx') @@ -115,6 +116,9 @@ def configure(conf): else: conf.env.append_value('CXXFLAGS', '-O2') + if conf.options.variant is not None: + conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_%s' % conf.options.variant.upper()) + # # Windows/Linux/OS X specific # |
