X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=platform%2Fwindows%2Fwscript;h=64f0a57cf9a47de1e62a6b57a7717986e2cca68b;hb=2cfe6fecebf831346f4782d7cf2f2fbc2b9ba71f;hp=77f9bd0ccc7bfafad1dde19851b7849fe010d400;hpb=a1f7bf2d9e5610075fbd898cdf52f4f8373741f2;p=dcpomatic.git diff --git a/platform/windows/wscript b/platform/windows/wscript index 77f9bd0cc..64f0a57cf 100644 --- a/platform/windows/wscript +++ b/platform/windows/wscript @@ -1,16 +1,24 @@ from __future__ import print_function import os -def write_installer(bits, windows_version, dcpomatic_version, debug, variant, disk): - try: - os.makedirs('build/platform/windows') - except: - pass +def write_installer(bits, dcpomatic_version, debug, variant, disk): + + tools = [ + ('batch', 'Batch Converter'), + ('kdm', 'KDM Creator'), + ('kdm_cli', 'KDM Creator CLI'), + ('player', 'Player'), + ('cli', 'CLI'), + ('create', 'Creator'), + ('playlist', 'Playlist Editor') + ] - filename = 'build/platform/windows/installer.' - if windows_version is not None: - filename += 'xp.' - filename += '%d.nsi' % bits + if disk: + tools.append(('disk', 'Disk Writer')) + + os.makedirs('build/platform/windows', exist_ok=True) + + filename = 'build/platform/windows/installer.%d.nsi' % bits f = open(filename, 'w') print('!include "MUI2.nsh"', file=f) @@ -27,10 +35,7 @@ def write_installer(bits, windows_version, dcpomatic_version, debug, variant, di outfile = 'DCP-o-matic ' if debug: outfile += 'Debug ' - outfile += '%s %d-bit ' % (dcpomatic_version, bits) - if windows_version is 'xp': - outfile += 'XP ' - outfile += 'Installer.exe' + outfile += '%s %d-bit Installer.exe' % (dcpomatic_version, bits) print('outFile "%s"' % outfile, file=f) @@ -105,6 +110,7 @@ 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/libcairo-2.dll" File "%static_deps%/bin/libfreetype-6.dll" @@ -153,9 +159,17 @@ 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/libcrypto-1_1-x64.dll" + """, file=f) + + if bits == 32: + print('File "%static_deps%/bin/libcrypto-1_1.dll"', file=f) + else: + print('File "%static_deps%/bin/libcrypto-1_1-x64.dll"', file=f) + + print(""" File "%static_deps%/bin/libltdl-7.dll" File "%static_deps%/bin/libdl.dll" +File "%cdist_deps%/bin/leqm_nrt.dll" File "%cdist_deps%/bin/asdcp-carl.dll" File "%cdist_deps%/bin/kumu-carl.dll" """, file=f) @@ -167,19 +181,7 @@ 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" -File "%cdist_deps%/bin/avfilter-6.dll" -File "%cdist_deps%/bin/avformat-57.dll" -File "%cdist_deps%/bin/avutil-55.dll" -File "%cdist_deps%/bin/avdevice-57.dll" -File "%cdist_deps%/bin/postproc-54.dll" -File "%cdist_deps%/bin/swresample-2.dll" -File "%cdist_deps%/bin/swscale-4.dll" - """, file=f) - else: - print(""" + print(""" File "%cdist_deps%/bin/avcodec-58.dll" File "%cdist_deps%/bin/avfilter-7.dll" File "%cdist_deps%/bin/avformat-58.dll" @@ -188,30 +190,20 @@ 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=f) - - print(""" File "%cdist_deps%/bin/dcp-1.0.dll" File "%cdist_deps%/bin/cxml-0.dll" File "%cdist_deps%/bin/sub-1.0.dll" File "%cdist_deps%/bin/ffprobe.exe" File "%cdist_deps%/src/openssl/apps/openssl.exe" +File "%cdist_deps%/bin/libopenjp2.dll" """, file=f) - if windows_version == 'xp': - print('File "%cdist_deps%/bin/libopenjpeg-1.dll"', file=f) - else: - print('File "%cdist_deps%/bin/libopenjp2.dll"', file=f) - if debug: print('File "%resources%/gdb_script"', file=f) print('File "%resources%/dcpomatic2_debug.bat"', file=f) - 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) + for s, l in tools: + print('File "%%resources%%/dcpomatic2_%s_debug.bat"' % s, file=f) else: print('File "%binaries%/src/wx/dcpomatic2-wx.dll"', file=f) print('File "%binaries%/src/lib/dcpomatic2.dll"', file=f) @@ -308,6 +300,7 @@ File "%graphics%/sequence.png" File "%graphics%/me.jpg" File "%graphics%/tick.png" File "%graphics%/no_tick.png" +File "%graphics%/link.png" SetOutPath "$INSTDIR\\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" @@ -316,6 +309,13 @@ 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" + SectionEnd """, file=f) @@ -331,49 +331,28 @@ SectionEnd else: print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2"', file=f) - if variant != 'swaroop-theater': - print(""" -File "%binaries%/src/tools/dcpomatic2.exe" -File "%binaries%/src/tools/dcpomatic2_batch.exe" -File "%binaries%/src/tools/dcpomatic2_cli.exe" -File "%binaries%/src/tools/dcpomatic2_create.exe" -File "%binaries%/src/tools/dcpomatic2_kdm.exe" -File "%binaries%/src/tools/dcpomatic2_kdm_cli.exe" - """, 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) 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" - """, file=f) - if debug: - 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) - 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('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\\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: - 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) - 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) + 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\\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) @@ -381,27 +360,18 @@ 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-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) - if disk: - print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Disk Writer debug.lnk" "$INSTDIR\\bin\\dcpomatic2_disk_debug.bat" ""', 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 Player.lnk" "$INSTDIR\\bin\\dcpomatic2_player.exe"', file=f) - 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) - if disk: - print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Disk Writer.lnk" "$INSTDIR\\bin\\dcpomatic2_disk.exe"', 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("SectionEnd", file=f) - if not debug and variant != "swaroop-theater": - print(""" + print(""" Section "Encode server" SEC_SERVER SetOutPath "$INSTDIR\\bin" CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2" @@ -410,30 +380,26 @@ File "%binaries%/src/tools/dcpomatic2_server.exe" CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 Encode Server.lnk" "$INSTDIR\\bin\\dcpomatic2_server.exe" "" "$INSTDIR\\bin\\dcpomatic2_server.exe" 0 CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\Uninstall DCP-o-matic 2.lnk" "$INSTDIR\\Uninstall.exe" "" "$INSTDIR\\Uninstall.exe" 0 SectionEnd - """, file=f) - - print(""" Section "Encode server desktop shortcuts" SEC_SERVER_DESKTOP CreateShortCut "$DESKTOP\\DCP-o-matic 2 Encode Server.lnk" "$INSTDIR\\bin\\dcpomatic2_server.exe" "" SectionEnd """, file=f) - 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) - 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) + 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) + 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(""" !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SEC_MASTER} $(DESC_SEC_MASTER) - !insertmacro MUI_DESCRIPTION_TEXT ${SEC_MASTER_DESKTOP} $(DESC_SEC_MASTER_DESKTOP) - !insertmacro MUI_DESCRIPTION_TEXT ${SEC_SERVER} $(DESC_SEC_SERVER) - !insertmacro MUI_DESCRIPTION_TEXT ${SEC_SERVER_DESKTOP} $(DESC_SEC_SERVER_DESKTOP) +!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MASTER} $(DESC_SEC_MASTER) +!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MASTER_DESKTOP} $(DESC_SEC_MASTER_DESKTOP) +!insertmacro MUI_DESCRIPTION_TEXT ${SEC_SERVER} $(DESC_SEC_SERVER) +!insertmacro MUI_DESCRIPTION_TEXT ${SEC_SERVER_DESKTOP} $(DESC_SEC_SERVER_DESKTOP) !insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_PAGE_INSTFILES @@ -452,9 +418,12 @@ Section "Uninstall" RMDir /r "$INSTDIR\\*.*" 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" + """, file=f) + + for s, l in tools: + print('Delete "$DESKTOP\\DCP-o-matic 2 %s debug.lnk"' % l, file=f) + + print(""" Delete "$SMPROGRAMS\\DCP-o-matic 2 debug\\*.*" RmDir "$SMPROGRAMS\\DCP-o-matic 2 debug" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2 debug" @@ -467,10 +436,12 @@ Section "Uninstall" RMDir /r "$INSTDIR\\*.*" RMDir "$INSTDIR" 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" + """, file=f) + + for s, l in tools: + print('Delete "$DESKTOP\\DCP-o-matic 2 %s.lnk"' % l) + + print(""" Delete "$SMPROGRAMS\\DCP-o-matic 2\\*.*" RmDir "$SMPROGRAMS\\DCP-o-matic 2" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2" @@ -480,7 +451,5 @@ 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, 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) + 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)