diff options
Diffstat (limited to 'platform/windows/wscript')
| -rw-r--r-- | platform/windows/wscript | 189 |
1 files changed, 99 insertions, 90 deletions
diff --git a/platform/windows/wscript b/platform/windows/wscript index 17965d54c..fb235ecba 100644 --- a/platform/windows/wscript +++ b/platform/windows/wscript @@ -2,20 +2,52 @@ from __future__ import print_function import os -def start_menu_shortcut(file, link, target, debug=False): +def start_menu_shortcut_folder(variant): + return 'DCP-o-matic 2' + +def long_name(variant): + return 'DCP-o-matic 2' + +def short_name(variant): + return 'DCP-o-matic' + +def kdm_creator_name(variant): + return 'KDM Creator' + +def player_name(variant): + return 'Player' + +def verifier_name(variant): + return 'Verifier' + +def tool_name(variant, debug, tool): + name = 'DCP-o-matic 2 %s' % tool if debug: - print(f'CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\{link}.lnk" "$INSTDIR\\{target}"', file=file) - else: - print(f'CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\{link}.lnk" "$INSTDIR\\{target}"', file=file) + name += ' debug' + return name + + + +def start_menu_shortcut(file, link, target, variant, debug=False): + folder = start_menu_shortcut_folder(variant) + if debug: + folder += ' debug' + print('CreateShortCut "$SMPROGRAMS\\%s\\%s.lnk" "$INSTDIR\\%s"' % (folder, link, target), file=file) -def write_installer(bits, dcpomatic_version, debug, disk): +def write_installer(bits, dcpomatic_version, debug, disk, variant): + long_name_with_debug = long_name(variant) + short_name_with_debug = short_name(variant) + if debug: + long_name_with_debug += ' debug' + short_name_with_debug += ' debug' tools = [ + ('kdm', kdm_creator_name(variant)), + ('player', player_name(variant)), + ('verifier', verifier_name(variant)), ('batch', 'Batch Converter'), - ('kdm', 'KDM Creator'), ('kdm_cli', 'KDM Creator CLI'), - ('player', 'Player'), ('cli', 'CLI'), ('create', 'Creator'), ('playlist', 'Playlist Editor'), @@ -40,19 +72,11 @@ def write_installer(bits, dcpomatic_version, debug, disk): if bits == 64: print('!include "x64.nsh"', file=f) - if debug: - print('Name "DCP-o-matic debug"', file=f) - else: - print('Name "DCP-o-matic"', file=f) - + print('Name "%s"' % short_name_with_debug, file=f) print('RequestExecutionLevel admin', file=f) print('Unicode true', file=f) - outfile = 'DCP-o-matic ' - if debug: - outfile += 'Debug ' - outfile += '%s %d-bit Installer.exe' % (dcpomatic_version, bits) - + outfile = '%s %s %d-bit Installer.exe' % (short_name_with_debug, dcpomatic_version, bits) print('outFile "%s"' % outfile, file=f) print(""" @@ -67,10 +91,7 @@ def write_installer(bits, dcpomatic_version, debug, disk): else: program_files = "$PROGRAMFILES" - if debug: - print('InstallDir "%s\\DCP-o-matic 2 debug"' % program_files, file=f) - else: - print('InstallDir "%s\\DCP-o-matic 2"' % program_files, file=f) + print('InstallDir "%s\\%s"' % (program_files, long_name_with_debug), file=f) print(""" !insertmacro MUI_PAGE_WELCOME @@ -116,14 +137,14 @@ File "%static_deps%/bin/libssh.dll" File "%static_deps%/bin/libstdc++-6.dll" File "%static_deps%/bin/zlib1.dll" File "%static_deps%/bin/libjpeg-9.dll" -File "%static_deps%/bin/wxbase314u_gcc_custom.dll" -File "%static_deps%/bin/wxmsw314u_core_gcc_custom.dll" -File "%static_deps%/bin/wxmsw314u_adv_gcc_custom.dll" -File "%static_deps%/bin/wxmsw314u_richtext_gcc_custom.dll" -File "%static_deps%/bin/wxmsw314u_html_gcc_custom.dll" -File "%static_deps%/bin/wxmsw314u_gl_gcc_custom.dll" -File "%static_deps%/bin/wxmsw314u_propgrid_gcc_custom.dll" -File "%static_deps%/bin/wxbase314u_xml_gcc_custom.dll" +File "%static_deps%/bin/wxbase317u_gcc_custom.dll" +File "%static_deps%/bin/wxmsw317u_core_gcc_custom.dll" +File "%static_deps%/bin/wxmsw317u_adv_gcc_custom.dll" +File "%static_deps%/bin/wxmsw317u_richtext_gcc_custom.dll" +File "%static_deps%/bin/wxmsw317u_html_gcc_custom.dll" +File "%static_deps%/bin/wxmsw317u_gl_gcc_custom.dll" +File "%static_deps%/bin/wxmsw317u_propgrid_gcc_custom.dll" +File "%static_deps%/bin/wxbase317u_xml_gcc_custom.dll" File "%static_deps%/bin/libcairo-2.dll" File "%static_deps%/bin/libfreetype-6.dll" File "%static_deps%/bin/libgthread-2.0-0.dll" @@ -131,7 +152,8 @@ File "%static_deps%/bin/libpango-1.0-0.dll" File "%static_deps%/bin/libgmodule-2.0-0.dll" File "%static_deps%/bin/libpangocairo-1.0-0.dll" File "%static_deps%/bin/libpangowin32-1.0-0.dll" -File "%static_deps%/bin/libtiff-5.dll" +File "%static_deps%/bin/libpangoft2-1.0-0.dll" +File "%static_deps%/bin/libtiff-6.dll" File "%static_deps%/bin/libglibmm-2.4-1.dll" File "%static_deps%/bin/libxml++-2.6-2.dll" File "%static_deps%/bin/libxml2-2.dll" @@ -143,7 +165,7 @@ File "%static_deps%/bin/libxmlsec1.dll" File "%static_deps%/bin/libxmlsec1-openssl.dll" File "%static_deps%/bin/libexslt-0.dll" File "%static_deps%/bin/libxslt-1.dll" -File "%static_deps%/bin/libffi-6.dll" +File "%static_deps%/bin/libffi-7.dll" File "%static_deps%/bin/openssl.exe" File "%static_deps%/bin/libcurl-4.dll" File "%static_deps%/bin/libzip.dll" @@ -166,11 +188,15 @@ File "%static_deps%/bin/libunistring-2.dll" File "%static_deps%/bin/libssh2-1.dll" File "%static_deps%/bin/libgcrypt-20.dll" File "%static_deps%/bin/libgpg-error-0.dll" -File "%static_deps%/bin/libpangoft2-1.0-0.dll" File "%static_deps%/bin/libx264-155.dll" File "%static_deps%/bin/libwebp-7.dll" File "%static_deps%/bin/GLEW.dll" File "%static_deps%/bin/libdav1d.dll" +File "%static_deps%/bin/libbrotlidec.dll" +File "%static_deps%/bin/libbrotlicommon.dll" +File "%static_deps%/bin/libfribidi-0.dll" +File "%static_deps%/bin/libsharpyuv-0.dll" +File "%static_deps%/bin/libsqlite3-0.dll" """, file=f) if bits == 32: @@ -181,11 +207,11 @@ File "%static_deps%/bin/libdav1d.dll" print(""" File "%static_deps%/bin/libltdl-7.dll" File "%static_deps%/bin/libdl.dll" -File /oname=dcpomatic2_verify.exe "%cdist_deps%/bin/dcpverify.exe" +File /oname=dcpomatic2_verify_cli.exe "%cdist_deps%/bin/dcpverify.exe" File /oname=dcpomatic2_kdm_inspect.exe "%cdist_deps%/bin/dcpkdm.exe" File "%cdist_deps%/bin/leqm_nrt.dll" -File "%cdist_deps%/bin/asdcp-carl.dll" -File "%cdist_deps%/bin/kumu-carl.dll" +File "%cdist_deps%/bin/asdcp-dcpomatic.dll" +File "%cdist_deps%/bin/kumu-dcpomatic.dll" """, file=f) if disk: @@ -196,14 +222,14 @@ File "%cdist_deps%/lib/liblwext4.dll" """, file=f) print(""" -File "%cdist_deps%/bin/avcodec-58.dll" -File "%cdist_deps%/bin/avfilter-7.dll" -File "%cdist_deps%/bin/avformat-58.dll" -File "%cdist_deps%/bin/avutil-56.dll" -File "%cdist_deps%/bin/avdevice-58.dll" -File "%cdist_deps%/bin/postproc-55.dll" -File "%cdist_deps%/bin/swresample-3.dll" -File "%cdist_deps%/bin/swscale-5.dll" +File "%cdist_deps%/bin/avcodec-61.dll" +File "%cdist_deps%/bin/avfilter-10.dll" +File "%cdist_deps%/bin/avformat-61.dll" +File "%cdist_deps%/bin/avutil-59.dll" +File "%cdist_deps%/bin/avdevice-61.dll" +File "%cdist_deps%/bin/postproc-58.dll" +File "%cdist_deps%/bin/swresample-5.dll" +File "%cdist_deps%/bin/swscale-8.dll" File "%cdist_deps%/bin/dcp-1.0.dll" File "%cdist_deps%/bin/cxml-0.dll" File "%cdist_deps%/bin/sub-1.0.dll" @@ -232,47 +258,47 @@ SetOutPath "$INSTDIR\\locale\\fr\\LC_MESSAGES" File "%binaries%/src/lib/mo/fr_FR/libdcpomatic2.mo" File "%binaries%/src/wx/mo/fr_FR/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/fr_FR/dcpomatic2.mo" -File "%static_deps%/share/locale/fr/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/fr/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\it\\LC_MESSAGES" File "%binaries%/src/lib/mo/it_IT/libdcpomatic2.mo" File "%binaries%/src/wx/mo/it_IT/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/it_IT/dcpomatic2.mo" -File "%static_deps%/share/locale/it/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/it/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\es\\LC_MESSAGES" File "%binaries%/src/lib/mo/es_ES/libdcpomatic2.mo" File "%binaries%/src/wx/mo/es_ES/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/es_ES/dcpomatic2.mo" -File "%static_deps%/share/locale/es/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/es/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\sv\\LC_MESSAGES" File "%binaries%/src/lib/mo/sv_SE/libdcpomatic2.mo" File "%binaries%/src/wx/mo/sv_SE/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/sv_SE/dcpomatic2.mo" -File "%static_deps%/share/locale/sv/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/sv/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\de\\LC_MESSAGES" File "%binaries%/src/lib/mo/de_DE/libdcpomatic2.mo" File "%binaries%/src/wx/mo/de_DE/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/de_DE/dcpomatic2.mo" -File "%static_deps%/share/locale/de/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/de/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\nl\\LC_MESSAGES" File "%binaries%/src/lib/mo/nl_NL/libdcpomatic2.mo" File "%binaries%/src/wx/mo/nl_NL/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/nl_NL/dcpomatic2.mo" -File "%static_deps%/share/locale/nl/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/nl/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\ru\\LC_MESSAGES" File "%binaries%/src/lib/mo/ru_RU/libdcpomatic2.mo" File "%binaries%/src/wx/mo/ru_RU/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/ru_RU/dcpomatic2.mo" -File "%static_deps%/share/locale/ru/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/ru/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\pl\\LC_MESSAGES" File "%binaries%/src/lib/mo/pl_PL/libdcpomatic2.mo" File "%binaries%/src/wx/mo/pl_PL/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/pl_PL/dcpomatic2.mo" -File "%static_deps%/share/locale/pl/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/pl/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\da\\LC_MESSAGES" File "%binaries%/src/lib/mo/da_DK/libdcpomatic2.mo" File "%binaries%/src/wx/mo/da_DK/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/da_DK/dcpomatic2.mo" -File "%static_deps%/share/locale/da/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/da/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\pt_PT\\LC_MESSAGES" File "%binaries%/src/lib/mo/pt_PT/libdcpomatic2.mo" File "%binaries%/src/wx/mo/pt_PT/libdcpomatic2-wx.mo" @@ -289,7 +315,7 @@ SetOutPath "$INSTDIR\\locale\\cs\\LC_MESSAGES" File "%binaries%/src/lib/mo/cs_CZ/libdcpomatic2.mo" File "%binaries%/src/wx/mo/cs_CZ/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/cs_CZ/dcpomatic2.mo" -File "%static_deps%/share/locale/cs/LC_MESSAGES/wxstd.mo" +File "%static_deps%/share/locale/cs/LC_MESSAGES/wxstd-3.1.mo" SetOutPath "$INSTDIR\\locale\\uk\\LC_MESSAGES" File "%binaries%/src/lib/mo/uk_UA/libdcpomatic2.mo" File "%binaries%/src/wx/mo/uk_UA/libdcpomatic2-wx.mo" @@ -342,6 +368,8 @@ File "%graphics%/add_black.png" File "%graphics%/add_white.png" File "%graphics%/pause_black.png" File "%graphics%/pause_white.png" +SetOutPath "$INSTDIR\\web" +File "%web%/index.html" SetOutPath "$INSTDIR\\xsd" File "%cdist_deps%/share/libdcp/xsd/DCDMSubtitle-2010.xsd" File "%cdist_deps%/share/libdcp/xsd/DCDMSubtitle-2014.xsd" @@ -379,18 +407,12 @@ File "%cdist_deps%/share/libdcp/ratings" SectionEnd """, file=f) - if debug: - print('Section "DCP-o-matic 2 debug" SEC_MASTER', file=f) - else: - print('Section "DCP-o-matic 2" SEC_MASTER', file=f) + print('Section "%s" SEC_MASTER' % long_name_with_debug, file=f) print('SetOutPath "$INSTDIR\\bin"', file=f) print("SetShellVarContext all", file=f) - if debug: - print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2 debug"', file=f) - else: - print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2"', file=f) + print('CreateDirectory "$SMPROGRAMS\\%s"' % long_name_with_debug, file=f) print('File "%binaries%/src/tools/dcpomatic2.exe"', file=f) for s, l in tools: @@ -399,36 +421,23 @@ SectionEnd if disk: print(""" File "%binaries%/src/tools/dcpomatic2_disk_writer.exe" -File "%resources%/dcpomatic2_disk_writer.exe.manifest" +File "%binaries%/src/tools/dcpomatic2_disk_writer.exe.manifest" """, file=f) - if debug: - start_menu_shortcut(f, 'DCP-o-matic 2 debug', 'bin\\dcpomatic2_debug.bat', debug=True) - for s, l in tools: - start_menu_shortcut(f, f'DCP-o-matic 2 {l} debug', f'bin\\dcpomatic2_{s}_debug.bat', debug=True) - start_menu_shortcut(f, 'Uninstall DCP-o-matic 2 debug', 'Uninstall.exe', debug=True) - 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: - start_menu_shortcut(f, 'DCP-o-matic 2', 'bin\\dcpomatic2.exe') - for s, l in tools: - start_menu_shortcut(f, f'DCP-o-matic 2 {l}', f'bin\\dcpomatic2_{s}.exe') - start_menu_shortcut(f, 'Uninstall DCP-o-matic 2', 'Uninstall.exe') - print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic2" "DisplayName" "DCP-o-matic 2 (remove only)"', file=f) - print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic2" "UninstallString" "$INSTDIR\\Uninstall.exe"', file=f) + suffix = '_debug.bat' if debug else '.exe' + start_menu_shortcut(f, long_name_with_debug, 'bin\\dcpomatic2%s' % suffix, variant, debug=True) + for s, l in tools: + start_menu_shortcut(f, tool_name(variant, debug, l), 'bin\\dcpomatic2_%s%s' % (s, suffix), variant, debug=True) + start_menu_shortcut(f, 'Uninstall %s' % long_name_with_debug, 'Uninstall.exe', variant, debug=True) + print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s" "DisplayName" "%s (remove only)"' % (long_name_with_debug, long_name_with_debug), file=f) + print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%s" "UninstallString" "$INSTDIR\\Uninstall.exe"' % long_name_with_debug, file=f) print("SectionEnd", file=f) - if debug: - print('Section "DCP-o-matic 2 debug desktop shortcuts" SEC_MASTER_DESKTOP', file=f) - print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 debug.lnk" "$INSTDIR\\bin\\dcpomatic2_debug.bat" ""', file=f) - for s, l in tools: - print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 %s debug.lnk" "$INSTDIR\\bin\\dcpomatic2_%s_debug.bat" ""' % (l, s), file=f) - else: - print('Section "DCP-o-matic 2 desktop shortcuts" SEC_MASTER_DESKTOP', file=f) - print('CreateShortCut "$DESKTOP\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe" ""', file=f) - for s, l in tools: - print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 %s.lnk" "$INSTDIR\\bin\\dcpomatic2_%s.exe"' % (l, s), file=f) + print('Section "%s desktop shortcuts" SEC_MASTER_DESKTOP' % long_name_with_debug, file=f) + print('CreateShortCut "$DESKTOP\\%s.lnk" "$INSTDIR\\bin\\dcpomatic2%s" ""' % (long_name_with_debug, suffix), file=f) + for s, l in tools: + print('CreateShortCut "$DESKTOP\\%s.lnk" "$INSTDIR\\bin\\dcpomatic2_%s%s" ""' % (tool_name(variant, debug, l), s, suffix), file=f) print("SectionEnd", file=f) @@ -440,8 +449,8 @@ File "%binaries%/src/tools/dcpomatic2_server_cli.exe" File "%binaries%/src/tools/dcpomatic2_server.exe" """, file=f) - start_menu_shortcut(f, 'DCP-o-matic 2 Encode Server', 'bin\\dcpomatic2_server.exe') - start_menu_shortcut(f, 'Uninstall DCP-o-matic 2', 'Uninstall.exe') + start_menu_shortcut(f, 'DCP-o-matic 2 Encode Server', 'bin\\dcpomatic2_server.exe', variant) + start_menu_shortcut(f, 'Uninstall DCP-o-matic 2', 'Uninstall.exe', variant) print(""" SectionEnd @@ -512,5 +521,5 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\U def build(bld): - write_installer(32, bld.env.VERSION, bld.env.DEBUG, bld.env.ENABLE_DISK) - write_installer(64, bld.env.VERSION, bld.env.DEBUG, bld.env.ENABLE_DISK) + write_installer(32, bld.env.VERSION, bld.env.DEBUG, bld.env.ENABLE_DISK, bld.env.VARIANT) + write_installer(64, bld.env.VERSION, bld.env.DEBUG, bld.env.ENABLE_DISK, bld.env.VARIANT) |
