sources/installer/Product.wxs (399 lines of code) (raw):
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2019 Google LLC
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="IAP Desktop"
Language="1033"
Version="$(var.VERSION)"
Manufacturer="Google LLC"
UpgradeCode="8077382c-6b47-11ea-bc55-0242ac130003">
<Package
InstallerVersion="500"
Compressed="yes"
InstallScope="perUser"
InstallPrivileges="limited"
Platform="$(var.PLATFORM)"
Description="IAP Desktop version $(var.VERSION)"
Comments="Per-user installation package"
Keywords="Google Cloud, SSH, RDP, IAP"/>
<Icon Id="IapDesktopIco" SourceFile="$(var.BASEDIR)\icon.ico" />
<Property Id='ARPHELPLINK'>https://googlecloudplatform.github.io/iap-desktop/</Property>
<Property Id='ARPURLINFOABOUT'>https://googlecloudplatform.github.io/iap-desktop/</Property>
<Property Id='ARPPRODUCTICON'>IapDesktopIco</Property>
<MajorUpgrade
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Property Id="DISABLEMSI">
<!-- https://docs.microsoft.com/en-us/windows/win32/msi/disablemsi -->
<RegistrySearch
Id="DisableMsiSearch"
Root="HKLM"
Key="Software\Policies\Microsoft\Windows\Installer"
Name ="DisableMSI"
Win64="yes"
Type="raw"/>
</Property>
<Property Id="DISABLEUSERINSTALLS">
<!-- https://docs.microsoft.com/en-us/windows/win32/msi/disableuserinstalls -->
<RegistrySearch
Id="DisableUserInstallsSearch"
Root="HKLM"
Key="Software\Policies\Microsoft\Windows\Installer"
Name ="DisableUserInstalls"
Win64="yes"
Type="raw"/>
</Property>
<Property Id="WINDOWS_CURRENTBUILDNUMBER" Secure="yes">
<!--
Property must be marked as secure, otherwise Windows Installer
might (depending on policies and elevation state) reject to pass
it to the install sequence.
-->
<RegistrySearch
Id="CurrentBuildNumberSearch"
Root="HKLM"
Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion"
Name="CurrentBuildNumber"
Type="raw" />
</Property>
<Condition Message="This version of IAP Desktop requires Windows 10 (1607), Windows Server 2016, or higher.">
<!--
- The WebSocket implementation is only available in Windows 8/2012 and higher,
see https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket?view=netframework-4.8.
- Libssh2 CNG/ECDSA support requires Windows 10 or later.
- .NET 4.7 requires requires Windows 10 1607 (which excludes 1507, 1511).
This makes Windows 10 "Anniversary Update" 1607 (build 14393) the minium supported version.
NB. Windows 10 still uses VersionNT=603 and WindowsBuild=9600, so
we need to check the build number from the registry.
-->
<![CDATA[Installed OR (VersionNT >= 603 AND WINDOWS_CURRENTBUILDNUMBER >= 14393)]]>
</Condition>
<Condition Message="You need administrative privileges to install IAP Desktop on Windows Server. For more details, see https://bit.ly/iapdesktop-install.">
<!--
On Workstation SKU (MsiNTProductType = 1), non-elevated installs are fine,
but on Server, they are disallowed by policy (by default, anyway).
See https://serverfault.com/questions/580972/why-is-this-preventing-me-installing-an-msi-the-system-administrator-has-set-po.
-->
<![CDATA[Installed OR (MsiNTProductType = 1) OR MsiRunningElevated OR (DISABLEUSERINSTALLS = "#0" AND DISABLEMSI = "#0")]]>
</Condition>
<Feature Id="ProductFeature" Title="IAP Desktop" Level="1">
<ComponentRef Id="CompProgramFiles" />
<ComponentRef Id="CompLogs" />
<ComponentRef Id="CompConfig" />
<ComponentRef Id="CompConfigSamples" />
<ComponentRef Id="CompStartMenu" />
</Feature>
<WixVariable Id="WixUILicenseRtf" Value="$(var.BASEDIR)\License.rtf" />
<WixVariable Id="WixUIDialogBmp" Value="$(var.BASEDIR)\Background.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="$(var.BASEDIR)\Header.bmp" />
<UIRef Id="WixUI_Common" />
<UI>
<TextStyle Id="WixUI_Font_Normal" FaceName="Segoe UI" Size="9" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Segoe UI" Size="11" Red="98" Green="136" Blue="242" />
<TextStyle Id="WixUI_Font_Title" FaceName="Segoe UI" Size="11" Red="98" Green="136" Blue="242" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="Minimal" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<DialogRef Id="WelcomeEulaDlg" />
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
<Property Id="ARPNOMODIFY" Value="1" />
</UI>
<InstallUISequence>
<!-- Skip welcome dialog for upgrades -->
<Show Dialog="WelcomeEulaDlg" Before="ProgressDlg">NOT Installed AND Not WIX_UPGRADE_DETECTED</Show>
</InstallUISequence>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch IAP Desktop" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<CustomAction Id="LaunchApplication"
FileKey="FileIapDesktopExe"
ExeCommand="/postinstall"
Impersonate="yes"
Return="asyncNoWait"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Component Id="CompStartMenu" Guid="80774ea2-6b47-11ea-bc55-0242ac130003">
<RegistryValue
Id="RegStartMenuShortcuts"
Root="HKCU"
Key="Software\Google\IapDesktop\Installer"
Name="StartMenuShortcuts"
Type="integer"
KeyPath="yes"
Value="1" />
<Shortcut Id="Shortcut"
Name="IAP Desktop"
Description="Identity-Aware Proxy for Remote Desktop and SSH"
Target="[#FileIapDesktopExe]"
WorkingDirectory="DirIapDesktop"/>
</Component>
</Directory>
<Directory Id="AppDataFolder">
<Directory Id="DirGoogle" Name="Google">
<Directory Id="DirIapDesktop" Name="IAP Desktop">
<Component Id="CompProgramFiles" Guid="80773b6a-6b47-11ea-bc55-0242ac130003">
<RegistryValue
Id="RegProgramFiles"
Root="HKCU"
Key="Software\Google\IapDesktop\Installer"
Name="ProgramFiles"
Type="integer"
KeyPath="yes"
Value="1" />
<RemoveFolder Id="DirGoogle" Directory="DirGoogle" On="uninstall"/>
<RemoveFolder Id="DirIapDesktop" Directory="DirIapDesktop" On="uninstall"/>
<File
Id="FileIapDesktopExe"
Name="IapDesktop.exe"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\IapDesktop.exe"
Vital="yes"/>
<File
Id="FileIapDesktopExeConfig"
Name="IapDesktop.exe.config"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\IapDesktop.exe.config"
Vital="yes"/>
<File
Id="FileGoogleSolutionsIapDesktopApplicationDll"
Name="Google.Solutions.IapDesktop.Application.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.IapDesktop.Application.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsIapDesktopCoreDll"
Name="Google.Solutions.IapDesktop.Core.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.IapDesktop.Core.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsIapDll"
Name="Google.Solutions.Iap.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Iap.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsApisDll"
Name="Google.Solutions.Apis.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Apis.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsPlatformDll"
Name="Google.Solutions.Platform.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Platform.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsCommonDll"
Name="Google.Solutions.Common.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Common.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsSshDll"
Name="Google.Solutions.Ssh.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Ssh.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsMvvmDll"
Name="Google.Solutions.Mvvm.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Mvvm.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsSettingsDll"
Name="Google.Solutions.Settings.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Settings.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsTerminalDll"
Name="Google.Solutions.Terminal.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Terminal.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsTscDll"
Name="Google.Solutions.Tsc.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.Tsc.dll"
Vital="yes"/>
<File
Id="FileLibssh2Dll"
Name="Libssh2.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Libssh2.dll"
Vital="yes"/>
<File
Id="FileIcuDll"
Name="Icu.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Icu.dll"
Vital="yes"/>
<File
Id="FileMicrosoftTerminalControlDll"
Name="Microsoft.Terminal.Control.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Microsoft.Terminal.Control.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsManagementDll"
Name="Google.Solutions.IapDesktop.Extensions.Management.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.IapDesktop.Extensions.Management.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsSessionDll"
Name="Google.Solutions.IapDesktop.Extensions.Session.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.IapDesktop.Extensions.Session.dll"
Vital="yes"/>
<File
Id="FileGoogleSolutionsExplorerDll"
Name="Google.Solutions.IapDesktop.Extensions.Explorer.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Solutions.IapDesktop.Extensions.Explorer.dll"
Vital="yes"/>
<!-- SDK and dependencies -->
<File
Id="FileWeifenLuoWinFormsUIDockingDll"
Name="WeifenLuo.WinFormsUI.Docking.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\WeifenLuo.WinFormsUI.Docking.dll"
Vital="yes"/>
<File
Id="FileWeifenLuoWinFormsUIDockingThemeVS2015Dll"
Name="WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll"
Vital="yes"/>
<File
Id="FileAxInteropMSTSCLibDll"
Name="AxInterop.MSTSCLib.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\AxInterop.MSTSCLib.dll"
Vital="yes"/>
<File
Id="FileInteropMSTSCLibDll"
Name="Interop.MSTSCLib.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Interop.MSTSCLib.dll"
Vital="yes"/>
<File
Id="FileGoogleApisAuthDll"
Name="Google.Apis.Auth.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.Auth.dll"
Vital="yes"/>
<File
Id="FileGoogleApisComputeV1Dll"
Name="Google.Apis.Compute.v1.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.Compute.v1.dll"
Vital="yes"/>
<File
Id="FileGoogleApisCloudResourceManagerV1Dll"
Name="Google.Apis.CloudResourceManager.v1.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.CloudResourceManager.v1.dll"
Vital="yes"/>
<File
Id="FileGoogleApisLoggingV2Dll"
Name="Google.Apis.Logging.v2.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.Logging.v2.dll"
Vital="yes"/>
<File
Id="FileGoogleApisCoreDll"
Name="Google.Apis.Core.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.Core.dll"
Vital="yes"/>
<File
Id="FileGoogleApisDll"
Name="Google.Apis.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.dll"
Vital="yes"/>
<File
Id="FileGoogleApisCloudOSLoginV1Dll"
Name="Google.Apis.CloudOSLogin.v1.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Google.Apis.CloudOSLogin.v1.dll"
Vital="yes"/>
<File
Id="FileNewtonsoftJsonDll"
Name="Newtonsoft.Json.dll"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Newtonsoft.Json.dll"
Vital="yes"/>
</Component>
<Directory Id="DirLogs" Name="Logs">
<Component Id="CompLogs" Guid="80774f6a-6b47-11ea-bc55-0242ac130003">
<RegistryValue
Id="RegLogs"
Root="HKCU"
Key="Software\Google\IapDesktop\Installer"
Name="Logs"
Type="integer"
KeyPath="yes"
Value="1" />
<File
Id="FileLogsReadme"
Name="Readme.txt"
DiskId="1"
Source="$(var.BASEDIR)\LogsReadme.txt"
Vital="yes"/>
<File
Id="FileLogsDiagnosePs1"
Name="diagnose.ps1"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\diagnose.ps1"
Vital="yes"/>
<File
Id="FileLogsDiagnoseCmd"
Name="diagnose.cmd"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\diagnose.cmd"
Vital="yes"/>
<RemoveFolder Id="DirLogs" On="uninstall"/>
</Component>
</Directory>
<Directory Id="DirConfig" Name="Config">
<Component Id="CompConfig" Guid="80775028-6b47-11ea-bc55-0242ac130003">
<RegistryValue
Id="RegConfig"
Root="HKCU"
Key="Software\Google\IapDesktop\Installer"
Name="Config"
Type="integer"
KeyPath="yes"
Value="1" />
<!-- Place a readme.txt in the folder so that it's not empty -->
<File
Id="FileConfigReadme"
Name="Readme.txt"
DiskId="1"
Source="$(var.BASEDIR)\ConfigReadme.txt"
Vital="yes"/>
<RemoveFolder Id="DirConfig" On="uninstall"/>
</Component>
<Directory Id="DirConfigSamples" Name="Samples">
<Component Id="CompConfigSamples" Guid="807750dc-6b47-11ea-bc55-0242ac130003">
<RegistryValue
Id="RegConfigSamples"
Root="HKCU"
Key="Software\Google\IapDesktop\Installer"
Name="ConfigSamples"
Type="integer"
KeyPath="yes"
Value="1" />
<File
Id="FileMstscIapc"
Name="mstsc.iapc"
DiskId="1"
Source="$(var.BASEDIR)\obj\$(var.PLATFORM)\$(var.CONFIGURATION)\Sample-mstsc.iapc"
Vital="yes"/>
<RemoveFolder Id="DirConfigSamples" On="uninstall"/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Product>
<!--
Spare sequential GUIDs:
807751a4-6b47-11ea-bc55-0242ac130003
8077526c-6b47-11ea-bc55-0242ac130003
80775334-6b47-11ea-bc55-0242ac130003
80775b0e-6b47-11ea-bc55-0242ac130003
80775c44-6b47-11ea-bc55-0242ac130003
80775d0c-6b47-11ea-bc55-0242ac130003
-->
</Wix>