swaroop: try to make -theater and -studio variants.
authorCarl Hetherington <cth@carlh.net>
Sun, 9 Jun 2019 23:21:12 +0000 (00:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 Jun 2019 23:21:12 +0000 (00:21 +0100)
platform/linux/wscript
platform/windows/wscript
src/tools/wscript
src/wx/wscript
wscript

index 805df8ae5729e3951e7a08afe5f2edb13e776747..d21d8b1bf15c4327250e612b0775c833a4350b0f 100644 (file)
@@ -1,6 +1,6 @@
 def build(bld):
     desktops = []
-    if bld.env.VARIANT != 'swaroop':
+    if bld.env.VARIANT != 'swaroop-theater':
         obj = bld(features='subst')
         obj.source = 'dcpomatic.desktop.in'
         obj.target = 'dcpomatic2.desktop'
index 176e3840e39773fa042073e99f905a6c47e00515..865b1b4e315febee1554829a539fba74f0dd5f38 100644 (file)
@@ -320,7 +320,7 @@ SectionEnd
     else:
         print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2"', file=f)
 
-    if variant != 'swaroop':
+    if variant != 'swaroop-theater':
         print("""
 File "%binaries%/src/tools/dcpomatic2.exe"
 File "%binaries%/src/tools/dcpomatic2_batch.exe"
@@ -336,7 +336,7 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
     """, file=f)
 
     if debug:
-        if variant != "swaroop":
+        if variant != "swaroop-theater":
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 debug.lnk" "$INSTDIR\\bin\\dcpomatic2_debug.bat"', file=f)
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 Batch Converter debug.lnk" "$INSTDIR\\bin\\dcpomatic2_batch_debug.bat" ""', file=f)
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 KDM Creator debug.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm_debug.bat" ""', file=f)
@@ -345,7 +345,7 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
         print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 debug" "DisplayName" "DCP-o-matic 2 debug (remove only)"', file=f)
         print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 debug" "UninstallString" "$INSTDIR\\Uninstall.exe"', file=f)
     else:
-        if variant != "swaroop":
+        if variant != "swaroop-theater":
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe"', file=f)
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Batch Converter.lnk" "$INSTDIR\\bin\\dcpomatic2_batch.exe"', file=f)
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 KDM Creator.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm.exe"', file=f)
@@ -360,21 +360,21 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
     if debug:
         print('Section "DCP-o-matic 2 debug desktop shortcuts" SEC_MASTER_DESKTOP', file=f)
         print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Player debug.lnk" "$INSTDIR\\bin\\dcpomatic2_player_debug.bat" ""', file=f)
-        if variant != "swaroop":
+        if variant != "swaroop-theater":
             print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 debug.lnk" "$INSTDIR\\bin\\dcpomatic2_debug.bat" ""', file=f)
             print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Batch Converter debug.lnk" "$INSTDIR\\bin\\dcpomatic2_batch_debug.bat" ""', file=f)
             print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 KDM Creator debug.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm_debug.bat" ""', file=f)
     else:
         print('Section "DCP-o-matic 2 desktop shortcuts" SEC_MASTER_DESKTOP', file=f)
         print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Player.lnk" "$INSTDIR\\bin\\dcpomatic2_player.exe"', file=f)
-        if variant != "swaroop":
+        if variant != "swaroop-theater":
             print('CreateShortCut "$DESKTOP\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe" ""', file=f)
             print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Batch Converter.lnk" "$INSTDIR\\bin\\dcpomatic2_batch.exe"', file=f)
             print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 KDM Creator.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm.exe"', file=f)
 
     print("SectionEnd", file=f)
 
-    if not debug and variant != "swaroop":
+    if not debug and variant != "swaroop-theater":
         print("""
 Section "Encode server" SEC_SERVER
 SetOutPath "$INSTDIR\\bin"
@@ -392,7 +392,7 @@ CreateShortCut "$DESKTOP\\DCP-o-matic 2 encode server.lnk" "$INSTDIR\\bin\\dcpom
 SectionEnd
     """, file=f)
 
-    if variant != "swaroop":
+    if variant != "swaroop-theater":
         if debug:
             print('LangString DESC_SEC_MASTER ${LANG_ENGLISH} "DCP-o-matic 2 debug"', file=f)
             print('LangString DESC_SEC_MASTER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 debug desktop shortcuts"', file=f)
index 0316137af947422917fc7a0e2c48690a9f36313d..8f94d10f9a7265ff4de05d36f1cb14b10654ade7 100644 (file)
@@ -36,10 +36,12 @@ def build(bld):
         uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE WINSOCK2 OLE32 DSOUND WINMM KSUSER '
 
     cli_tools = []
-    if bld.env.VARIANT != "swaroop":
-        cli_tools = ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']
+    if bld.env.VARINT == 'swaroop-theater':
+        cli_tools = ['dcpomatic_player', 'dcpomatic_playlist', 'dcpomatic_uuid']
+    elif bld.env.VARIANT == "swaroop-studio":
+        cli_tools = ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create', 'dcpomatic_player', 'dcpomatic_playlist', 'dcpomatic_ecinema', 'dcpomatic_uuid']
     else:
-        cli_tools = ['dcpomatic_ecinema', 'dcpomatic_uuid']
+        cli_tools = 'dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create', 'dcpomatic_player']
 
     for t in cli_tools:
         obj = bld(features='cxx cxxprogram')
@@ -53,8 +55,8 @@ def build(bld):
 
     gui_tools = []
     if not bld.env.DISABLE_GUI:
-        if bld.env.VARIANT == 'swaroop':
-            gui_tools = ['dcpomatic_player', 'dcpomatic_playlist', 'dcpomatic_kdm']
+        if bld.env.VARIANT == 'swaroop-theater':
+            gui_tools = ['dcpomatic_player', 'dcpomatic_playlist']
         else:
             gui_tools = ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server', 'dcpomatic_kdm', 'dcpomatic_player', 'dcpomatic_playlist']
 
index 9be062be5b8d63ebdc53e5ec8940bce5f9253b2d..5db943ab82ffe1059d27a828c03b34a0ebef0644 100644 (file)
@@ -293,7 +293,7 @@ def build(bld):
     if bld.env.TARGET_OSX:
         obj.framework = ['CoreAudio', 'OpenGL']
     obj.use = 'libdcpomatic2'
-    if bld.env.VARIANT == 'swaroop':
+    if bld.env.VARIANT.startswith('swaroop-'):
         obj.source = sources + " swaroop_controls.cc"
     else:
         obj.source = sources
diff --git a/wscript b/wscript
index 4e5728b6f72b50a46bb63f14c3fbada31be17d7b..a25bc20cfab4e3eeee0d212f8127feeca53e534b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -64,7 +64,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'])
+    opt.add_option('--variant',           help='build variant', choices=['swaroop-studio', 'swaoop-theater'])
 
 def configure(conf):
     conf.load('compiler_cxx')
@@ -117,7 +117,8 @@ def configure(conf):
 
     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())
+        if conf.options.variant.startswith('swaroop-'):
+            conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_SWAROOP')
 
     #
     # Windows/Linux/OS X specific