mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Installer: condition out use of WiX DLL components.
This arranges that we can build a completely pure MSI file, which doesn't depend on any native code at install time. We don't lose much by doing this - only the option to pop up the README file at the end of installation, and validation of the install directory when you select it from a file browser. My immediate use for this is that I want to use it for installers that will run on Windows on Arm. But it also seems to me like quite an attractive property in its own right - no native code at all running at install time would be an _especially_ good guarantee that that code can't be hijacked by DLLs in the download directory. So I may yet decide that the features we're losing are not critical to _any_ version of the MSI, and throw them out unconditionally.
This commit is contained in:
parent
cbf4b10ebd
commit
23698d6164
4
Buildscr
4
Buildscr
@ -195,8 +195,8 @@ in putty/windows do make -f Makefile.clangcl BUILDDIR=buildold/ cleantestprogs
|
||||
ifneq "$(cross_winsigncode)" "" in putty/windows do $(cross_winsigncode) -N -i https://www.chiark.greenend.org.uk/~sgtatham/putty/ build*/*.exe abuild*/*.exe
|
||||
|
||||
# Build a WiX MSI installer, for each of build32 and build64.
|
||||
in putty/windows with wixonlinux do candle -arch x86 -dWin64=no -dBuilddir=build32/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer32.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dWin64=yes -dBuilddir=build64/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer64.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x86 -dWin64=no -dDllOk=yes -dBuilddir=build32/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer32.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dWin64=yes -dDllOk=yes -dBuilddir=build64/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer64.msi -spdb
|
||||
|
||||
# Sign the Windows installers.
|
||||
ifneq "$(cross_winsigncode)" "" in putty/windows do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/putty/ -n "PuTTY Installer" installer32.msi installer64.msi
|
||||
|
@ -452,8 +452,10 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569(v=vs.85).aspx
|
||||
<DialogRef Id="UserExit" />
|
||||
<DialogRef Id="FeaturesDlg" />
|
||||
|
||||
<?if $(var.DllOk) = yes ?>
|
||||
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
|
||||
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
|
||||
<?endif ?>
|
||||
|
||||
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
|
||||
|
||||
@ -462,9 +464,13 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569(v=vs.85).aspx
|
||||
|
||||
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
|
||||
<?if $(var.DllOk) = yes ?>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
|
||||
<?else ?>
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="2">1</Publish>
|
||||
<?endif ?>
|
||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
|
||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
|
||||
|
||||
@ -482,8 +488,10 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569(v=vs.85).aspx
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
|
||||
|
||||
<?if $(var.DllOk) = yes ?>
|
||||
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction"
|
||||
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
|
||||
<?endif ?>
|
||||
|
||||
<!--
|
||||
This ARPNOMODIFY flag prohibits changing the set of
|
||||
@ -509,6 +517,7 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569(v=vs.85).aspx
|
||||
<Property Id="ARPNOMODIFY" Value="1" />
|
||||
</UI>
|
||||
|
||||
<?if $(var.DllOk) = yes ?>
|
||||
<!--
|
||||
Offer to display README after installation.
|
||||
-->
|
||||
@ -518,6 +527,7 @@ https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569(v=vs.85).aspx
|
||||
<Property Id="WixShellExecTarget" Value="[#README_File]" />
|
||||
<CustomAction Id="LaunchApplication" BinaryKey="WixCA"
|
||||
DllEntry="WixShellExec" Impersonate="yes" />
|
||||
<?endif ?>
|
||||
|
||||
<!-- Glue: tell the install dir part of the UI what id my actual
|
||||
install dir is known by. Otherwise the former won't know how
|
||||
|
Loading…
Reference in New Issue
Block a user