Store subtitle language(s) in Film, and allow setup of those
[dcpomatic.git] / cscript
diff --git a/cscript b/cscript
index 6eec02cc03aa49d072c20b44b897adb4ed773bb5..44051acc00e524902c0668e034db4b52d4e3313b 100644 (file)
--- a/cscript
+++ b/cscript
@@ -93,7 +93,6 @@ deb_depends['20.04'].extend(['libboost-filesystem1.71.0',
                              'libpangomm-1.4-1v5',
                              'libxml++2.6-2v5',
                              'libzip5',
-                             'libwxgtk3.0-gtk3-0v5',
                              'libicu66',
                              'libnettle7',
                              'libssh-4',
@@ -112,11 +111,10 @@ deb_depends['20.10'].extend(['libboost-filesystem1.71.0',
                              'libpangomm-1.4-1v5',
                              'libxml++2.6-2v5',
                              'libzip5',
-                             'libwxgtk3.0-gtk3-0v5',
-                             'libicu66',
-                             'libnettle7',
+                             'libicu67',
+                             'libnettle8',
                              'libssh-4',
-                             'libx264-155',
+                             'libx264-160',
                              'libcurl4',
                              'libpulse0',
                              'libxerces-c3.2',
@@ -286,6 +284,7 @@ def make_spec(filename, version, target, options, requires=None):
     print('%{_bindir}/dcpomatic2_player', file=f)
     print('%{_bindir}/dcpomatic2_playlist', file=f)
     print('%{_bindir}/dcpomatic2_openssl', file=f)
+    print('%{_bindir}/dcpomatic2_combiner', file=f)
     if options['variant'] == 'swaroop-studio':
         print('%{_bindir}/dcpomatic2_ecinema', file=f)
         print('%{_bindir}/dcpomatic2_uuid', file=f)
@@ -298,7 +297,7 @@ def make_spec(filename, version, target, options, requires=None):
     print('%{_datadir}/applications/dcpomatic2_kdm.desktop', file=f)
     print('%{_datadir}/applications/dcpomatic2_player.desktop', file=f)
     print('%{_datadir}/applications/dcpomatic2_playlist.desktop', file=f)
-    print('%{_datadir}/applications/dcpomatic2_playlist.desktop', file=f)
+    print('%{_datadir}/applications/dcpomatic2_combiner.desktop', file=f)
     if os.path.exists(os.path.join(tools, "dcpomatic2_disk")):
         print('%{_datadir}/applications/dcpomatic2_disk.desktop', file=f)
     print('%{_datadir}/dcpomatic2/dcpomatic2_server_small.png', file=f)
@@ -323,6 +322,7 @@ def make_spec(filename, version, target, options, requires=None):
         print('%%{_datadir}/icons/hicolor/%s/apps/dcpomatic2_player.png' % r, file=f)
         print('%%{_datadir}/icons/hicolor/%s/apps/dcpomatic2_playlist.png' % r, file=f)
         print('%%{_datadir}/icons/hicolor/%s/apps/dcpomatic2_disk.png' % r, file=f)
+        print('%%{_datadir}/icons/hicolor/%s/apps/dcpomatic2_combiner.png' % r, file=f)
     for l in ['de_DE', 'es_ES', 'fr_FR', 'it_IT', 'sv_SE', 'nl_NL', 'ru_RU', 'pl_PL', 'da_DK',
               'pt_PT', 'pt_BR', 'sk_SK', 'cs_CZ', 'uk_UA', 'zh_CN', 'tr_TR']:
         print('%%{_datadir}/locale/%s/LC_MESSAGES/dcpomatic2.mo' % l, file=f)
@@ -362,9 +362,7 @@ def dependencies(target, options):
     else:
         ffmpeg_options = {}
 
-    if target.platform == 'windows' and target.version == 'xp':
-        deps = [('ffmpeg-cdist', '5783efa', ffmpeg_options)]
-    elif target.platform != 'linux' or target.distro != 'arch':
+    if target.platform != 'linux' or target.distro != 'arch':
         deps = [('ffmpeg-cdist', 'd798b45', ffmpeg_options)]
     else:
         # Use distro-provided FFmpeg on Arch
@@ -375,8 +373,8 @@ def dependencies(target, options):
             (target.platform == 'osx' and target.bits == 64) or
             (target.platform == 'windows')) else {}
 
-    deps.append(('libdcp', '184bdd2', cpp_lib_options))
-    deps.append(('libsub', '72bf4fc', cpp_lib_options))
+    deps.append(('libdcp', 'd989a83', cpp_lib_options))
+    deps.append(('libsub', 'f17a4fd', cpp_lib_options))
     deps.append(('leqm-nrt', 'carl'))
     deps.append(('rtaudio', 'carl'))
     # We get our OpenSSL libraries from the environment, but we
@@ -386,6 +384,7 @@ def dependencies(target, options):
     deps.append(('openssl', 'carl'))
     if can_build_disk(target):
         deps.append(('lwext4', '370b3de6'))
+    deps.append(('ffcmp', None))
 
     return deps
 
@@ -394,8 +393,10 @@ option_defaults = { "gui": True, "variant": None }
 def configure_options(target, options):
     opt = ' --warnings-are-errors'
 
-    if not (target.platform == 'linux' and target.distro == 'ubuntu' and target.version == '18.04'):
-        # Currently we only build tests on Ubuntu 18.04
+    if not ((target.platform == 'linux' and target.distro == 'ubuntu' and target.version == '18.04') or
+            (target.platform == 'osx') or
+            (target.platform == 'windows')):
+        # Currently we only build tests on Ubuntu 18.04, macOS and Windows
         opt += ' --disable-tests'
 
     if target.debug:
@@ -687,7 +688,24 @@ def package(target, version, options):
         return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')]
     elif target.platform == 'osx' and target.bits == 64:
         target.command('bash platform/osx/make_dmg.sh %s %s thin %s %s' % (target.environment_prefix, target.directory, target.apple_id, target.apple_password))
-        return [os.path.abspath(x) for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg')]
+        packages = []
+        for x in glob.glob('build/platform/osx/DCP-o-matic*.dmg'):
+            a = os.path.abspath(x)
+            if x.find("Player") != -1:
+                packages.append((a, "com.dcpomatic.player"))
+            elif x.find("Playlist Editor") != -1:
+                packages.append((a, "com.dcpomatic.playlist"))
+            elif x.find("KDM Creator") != -1:
+                packages.append((a, "com.dcpomatic.kdm"))
+            elif x.find("Batch Converter") != -1:
+                packages.append((a, "com.dcpomatic.batch"))
+            elif x.find("Encode Server") != -1:
+                packages.append((a, "com.dcpomatic.server"))
+            elif x.find("Disk Writer") != -1:
+                packages.append((a, "com.dcpomatic.disk"))
+            else:
+                packages.append((a, "com.dcpomatic"))
+        return packages
     elif target.platform == 'docker':
         shutil.copyfile(target.deb, 'build/platform/docker')
         f = open('build/platform/docker/Dockerfile', 'w')
@@ -719,12 +737,14 @@ def make_manual(target):
     target.command('pdflatex colour.tex')
     return [os.path.abspath('pdf'), os.path.abspath('html'), os.path.abspath('colour.pdf')]
 
-def test(target, test):
-    if target.platform != 'windows':
-        target.set('LC_ALL', 'C')
+def test(target, options, test):
+    target.set('LC_ALL', 'C')
+    if target.platform == 'windows':
+        cmd = 'run\\tests'
+    else:
         cmd = 'run/tests '
-        if target.debug:
-            cmd += '--backtrace '
-        if test is not None:
-            cmd += '--run_test=%s' % test
-        target.command(cmd)
+    if target.debug:
+        cmd += '--backtrace '
+    if test is not None:
+        cmd += '--run_test=%s' % test
+    target.command(cmd)