from __future__ import print_function
import os
-def write_installer(bits, version, debug):
+def write_installer(bits, dcpomatic_version, debug, disk):
+
+ tools = [
+ ('batch', 'Batch Converter'),
+ ('kdm', 'KDM Creator'),
+ ('kdm_cli', 'KDM Creator CLI'),
+ ('player', 'Player'),
+ ('cli', 'CLI'),
+ ('create', 'Creator'),
+ ('playlist', 'Playlist Editor'),
+ ('combiner', 'Combiner'),
+ ('editor', 'Editor'),
+ ]
+
+ if disk:
+ tools.append(('disk', 'Disk Writer'))
+
+ # It would be nice to use exist_ok here but it requires quite a new python
try:
os.makedirs('build/platform/windows')
except:
pass
- f = open('build/platform/windows/installer.%d.nsi' % bits, 'w')
+ filename = 'build/platform/windows/installer.%d.nsi' % bits
+
+ f = open(filename, 'w')
print('!include "MUI2.nsh"', file=f)
if bits == 64:
print('!include "x64.nsh"', file=f)
if debug:
- print('Name "DCP-o-matic Debug"', file=f)
+ print('Name "DCP-o-matic debug"', file=f)
else:
print('Name "DCP-o-matic"', file=f)
print('RequestExecutionLevel admin', file=f)
+ outfile = 'DCP-o-matic '
if debug:
- print('outFile "DCP-o-matic Debug %s %d-bit Installer.exe"' % (version, bits), file=f)
- else:
- print('outFile "DCP-o-matic %s %d-bit Installer.exe"' % (version, bits), file=f)
+ outfile += 'Debug '
+ outfile += '%s %d-bit Installer.exe' % (dcpomatic_version, bits)
+
+ print('outFile "%s"' % outfile, file=f)
print("""
-!define MUI_ICON "%graphics%/dcpomatic2.ico"
-!define MUI_UNICON "%graphics%/dcpomatic2.ico"
-!define MUI_SPECIALBITMAP "%graphics%/dcpomatic.bmp"
+!define MUI_ICON "%graphics%/windows/dcpomatic2.ico"
+!define MUI_UNICON "%graphics%/windows/dcpomatic2.ico"
+!define MUI_SPECIALBITMAP "%graphics%/windows/dcpomatic.bmp"
!include "Sections.nsh"
""", file=f)
program_files = "$PROGRAMFILES"
if debug:
- print('InstallDir "%s\\DCP-o-matic 2 Debug"' % program_files, file=f)
+ print('InstallDir "%s\\DCP-o-matic 2 debug"' % program_files, file=f)
else:
print('InstallDir "%s\\DCP-o-matic 2"' % program_files, file=f)
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 "%static_deps%/bin/libeay32.dll"
-File "%static_deps%/bin/libgcc_s_sjlj-1.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:
+ print('File "%static_deps%/bin/libgcc_s_seh-1.dll"', file=f)
+
+ print("""
File "%static_deps%/bin/libgio-2.0-0.dll"
File "%static_deps%/bin/libglib-2.0-0.dll"
File "%static_deps%/bin/libgobject-2.0-0.dll"
File "%static_deps%/bin/libiconv-2.dll"
-File "%static_deps%/bin/libjpeg-8.dll"
-File "%static_deps%/bin/libMagick++-6.Q16-3.dll"
-File "%static_deps%/bin/libMagickCore-6.Q16-1.dll"
-File "%static_deps%/bin/libMagickWand-6.Q16-1.dll"
-File "%static_deps%/bin/libpng15-15.dll"
+File "%static_deps%/bin/libjpeg-9.dll"
+File "%static_deps%/bin/libpng16-16.dll"
File "%static_deps%/bin/libsigc-2.0-0.dll"
File "%static_deps%/bin/libsndfile-1.dll"
File "%static_deps%/bin/libssh.dll"
File "%static_deps%/bin/libstdc++-6.dll"
File "%static_deps%/bin/zlib1.dll"
-File "%static_deps%/bin/libjpeg-8.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/wxbase30u_xml_gcc_custom.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/libcairo-2.dll"
File "%static_deps%/bin/libfreetype-6.dll"
File "%static_deps%/bin/libgthread-2.0-0.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-2.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/pango-querymodules.exe"
File "%static_deps%/bin/libsamplerate-0.dll"
-File "%static_deps%/lib/icuuc52.dll"
-File "%static_deps%/lib/icudt52.dll"
-File "%static_deps%/lib/icuin52.dll"
-
-File "%cdist_deps%/bin/asdcp-cth.dll"
-File "%cdist_deps%/bin/kumu-cth.dll"
-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 "%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/libwinpthread-1.dll"
+File "%static_deps%/bin/libgnutls-30.dll"
+File "%static_deps%/bin/libgmp-10.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"
+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=f)
+
+ if bits == 32:
+ print('File "%static_deps%/bin/libcrypto-3.dll"', file=f)
+ else:
+ 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"
+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/dcp-1.0.dll"
-File "%cdist_deps%/bin/libopenjp2.dll"
-File "%cdist_deps%/bin/swscale-4.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 debug:
print('File "%resources%/gdb_script"', file=f)
- print('File "%resources%/debug.bat"', file=f)
- print('File "%mingw%/gdb.exe"', file=f)
- print('File "%mingw%/addr2line.exe"', 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)
else:
print('File "%binaries%/src/wx/dcpomatic2-wx.dll"', file=f)
print('File "%binaries%/src/lib/dcpomatic2.dll"', file=f)
print("""
-SetOutPath "$INSTDIR\\lib\\pango\\1.8.0\\modules"
-File "%static_deps%/lib/pango/1.8.0/modules/pango-arabic-lang.dll"
-File "%static_deps%/lib/pango/1.8.0/modules/pango-basic-win32.dll"
-File "%static_deps%/lib/pango/1.8.0/modules/pango-indic-lang.dll"
-
SetOutPath "$INSTDIR\\bin"
-# I don't know why, but sometimes it seems that
-# delegates.xml must be in with the binaries, and
-# sometimes in the $PROFILE. Meh.
-File "%static_deps%/etc/ImageMagick-6/delegates.xml"
-SetOutPath "$PROFILE\\.magick"
-File "%static_deps%/etc/ImageMagick-6/delegates.xml"
SetOutPath "$INSTDIR\\locale\\fr\\LC_MESSAGES"
File "%binaries%/src/lib/mo/fr_FR/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"
-SetOutPath "$INSTDIR\\locale\\pt\\LC_MESSAGES"
+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"
File "%binaries%/src/tools/mo/pt_PT/dcpomatic2.mo"
+SetOutPath "$INSTDIR\\locale\\pt_BR\\LC_MESSAGES"
+File "%binaries%/src/lib/mo/pt_BR/libdcpomatic2.mo"
+File "%binaries%/src/wx/mo/pt_BR/libdcpomatic2-wx.mo"
+File "%binaries%/src/tools/mo/pt_BR/dcpomatic2.mo"
SetOutPath "$INSTDIR\\locale\\sk\\LC_MESSAGES"
File "%binaries%/src/lib/mo/sk_SK/libdcpomatic2.mo"
File "%binaries%/src/wx/mo/sk_SK/libdcpomatic2-wx.mo"
File "%binaries%/src/lib/mo/uk_UA/libdcpomatic2.mo"
File "%binaries%/src/wx/mo/uk_UA/libdcpomatic2-wx.mo"
File "%binaries%/src/tools/mo/uk_UA/dcpomatic2.mo"
+SetOutPath "$INSTDIR\\locale\\zh_cn\\LC_MESSAGES"
+File "%binaries%/src/lib/mo/zh_CN/libdcpomatic2.mo"
+File "%binaries%/src/wx/mo/zh_CN/libdcpomatic2-wx.mo"
+File "%binaries%/src/tools/mo/zh_CN/dcpomatic2.mo"
+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"
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"
-
-CreateDirectory "$INSTDIR\etc\pango"
-ReadEnvStr $0 COMSPEC
+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"
+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"
-nsExec::ExecToLog '$0 /C bin\pango-querymodules.exe > etc\pango\pango.modules'
+File "%cdist_deps%/share/libdcp/ratings"
SectionEnd
""", file=f)
if debug:
- print('Section "DCP-o-matic 2 Debug" SEC_MASTER', file=f)
+ print('Section "DCP-o-matic 2 debug" SEC_MASTER', file=f)
else:
print('Section "DCP-o-matic 2" SEC_MASTER', file=f)
print('SetOutPath "$INSTDIR\\bin"', file=f)
if debug:
- print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2 Debug"', file=f)
+ print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2 debug"', file=f)
else:
print('CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2"', file=f)
- 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"
+ 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_writer.exe"
+File "%resources%/dcpomatic2_disk_writer.exe.manifest"
""", file=f)
if debug:
- print('CreateShortCut "$DESKTOP\\DCP-o-matic 2 Debug.lnk" "$INSTDIR\\bin\\debug.bat" ""', file=f)
- print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2 Debug\\DCP-o-matic 2 Debug.lnk" "$INSTDIR\\bin\\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('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)
+ 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:
- print('CreateShortCut "$DESKTOP\\DCP-o-matic 2.lnk" "$INSTDIR\\bin\\dcpomatic2.exe" ""', file=f)
print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\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 "$SMPROGRAMS\\DCP-o-matic 2\\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)
- print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 KDM creator.lnk" "$INSTDIR\\bin\\dcpomatic2_kdm.exe"', file=f)
+ for s, l in tools:
+ print('CreateShortCut "$SMPROGRAMS\\DCP-o-matic 2\\DCP-o-matic 2 %s.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)
- print("""
-SectionEnd
- """, file=f)
+ print("SectionEnd", file=f)
- if not debug:
- print("""
+ 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("SectionEnd", file=f)
+
+ print("""
Section "Encode server" SEC_SERVER
SetOutPath "$INSTDIR\\bin"
CreateDirectory "$SMPROGRAMS\\DCP-o-matic 2"
File "%binaries%/src/tools/dcpomatic2_server_cli.exe"
File "%binaries%/src/tools/dcpomatic2_server.exe"
-CreateShortCut "$DESKTOP\\DCP-o-matic 2 encode server.lnk" "$INSTDIR\\bin\\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\\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
+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 debug:
- print('LangString DESC_SEC_MASTER ${LANG_ENGLISH} "DCP-o-matic 2 Debug"', file=f)
+ 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_SERVER ${LANG_ENGLISH} "DCP-o-matic 2 encode server"', 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_SERVER} $(DESC_SEC_SERVER)
+!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
Section "Uninstall"
RMDir /r "$INSTDIR\\*.*"
RMDir "$INSTDIR"
-Delete "$DESKTOP\\DCP-o-matic 2 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"
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 Debug"
+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 "$SMPROGRAMS\\DCP-o-matic 2 debug\\*.*"
+RmDir "$SMPROGRAMS\\DCP-o-matic 2 debug"
+DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\DCP-o-matic 2 debug"
+DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\DCP-o-matic 2 debug"
SectionEnd
""", file=f)
else:
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"
+ """, 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"
def build(bld):
- write_installer(32, bld.env.VERSION, bld.env.DEBUG)
- write_installer(64, bld.env.VERSION, bld.env.DEBUG)
+ 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)