Add disk writer tool.
[dcpomatic.git] / platform / windows / wscript
index db19c750ef315ea265e25d3250c7c8a01ad227ca..77f9bd0ccc7bfafad1dde19851b7849fe010d400 100644 (file)
@@ -1,7 +1,7 @@
 from __future__ import print_function
 import os
 
-def write_installer(bits, windows_version, dcpomatic_version, debug, variant):
+def write_installer(bits, windows_version, dcpomatic_version, debug, variant, disk):
     try:
         os.makedirs('build/platform/windows')
     except:
@@ -75,11 +75,10 @@ File "%static_deps%/bin/libintl-8.dll"
 File "%static_deps%/bin/libboost_chrono-mt.dll"
 File "%static_deps%/bin/libboost_filesystem-mt.dll"
 File "%static_deps%/bin/libboost_system-mt.dll"
-File "%static_deps%/bin/libboost_thread_win32-mt.dll"
+File "%static_deps%/bin/libboost_thread-mt.dll"
 File "%static_deps%/bin/libboost_date_time-mt.dll"
 File "%static_deps%/bin/libboost_locale-mt.dll"
 File "%static_deps%/bin/libboost_regex-mt.dll"
-File "%static_deps%/bin/libeay32.dll"
 """, file=f)
 
     if bits == 32:
@@ -129,15 +128,14 @@ File "%static_deps%/bin/libxslt-1.dll"
 File "%static_deps%/bin/libffi-6.dll"
 File "%static_deps%/bin/openssl.exe"
 File "%static_deps%/bin/libcurl-4.dll"
-File "%static_deps%/bin/ssleay32.dll"
-File "%static_deps%/bin/libzip-4.dll"
+File "%static_deps%/bin/libzip.dll"
 File "%static_deps%/bin/libcairomm-1.0-1.dll"
 File "%static_deps%/bin/libpangomm-1.4-1.dll"
 File "%static_deps%/bin/libsamplerate-0.dll"
-File "%static_deps%/bin/libnettle-6.dll"
-File "%static_deps%/bin/icuuc56.dll"
-File "%static_deps%/bin/icudt56.dll"
-File "%static_deps%/bin/icuin56.dll"
+File "%static_deps%/bin/libnettle-7.dll"
+File "%static_deps%/bin/icuuc65.dll"
+File "%static_deps%/bin/icudt65.dll"
+File "%static_deps%/bin/icuin65.dll"
 File "%static_deps%/bin/liblzma-5.dll"
 File "%static_deps%/bin/libpcre-1.dll"
 File "%static_deps%/bin/libharfbuzz-0.dll"
@@ -146,26 +144,29 @@ File "%static_deps%/bin/liblcms2-2.dll"
 File "%static_deps%/bin/libwinpthread-1.dll"
 File "%static_deps%/bin/libgnutls-30.dll"
 File "%static_deps%/bin/libgmp-10.dll"
-File "%static_deps%/bin/libhogweed-4.dll"
+File "%static_deps%/bin/libhogweed-5.dll"
 File "%static_deps%/bin/libidn2-0.dll"
 File "%static_deps%/bin/libunistring-2.dll"
 File "%static_deps%/bin/libssh2-1.dll"
 File "%static_deps%/bin/libgcrypt-20.dll"
-""", file=f)
-
-    if bits == 32:
-        print('File "%static_deps%/bin/libgpg-error-0.dll"', file=f)
-    else:
-        print('File "%static_deps%/bin/libgpg-error6-0.dll"', file=f)
-
-    print("""
+File "%static_deps%/bin/libgpg-error-0.dll"
 File "%static_deps%/bin/libpangoft2-1.0-0.dll"
-File "%static_deps%/bin/libx264-152.dll"
-
+File "%static_deps%/bin/libx264-155.dll"
+File "%static_deps%/bin/libwebp-7.dll"
+File "%static_deps%/bin/libcrypto-1_1-x64.dll"
+File "%static_deps%/bin/libltdl-7.dll"
+File "%static_deps%/bin/libdl.dll"
 File "%cdist_deps%/bin/asdcp-carl.dll"
 File "%cdist_deps%/bin/kumu-carl.dll"
     """, file=f)
 
+    if disk:
+        print("""
+File "%static_deps%/bin/libnanomsg.dll"
+File "%cdist_deps%/lib/libblockdev.dll"
+File "%cdist_deps%/lib/liblwext4.dll"
+        """, file=f)
+
     if windows_version == 'xp':
         print("""
 File "%cdist_deps%/bin/avcodec-57.dll"
@@ -208,6 +209,8 @@ File "%cdist_deps%/src/openssl/apps/openssl.exe"
         print('File "%resources%/dcpomatic2_batch_debug.bat"', file=f)
         print('File "%resources%/dcpomatic2_kdm_debug.bat"', file=f)
         print('File "%resources%/dcpomatic2_player_debug.bat"', file=f)
+        if disk:
+            print('File "%resources%/dcpomatic2_disk_debug.bat"', file=f)
         print('File "%mingw%/bin/gdb.exe"', file=f)
     else:
         print('File "%binaries%/src/wx/dcpomatic2-wx.dll"', file=f)
@@ -338,6 +341,13 @@ File "%binaries%/src/tools/dcpomatic2_kdm.exe"
 File "%binaries%/src/tools/dcpomatic2_kdm_cli.exe"
     """, file=f)
 
+    if disk:
+        print("""
+File "%binaries%/src/tools/dcpomatic2_disk.exe"
+File "%binaries%/src/tools/dcpomatic2_disk_writer.exe"
+File "%resources%/dcpomatic2_disk_writer.exe.manifest"
+    """, file=f)
+
     print("""
 File "%binaries%/src/tools/dcpomatic2_player.exe"
 File "%binaries%/src/tools/dcpomatic2_playlist.exe"
@@ -348,6 +358,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
             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)
+            if disk:
+                print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 Disk Writer debug.lnk" "$INSTDIR\\bin\\dcpomatic2_disk_debug.bat" ""', file=f)
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\Uninstall DCP-o-matic 2 debug.lnk" "$INSTDIR\\Uninstall.exe"', file=f)
         print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 Player debug.lnk" "$INSTDIR\\bin\\dcpomatic2_player_debug.bat" ""', file=f)
         print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 debug" "DisplayName" "DCP-o-matic 2 debug (remove only)"', file=f)
@@ -357,6 +369,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
             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)
+            if disk:
+                print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Disk Writer.lnk" "$INSTDIR\\bin\\dcpomatic2_disk.exe"', file=f)
             print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\Uninstall DCP-o-matic 2.lnk" "$INSTDIR\\Uninstall.exe"', file=f)
         print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Player.lnk" "$INSTDIR\\bin\\dcpomatic2_player.exe"', file=f)
         print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Playlist Editor.lnk" "$INSTDIR\\bin\\dcpomatic2_playlist.exe"', file=f)
@@ -372,6 +386,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
             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)
+            if disk:
+                print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Disk Writer debug.lnk" "$INSTDIR\\bin\\dcpomatic2_disk_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)
@@ -379,6 +395,8 @@ File "%binaries%/src/tools/dcpomatic2_playlist.exe"
             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)
+            if disk:
+                print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Disk Writer.lnk" "$INSTDIR\\bin\\dcpomatic2_disk.exe"', file=f)
 
     print("SectionEnd", file=f)
 
@@ -396,7 +414,7 @@ SectionEnd
 
         print("""
 Section "Encode server desktop shortcuts" SEC_SERVER_DESKTOP
-CreateShortCut "$DESKTOP\\DCP-o-matic 2 encode server.lnk" "$INSTDIR\\bin\\dcpomatic2_server.exe" ""
+CreateShortCut "$DESKTOP\\DCP-o-matic 2 Encode Server.lnk" "$INSTDIR\\bin\\dcpomatic2_server.exe" ""
 SectionEnd
     """, file=f)
 
@@ -407,8 +425,8 @@ SectionEnd
         else:
             print('LangString DESC_SEC_MASTER ${LANG_ENGLISH} "DCP-o-matic 2"', file=f)
             print('LangString DESC_SEC_MASTER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 desktop shortcuts"', file=f)
-            print('LangString DESC_SEC_SERVER ${LANG_ENGLISH} "DCP-o-matic 2 encode server"', file=f)
-            print('LangString DESC_SEC_SERVER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 encode server desktop shortcuts"', file=f)
+            print('LangString DESC_SEC_SERVER ${LANG_ENGLISH} "DCP-o-matic 2 Encode Server"', file=f)
+            print('LangString DESC_SEC_SERVER_DESKTOP ${LANG_ENGLISH} "DCP-o-matic 2 Encode Server desktop shortcuts"', file=f)
 
     print("""
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@@ -436,6 +454,7 @@ RMDir "$INSTDIR"
 Delete "$DESKTOP\\DCP-o-matic 2 debug.lnk"
 Delete "$DESKTOP\\DCP-o-matic 2 Batch Converter debug.lnk"
 Delete "$DESKTOP\\DCP-o-matic 2 KDM Creator debug.lnk"
+Delete "$DESKTOP\\DCP-o-matic 2 Disk Writer debug.lnk"
 Delete "$SMPROGRAMS\\DCP-o-matic 2 debug\\*.*"
 RmDir  "$SMPROGRAMS\\DCP-o-matic 2 debug"
 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2 debug"
@@ -451,6 +470,7 @@ Delete "$DESKTOP\\DCP-o-matic 2.lnk"
 Delete "$DESKTOP\\DCP-o-matic 2 Batch Converter.lnk"
 Delete "$DESKTOP\\DCP-o-matic 2 Encode Server.lnk"
 Delete "$DESKTOP\\DCP-o-matic 2 KDM creator.lnk"
+Delete "$DESKTOP\\DCP-o-matic 2 Disk Writer.lnk"
 Delete "$SMPROGRAMS\\DCP-o-matic 2\\*.*"
 RmDir  "$SMPROGRAMS\\DCP-o-matic 2"
 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2"
@@ -460,7 +480,7 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\U
 
 
 def build(bld):
-    write_installer(32, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
-    write_installer(64, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
-    write_installer(32, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
-    write_installer(64, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT)
+    write_installer(32, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)
+    write_installer(64, None, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)
+    write_installer(32, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)
+    write_installer(64, 'xp', bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK)