fixup! Add /NOSERVER option to Windows installer to not install the encode server...
[dcpomatic.git] / platform / windows / wscript
index 2cc3d6453aa03b63a24facc517afa999e6d515e1..16de73e8aee315c69ae41a5888d4afa8d7edf0e7 100644 (file)
@@ -12,6 +12,7 @@ def write_installer(bits, dcpomatic_version, debug, disk):
         ('create', 'Creator'),
         ('playlist', 'Playlist Editor'),
         ('combiner', 'Combiner'),
+        ('editor', 'Editor'),
     ]
 
     if disk:
@@ -67,6 +68,133 @@ def write_installer(bits, dcpomatic_version, debug, disk):
 !insertmacro MUI_PAGE_DIRECTORY
 !insertmacro MUI_PAGE_COMPONENTS
 
+!define SF_USELECTED  0
+!define SF_RO         16
+
+!macro SecUnSelect SecId
+  Push $0
+  IntOp $0 ${SF_USELECTED} | ${SF_RO}
+  SectionSetFlags ${SecId} $0
+  SectionSetText  ${SecId} ""
+  Pop $0
+!macroend
+!define UnSelectSection '!insertmacro SecUnSelect'
+
+Function GetOptions
+       !define GetOptions `!insertmacro GetOptionsCall`
+       !macro GetOptionsCall _PARAMETERS _OPTION _RESULT
+               Push `${_PARAMETERS}`
+               Push `${_OPTION}`
+               Call GetOptions
+               Pop ${_RESULT}
+       !macroend
+       Exch $1
+       Exch
+       Exch $0
+       Exch
+       Push $2
+       Push $3
+       Push $4
+       Push $5
+       Push $6
+       Push $7
+       ClearErrors
+       StrCpy $2 $1 '' 1
+       StrCpy $1 $1 1
+       StrLen $3 $2
+       StrCpy $7 0
+       begin:
+       StrCpy $4 -1
+       StrCpy $6 ''
+       quote:
+       IntOp $4 $4 + 1
+       StrCpy $5 $0 1 $4
+       StrCmp $5$7 '0' notfound
+       StrCmp $5 '' trimright
+       StrCmp $5 '"' 0 +7
+       StrCmp $6 '' 0 +3
+       StrCpy $6 '"'
+       goto quote
+       StrCmp $6 '"' 0 +3
+       StrCpy $6 ''
+       goto quote
+       StrCmp $5 `'` 0 +7
+       StrCmp $6 `` 0 +3
+       StrCpy $6 `'`
+       goto quote
+       StrCmp $6 `'` 0 +3
+       StrCpy $6 ``
+       goto quote
+       StrCmp $5 '`' 0 +7
+       StrCmp $6 '' 0 +3
+       StrCpy $6 '`'
+       goto quote
+       StrCmp $6 '`' 0 +3
+       StrCpy $6 ''
+       goto quote
+       StrCmp $6 '"' quote
+       StrCmp $6 `'` quote
+       StrCmp $6 '`' quote
+       StrCmp $5 $1 0 quote
+       StrCmp $7 0 trimleft trimright
+       trimleft:
+       IntOp $4 $4 + 1
+       StrCpy $5 $0 $3 $4
+       StrCmp $5 '' notfound
+       StrCmp $5 $2 0 quote
+       IntOp $4 $4 + $3
+       StrCpy $0 $0 '' $4
+       StrCpy $4 $0 1
+       StrCmp $4 ' ' 0 +3
+       StrCpy $0 $0 '' 1
+       goto -3
+       StrCpy $7 1
+       goto begin
+       trimright:
+       StrCpy $0 $0 $4
+       StrCpy $4 $0 1 -1
+       StrCmp $4 ' ' 0 +3
+       StrCpy $0 $0 -1
+       goto -3
+       StrCpy $3 $0 1
+       StrCpy $4 $0 1 -1
+       StrCmp $3 $4 0 end
+       StrCmp $3 '"' +3
+       StrCmp $3 `'` +2
+       StrCmp $3 '`' 0 end
+       StrCpy $0 $0 -1 1
+       goto end
+       notfound:
+       SetErrors
+       StrCpy $0 ''
+       end:
+       Pop $7
+       Pop $6
+       Pop $5
+       Pop $4
+       Pop $3
+       Pop $2
+       Pop $1
+       Exch $0
+FunctionEnd
+
+Function .onInit
+${GetOptions} $R0 /NOSERVER= $0
+${If} $0 == "1"
+  ${UnSelectSection} "Encode server"
+${Endif}
+FunctionEnd
+
 Section "Common files (required)" SEC_COMMON
 SectionIn RO
     """, file=f)
@@ -82,15 +210,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:
@@ -150,8 +274,6 @@ 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"
@@ -169,9 +291,9 @@ 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"
@@ -210,6 +332,9 @@ File "%cdist_deps%/bin/libopenjp2.dll"
         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)
     else:
@@ -293,6 +418,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"
@@ -300,11 +433,16 @@ 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"
@@ -339,6 +477,8 @@ 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)