From 146c7a78e551af2f59c95215833f39be5b6c8a67 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 4 Jun 2016 11:34:41 -0700 Subject: Improved Windows installer (nkalvi, #2708, #2389). * Scope selection in the first screen. Since I couldn't detect if the user is 'real' admin user, default is still per user. * Scope is limited to per machine on servers. Though not perfect (couldn't detect `DisableMSI` policy), it should handle #2389 better. * For per machine, location can be changed by selecting Advanced. Localization: modified templates from WiX toolkit support localization very well. A short sample localization file for en-us is used. * Dialog elements are moved to their own files. --- windows/AdvancedWelcomeEulaDlg_Custom.wxs | 90 +++++++++++++++++++ windows/Pandoc-en-us.wxl | 14 +++ windows/WixUI_Advanced_Custom.wxs | 142 ++++++++++++++++++++++++++++++ windows/make-windows-installer.bat | 4 +- windows/pandoc.wxs | 134 +++++++++++----------------- 5 files changed, 299 insertions(+), 85 deletions(-) create mode 100644 windows/AdvancedWelcomeEulaDlg_Custom.wxs create mode 100644 windows/Pandoc-en-us.wxl create mode 100644 windows/WixUI_Advanced_Custom.wxs (limited to 'windows') diff --git a/windows/AdvancedWelcomeEulaDlg_Custom.wxs b/windows/AdvancedWelcomeEulaDlg_Custom.wxs new file mode 100644 index 000000000..61e6d8e00 --- /dev/null +++ b/windows/AdvancedWelcomeEulaDlg_Custom.wxs @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + LicenseAccepted AND (WixUISupportPerUser = 1) + (NOT LicenseAccepted) OR (WixUISupportPerUser = 0) + + + + ALLUSERS + NOT (ALLUSERS = 1) + NOT LicenseAccepted + LicenseAccepted + + + + + + 1 + + + + NOT LicenseAccepted OR NOT (ALLUSERS = 1) + (LicenseAccepted = "1") AND (ALLUSERS = 1) + + + + + + + 1 + + + + + + + + + + NOT Installed + + + \ No newline at end of file diff --git a/windows/Pandoc-en-us.wxl b/windows/Pandoc-en-us.wxl new file mode 100644 index 000000000..1981f24e8 --- /dev/null +++ b/windows/Pandoc-en-us.wxl @@ -0,0 +1,14 @@ + + + 1033 + + + COPYING.rtf + + [ProductName] was installed in + +[APPLICATIONFOLDER]. + +You may need to restart Cmd/Powershell windows before using it. + + \ No newline at end of file diff --git a/windows/WixUI_Advanced_Custom.wxs b/windows/WixUI_Advanced_Custom.wxs new file mode 100644 index 000000000..6f85d9961 --- /dev/null +++ b/windows/WixUI_Advanced_Custom.wxs @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged)) + + + + + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged)) + + + + + + + + + + + + + + + + + + + + + + + + 1 + + 1 + "1"]]> + + + + + + ALLUSERS = 1 + ALLUSERS = 1 + !(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser) + + ALLUSERS = 1 + ALLUSERS = 1 + + NOT (ALLUSERS = 1) + NOT (ALLUSERS = 1) + + + + + + + + + + + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + + NOT Installed AND WixAppFolder = "WixPerMachineFolder" + Installed + + 1 + + 1 + 1 + 1 + + Installed AND NOT PATCH + Installed AND PATCH + + Installed AND PATCH + + + + Installed AND PATCH + + + + + + \ No newline at end of file diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat index d3d9bb71c..2f0bf4b88 100644 --- a/windows/make-windows-installer.bat +++ b/windows/make-windows-installer.bat @@ -18,9 +18,9 @@ if "%VERSION%" == "" ( ) echo Detected version %VERSION% echo Creating msi... -candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% pandoc.wxs +candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% *.wxs -out wixobj\ if %errorlevel% neq 0 exit /b %errorlevel% -light -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj +light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out pandoc-%VERSION%-windows.msi wixobj\*.wixobj if %errorlevel% neq 0 exit /b %errorlevel% echo Starting kSign: sign, then quit kSign to complete the build... kSign diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index d19ed81e1..878800149 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -1,18 +1,16 @@ - - + - + - - @@ -21,7 +19,6 @@ Minimum='0.0.0.0' IncludeMinimum='yes' Maximum="99.0.0.0" IncludeMaximum="no" /> - @@ -126,92 +123,63 @@ + + + + + + + + + + + + + + + + - - - - - - - - ACTION="INSTALL" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) - - + Property="WIXUI_EXITDIALOGOPTIONALTEXT" + Value="!(loc.ExitDialogText)" /> + + + + + MsiNTProductType > 1 + + + MsiNTProductType = 1 + + + MsiNTProductType > 1 + + + MsiNTProductType = 1 + + + MsiNTProductType = 1 + + + MsiNTProductType > 1 + + + + + NOT Installed - - ACTION="INSTALL" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) - - - - - - - - - - - - - - - - - WixAppFolder = "WixPerUserFolder" - - WixAppFolder = "WixPerMachineFolder" - - WixAppFolder = "WixPerUserFolder" - - WixAppFolder = "WixPerMachineFolder" AND ALLUSERS = 1 - WixAppFolder = "WixPerUserFolder" AND ALLUSERS = 2 - WixAppFolder = "WixPerUserFolder" - - - - WIXUI_DONTVALIDATEPATH OR - WIXUI_INSTALLDIR_VALID="1" - - - - WixAppFolder = "WixPerUserFolder" - - - WixAppFolder = "WixPerMachineFolder" - - - + + + - + + -- cgit v1.2.3