summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-21 01:18:11 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-21 01:18:11 +0100
commit48ac836c1adf20629d75592bc87bf64d18c54139 (patch)
tree79c2cd46bf2fd9481a07dc460988b900dc64915c
parent65e3ca1c4a31fdb73df295ef636301cd7435b755 (diff)
Add swaroop variant and use it to remove the screen options from the View menu.
-rw-r--r--cscript5
-rw-r--r--src/tools/dcpomatic_player.cc12
-rw-r--r--wscript4
3 files changed, 18 insertions, 3 deletions
diff --git a/cscript b/cscript
index c13061be1..a42c95033 100644
--- a/cscript
+++ b/cscript
@@ -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 ()
diff --git a/wscript b/wscript
index c41027336..501bd4fb9 100644
--- a/wscript
+++ b/wscript
@@ -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
#