X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=platform%2Fwindows%2Fwscript;h=074c932eb658c00e80f7d6bac8e506c23da5d594;hb=ef7e6f93278818db0862cfcd2438011c42ffee90;hp=e4603808711027f321861b112f4235f14dd44a80;hpb=5a3e836da9480bca0c3ef3384fa2010f358ccc7e;p=dcpomatic.git diff --git a/platform/windows/wscript b/platform/windows/wscript index e46038087..074c932eb 100644 --- a/platform/windows/wscript +++ b/platform/windows/wscript @@ -1,23 +1,19 @@ from __future__ import print_function import os -def write_installer(bits, dcpomatic_version, debug, variant, disk): +def write_installer(tools, bits, dcpomatic_version, debug): - tools = [ - ('batch', 'Batch Converter'), - ('kdm', 'KDM Creator'), - ('kdm_cli', 'KDM Creator CLI'), - ('player', 'Player'), - ('cli', 'CLI'), - ('create', 'Creator'), - ('playlist', 'Playlist Editor'), - ('combiner', 'Combiner'), - ] + def name_with_underscore(name): + return '' if name == 'main' else '_%s' % name - if disk: - tools.append(('disk', 'Disk Writer')) + def name_with_space(name): + return '' if name == 'main' else ' %s' % name - os.makedirs('build/platform/windows', exist_ok=True) + # It would be nice to use exist_ok here but it requires quite a new python + try: + os.makedirs('build/platform/windows') + except: + pass filename = 'build/platform/windows/installer.%d.nsi' % bits @@ -78,15 +74,11 @@ SetOutPath "$INSTDIR\\bin" WriteUninstaller "$INSTDIR\\Uninstall.exe" 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-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=f) + for lib in ['chrono', 'filesystem', 'system', 'thread', 'date_time', 'locale', 'regex']: + print('File "%%static_deps%%/bin/libboost_%s-mt-x%d.dll"' % (lib, bits), file=f) + if bits == 32: print('File "%static_deps%/bin/libgcc_s_sjlj-1.dll"', file=f) else: @@ -105,14 +97,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/wxbase30u_gcc_custom.dll" -File "%static_deps%/bin/wxmsw30u_core_gcc_custom.dll" -File "%static_deps%/bin/wxmsw30u_adv_gcc_custom.dll" -File "%static_deps%/bin/wxmsw30u_richtext_gcc_custom.dll" -File "%static_deps%/bin/wxmsw30u_html_gcc_custom.dll" -File "%static_deps%/bin/wxmsw30u_gl_gcc_custom.dll" -File "%static_deps%/bin/wxmsw30u_propgrid_gcc_custom.dll" -File "%static_deps%/bin/wxbase30u_xml_gcc_custom.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/libcairo-2.dll" File "%static_deps%/bin/libfreetype-6.dll" File "%static_deps%/bin/libgthread-2.0-0.dll" @@ -139,19 +131,17 @@ 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-7.dll" -File "%static_deps%/bin/icuuc65.dll" -File "%static_deps%/bin/icudt65.dll" -File "%static_deps%/bin/icuin65.dll" +File "%static_deps%/bin/libnettle-8.dll" +File "%static_deps%/bin/icuuc66.dll" +File "%static_deps%/bin/icudt66.dll" +File "%static_deps%/bin/icuin66.dll" File "%static_deps%/bin/liblzma-5.dll" File "%static_deps%/bin/libpcre-1.dll" File "%static_deps%/bin/libharfbuzz-0.dll" -File "%static_deps%/bin/libjasper.dll" -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-5.dll" +File "%static_deps%/bin/libhogweed-6.dll" File "%static_deps%/bin/libidn2-0.dll" File "%static_deps%/bin/libunistring-2.dll" File "%static_deps%/bin/libssh2-1.dll" @@ -160,29 +150,26 @@ 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=f) if bits == 32: - print('File "%static_deps%/bin/libcrypto-1_1.dll"', file=f) + print('File "%static_deps%/bin/libcrypto-3.dll"', file=f) else: - print('File "%static_deps%/bin/libcrypto-1_1-x64.dll"', file=f) + print('File "%static_deps%/bin/libcrypto-3-x64.dll"', file=f) 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_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=f) - - if disk: - print(""" File "%static_deps%/bin/libnanomsg.dll" File "%cdist_deps%/lib/libblockdev.dll" 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" @@ -201,10 +188,12 @@ File "%cdist_deps%/bin/libopenjp2.dll" if debug: print('File "%resources%/gdb_script"', file=f) - print('File "%resources%/dcpomatic2_debug.bat"', file=f) print('File "%mingw%/bin/gdb.exe"', file=f) + print('File "%static_deps%/bin/libtermcap.dll"', file=f) + print('File "%static_deps%/bin/libreadline8.dll"', file=f) + print('File "%static_deps%/bin/libmman.dll"', file=f) for s, l in tools: - print('File "%%resources%%/dcpomatic2_%s_debug.bat"' % s, file=f) + print('File "%%resources%%/dcpomatic2%s_debug.bat"' % name_with_underscore(s), file=f) else: print('File "%binaries%/src/wx/dcpomatic2-wx.dll"', file=f) print('File "%binaries%/src/lib/dcpomatic2.dll"', file=f) @@ -286,6 +275,14 @@ SetOutPath "$INSTDIR\\locale\\tr_tr\\LC_MESSAGES" File "%binaries%/src/lib/mo/tr_TR/libdcpomatic2.mo" File "%binaries%/src/wx/mo/tr_TR/libdcpomatic2-wx.mo" File "%binaries%/src/tools/mo/tr_TR/dcpomatic2.mo" +SetOutPath "$INSTDIR\\locale\\sl_si\\LC_MESSAGES" +File "%binaries%/src/lib/mo/sl_SI/libdcpomatic2.mo" +File "%binaries%/src/wx/mo/sl_SI/libdcpomatic2-wx.mo" +File "%binaries%/src/tools/mo/sl_SI/dcpomatic2.mo" +SetOutPath "$INSTDIR\\locale\\hu_hu\\LC_MESSAGES" +File "%binaries%/src/lib/mo/hu_HU/libdcpomatic2.mo" +File "%binaries%/src/wx/mo/hu_HU/libdcpomatic2-wx.mo" +File "%binaries%/src/tools/mo/hu_HU/dcpomatic2.mo" SetOutPath "$INSTDIR" File "%resources%/../../fonts/LiberationSans-Regular.ttf" @@ -293,29 +290,57 @@ File "%resources%/../../fonts/LiberationSans-Italic.ttf" File "%resources%/../../fonts/LiberationSans-Bold.ttf" File /oname=fonts.conf "%resources%/../../fonts/fonts.conf.windows" File "%graphics%/splash.png" -File "%graphics%/zoom.png" -File "%graphics%/zoom_all.png" -File "%graphics%/select.png" -File "%graphics%/snap.png" -File "%graphics%/sequence.png" +File "%graphics%/zoom_white.png" +File "%graphics%/zoom_black.png" +File "%graphics%/zoom_all_white.png" +File "%graphics%/zoom_all_black.png" +File "%graphics%/select_white.png" +File "%graphics%/select_black.png" +File "%graphics%/snap_white.png" +File "%graphics%/snap_black.png" +File "%graphics%/sequence_white.png" +File "%graphics%/sequence_black.png" File "%graphics%/me.jpg" File "%graphics%/tick.png" File "%graphics%/no_tick.png" File "%graphics%/link.png" +File "%graphics%/add_black.png" +File "%graphics%/add_white.png" +File "%graphics%/pause_black.png" +File "%graphics%/pause_white.png" SetOutPath "$INSTDIR\\xsd" +File "%cdist_deps%/share/libdcp/xsd/DCDMSubtitle-2010.xsd" +File "%cdist_deps%/share/libdcp/xsd/DCDMSubtitle-2014.xsd" +File "%cdist_deps%/share/libdcp/xsd/DCSubtitle.v1.mattsson.xsd" +File "%cdist_deps%/share/libdcp/xsd/Dolby-2012-AD.xsd" +File "%cdist_deps%/share/libdcp/xsd/isdcf-mca.xsd" +File "%cdist_deps%/share/libdcp/xsd/Main-Stereo-Picture-CPL.xsd" +File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-AM-20040311.xsd" +File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-CC-CPL-20070926.xsd" +File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-CPL-20040511.xsd" +File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-PKL-20040311.xsd" +File "%cdist_deps%/share/libdcp/xsd/SMPTE-335-2012.xsd" +File "%cdist_deps%/share/libdcp/xsd/SMPTE-395-2014-13-1-aaf.xsd" +File "%cdist_deps%/share/libdcp/xsd/SMPTE-429-10-2008.xsd" +File "%cdist_deps%/share/libdcp/xsd/SMPTE-429-12-2008.xsd" +File "%cdist_deps%/share/libdcp/xsd/SMPTE-429-16.xsd" File "%cdist_deps%/share/libdcp/xsd/SMPTE-429-7-2006-CPL.xsd" File "%cdist_deps%/share/libdcp/xsd/SMPTE-429-8-2006-PKL.xsd" File "%cdist_deps%/share/libdcp/xsd/SMPTE-429-9-2007-AM.xsd" +File "%cdist_deps%/share/libdcp/xsd/xlink.xsd" File "%cdist_deps%/share/libdcp/xsd/xmldsig-core-schema.xsd" File "%cdist_deps%/share/libdcp/xsd/XMLSchema.dtd" File "%cdist_deps%/share/libdcp/xsd/XMLSchema.xsd" File "%cdist_deps%/share/libdcp/xsd/xml.xsd" -File "%cdist_deps%/share/libdcp/xsd/DCDMSubtitle-2010.xsd" -File "%cdist_deps%/share/libdcp/xsd/DCSubtitle.v1.mattsson.xsd" -File "%cdist_deps%/share/libdcp/xsd/Main-Stereo-Picture-CPL.xsd" -File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-AM-20040311.xsd" -File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-CPL-20040511.xsd" -File "%cdist_deps%/share/libdcp/xsd/PROTO-ASDCP-PKL-20040311.xsd" +SetOutPath "$INSTDIR\\tags" +File "%cdist_deps%/share/libdcp/tags/extlang" +File "%cdist_deps%/share/libdcp/tags/language" +File "%cdist_deps%/share/libdcp/tags/region" +File "%cdist_deps%/share/libdcp/tags/script" +File "%cdist_deps%/share/libdcp/tags/variant" +File "%cdist_deps%/share/libdcp/tags/dcnc" +SetOutPath "$INSTDIR" +File "%cdist_deps%/share/libdcp/ratings" SectionEnd """, file=f) @@ -332,27 +357,24 @@ SectionEnd else: print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2"', file=f) - print('File "%binaries%/src/tools/dcpomatic2.exe"', file=f) for s, l in tools: - print('File "%%binaries%%/src/tools/dcpomatic2_%s.exe"' % s, file=f) + print('File "%%binaries%%/src/tools/dcpomatic2%s.exe"' % name_with_underscore(s), file=f) - if disk: + if [t for t in tools if t[0] == 'disk']: print(""" File "%binaries%/src/tools/dcpomatic2_disk_writer.exe" File "%resources%/dcpomatic2_disk_writer.exe.manifest" - """, file=f) + """, file=f) if debug: - print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 debug.lnk" "$INSTDIR\\bin\\dcpomatic2_debug.bat"', file=f) for s, l in tools: - print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2 %s debug.lnk" "$INSTDIR\\bin\\dcpomatic2_%s_debug.bat" ""' % (l, s), file=f) + print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\DCP-o-matic 2%s debug.lnk" "$INSTDIR\\bin\\dcpomatic2%s_debug.bat" ""' % (name_with_space(l), name_with_underscore(s)), file=f) print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 debug\\Uninstall DCP-o-matic 2 debug.lnk" "$INSTDIR\\Uninstall.exe"', 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) print('WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 debug" "UninstallString" "$INSTDIR\\Uninstall.exe"', file=f) else: - print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe"', file=f) for s, l in tools: - print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 %s Converter.lnk" "$INSTDIR\\bin\\dcpomatic2_%s.exe"' % (l, s), file=f) + print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2%s.lnk" "$INSTDIR\\bin\\dcpomatic2%s.exe"' % (name_with_space(l), name_with_underscore(s)), file=f) print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\Uninstall DCP-o-matic 2.lnk" "$INSTDIR\\Uninstall.exe"', file=f) 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) @@ -361,14 +383,12 @@ File "%resources%/dcpomatic2_disk_writer.exe.manifest" 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) + print('CreateShortCut "$DESKTOP\\DCP-o-matic 2%s debug.lnk" "$INSTDIR\\bin\\dcpomatic2%s_debug.bat" ""' % (name_with_space(l), name_with_underscore(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('CreateShortCut "$DESKTOP\\DCP-o-matic 2%s.lnk" "$INSTDIR\\bin\\dcpomatic2%s.exe"' % (name_with_space(l), name_with_underscore(s)), file=f) print("SectionEnd", file=f) @@ -418,11 +438,10 @@ SectionEnd Section "Uninstall" RMDir /r "$INSTDIR\\*.*" RMDir "$INSTDIR" -Delete "$DESKTOP\\DCP-o-matic 2 debug.lnk" """, file=f) for s, l in tools: - print('Delete "$DESKTOP\\DCP-o-matic 2 %s debug.lnk"' % l, file=f) + print('Delete "$DESKTOP\\DCP-o-matic 2%s debug.lnk"' % name_with_space(l), file=f) print(""" Delete "$SMPROGRAMS\\DCP-o-matic 2 debug\\*.*" @@ -436,11 +455,10 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\U Section "Uninstall" RMDir /r "$INSTDIR\\*.*" RMDir "$INSTDIR" -Delete "$DESKTOP\\DCP-o-matic 2.lnk" """, file=f) for s, l in tools: - print('Delete "$DESKTOP\\DCP-o-matic 2 %s.lnk"' % l) + print('Delete "$DESKTOP\\DCP-o-matic 2%s.lnk"' % name_with_space(l)) print(""" Delete "$SMPROGRAMS\\DCP-o-matic 2\\*.*" @@ -452,5 +470,20 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\U def build(bld): - write_installer(32, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK) - write_installer(64, bld.env.VERSION, bld.env.DEBUG, bld.env.VARIANT, bld.env.ENABLE_DISK) + all_tools = [ + ('main', 'main'), + ('batch', 'Batch Converter'), + ('kdm', 'KDM Creator'), + ('kdm_cli', 'KDM Creator CLI'), + ('player', 'Player'), + ('cli', 'CLI'), + ('create', 'Creator'), + ('playlist', 'Playlist Editor'), + ('combiner', 'Combiner'), + ('editor', 'Editor'), + ('map', 'Map'), + ('disk', 'Disk Writer'), + ] + + write_installer(all_tools, 32, bld.env.VERSION, bld.env.DEBUG) + write_installer(all_tools, 64, bld.env.VERSION, bld.env.DEBUG)