2022-01-06 02:28:09 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<?define UpgradeCode="6341382d-c0a9-4238-9188-be9607e3fab2"?>
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
2022-05-13 23:55:39 +08:00
<?if $(var.Platform) = x64?>
<?define BinDir="$(var.RepoDir)$(var.Platform)\$(var.Configuration)\" ?>
<?define PowerToysPlatform="x64"?>
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/5681bdf9-0a48-45ac-b7bf-21b7b61657aa/bbdc43bc7bf0d15b97c1a98ae2e82ec0/windowsdesktop-runtime-6.0.5-win-x64.exe"?>
<?define Dotnet6PayloadSize="57791288"?>
<?define Dotnet6PayloadHash="B5B1819CCA753B070181F50411375B80412860A3"?>
<?define WinAppSDKPayloadSize="57090456"?>
<?define WinAppSDKPayloadHash="1269BB136655325EF6D66A018269BDAB3921E56B"?>
<?define PlatformProgramFiles="[ProgramFiles64Folder]"?>
<?else?>
<!-- stable WIX 3 doesn't support ARM64, so we build installers as x86 -->
<?define BinDir="$(var.RepoDir)ARM64\$(var.Configuration)\" ?>
<?define PowerToysPlatform="ARM64"?>
<?define Dotnet6DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/aa74da73-02cb-49fd-93ad-ce93edccb8bc/4ac67827aff545ead4032a940c9094ff/windowsdesktop-runtime-6.0.5-win-arm64.exe"?>
<?define Dotnet6PayloadSize="51774400"?>
<?define Dotnet6PayloadHash="62C15858951B123AFD4D3E14F8BE4829A7CAFF18"?>
<?define WinAppSDKPayloadSize="57092528"?>
<?define WinAppSDKPayloadHash="377ACE2157BE077C63C650588A18CBEFD93B5B51"?>
<!--TODO: define to ARM64 Program files once it's available-->
<?define PlatformProgramFiles="[ProgramFiles6432Folder]"?>
<?endif?>
2022-01-06 02:28:09 +08:00
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
2022-05-13 23:55:39 +08:00
<Bundle Name="PowerToys (Preview) $(var.PowerToysPlatform)"
2022-01-06 02:28:09 +08:00
Version="$(var.Version)"
Manufacturer="Microsoft Corporation"
2022-05-13 23:55:39 +08:00
IconSourceFile="$(var.BinDir)svgs\icon.ico"
2022-01-06 02:28:09 +08:00
UpgradeCode="$(var.UpgradeCode)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.RepoDir)\installer\License.rtf"
LogoFile="$(var.RepoDir)\installer\MSIX\Images\logo44.png"
SuppressOptionsUI="no"
SuppressRepair="yes" />
</BootstrapperApplicationRef>
2022-05-13 23:55:39 +08:00
<util:FileSearch Variable="HasDotnet605" Path="$(var.PlatformProgramFiles)dotnet\shared\Microsoft.WindowsDesktop.App\6.0.5\System.Xaml.dll" Result="exists" />
2022-01-29 01:22:12 +08:00
<util:RegistrySearch Variable="HasWebView2PerMachine" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Result="exists" />
<util:RegistrySearch Variable="HasWebView2PerUser" Root="HKCU" Key="Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Result="exists" />
2022-01-06 02:28:09 +08:00
2022-05-13 23:55:39 +08:00
<Variable Name="InstallFolder" Type="string" Value="$(var.PlatformProgramFiles)PowerToys" bal:Overridable="yes"/>
2022-01-06 02:28:09 +08:00
2022-03-16 19:39:00 +08:00
<Variable Name="MsiLogFolder" Type="string" Value="[LocalAppDataFolder]\Microsoft\PowerToys\" />
<Log Disable="no" Prefix='powertoys-bootstrapper-msi-$(var.Version)' Extension=".log" />
2022-01-06 02:28:09 +08:00
<!-- Only install/upgrade if the version is greater or equal than the currently installed version of PowerToys, to handle the case in which PowerToys was installed from old MSI (before WiX bootstrapper was used) -->
<!-- If the previous installation is a bundle installation, just let WiX run its logic. -->
<Variable Name="DetectedPowerToysVersion" Type="version" Value="0.0.0.0"/>
<Variable Name="TargetPowerToysVersion" Type="version" Value="$(var.Version)"/>
<util:ProductSearch Id="SearchInstalledPowerToysVersion" Variable="DetectedPowerToysVersion" UpgradeCode="42B84BF7-5FBF-473B-9C8B-049DC16F7708" Result="version" />
<bal:Condition Message="A later version of PowerToys is already installed." >TargetPowerToysVersion >= DetectedPowerToysVersion OR WixBundleInstalled</bal:Condition>
<Variable Name="DetectedWindowsBuildNumber" Type="version" Value="0"/>
<util:RegistrySearch Id="SearchWindowsBuildNumber" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentBuildNumber" Result="value" Format="raw" Variable="DetectedWindowsBuildNumber" />
<bal:Condition Message="This application is only supported on Windows 10 version 1903 (build 18362) or higher.">DetectedWindowsBuildNumber >= 18362 OR WixBundleInstalled</bal:Condition>
<Chain>
2022-01-18 22:52:22 +08:00
<ExePackage
2022-05-13 23:55:39 +08:00
Name="windowsdesktop-runtime-6.0.5-win-$(var.PowerToysPlatform).exe"
2022-01-18 22:52:22 +08:00
Compressed="no"
2022-02-07 22:08:30 +08:00
Id="DotnetRuntime6"
2022-05-13 23:55:39 +08:00
DetectCondition="HasDotnet605"
DownloadUrl="$(var.Dotnet6DownloadUrl)"
2022-03-03 18:09:47 +08:00
InstallCommand="/install /quiet /norestart"
RepairCommand="/repair /passive /norestart"
2022-01-18 22:52:22 +08:00
Permanent="yes"
PerMachine="yes"
2022-03-03 18:09:47 +08:00
UninstallCommand="/uninstall /quiet /norestart">
2022-02-11 00:18:05 +08:00
<ExitCode Value="1638" Behavior="success"/>
2022-01-18 22:52:22 +08:00
<RemotePayload
2022-05-13 23:55:39 +08:00
Description="Microsoft Windows Desktop Runtime - 6.0.5 ($(var.PowerToysPlatform))"
ProductName="Microsoft Windows Desktop Runtime - 6.0.5 ($(var.PowerToysPlatform))"
Size="$(var.Dotnet6PayloadSize)"
Version="6.0.5.31215"
Hash="$(var.Dotnet6PayloadHash)" />
2022-01-18 22:52:22 +08:00
</ExePackage>
2022-01-26 04:02:10 +08:00
<ExePackage
Name="MicrosoftEdgeWebview2Setup.exe"
2022-01-29 01:22:12 +08:00
Compressed="yes"
2022-01-26 04:02:10 +08:00
Id="WebView2"
2022-01-29 01:22:12 +08:00
DetectCondition="HasWebView2PerMachine OR HasWebView2PerUser"
SourceFile="WebView2\MicrosoftEdgeWebview2Setup.exe"
2022-01-26 04:02:10 +08:00
InstallCommand="/silent /install"
RepairCommand="/repair /passive"
Permanent="yes"
PerMachine="yes"
UninstallCommand="/silent /uninstall">
</ExePackage>
2022-04-20 04:00:28 +08:00
<ExePackage
Name="WindowsAppRuntimeInstall.exe"
Compressed="no"
Id="WinAppSDK101"
2022-05-13 23:55:39 +08:00
DownloadUrl="https://aka.ms/windowsappsdk/1.0/1.0.3/windowsappruntimeinstall-1.0.3-$(var.PowerToysPlatform).exe"
2022-04-20 04:00:28 +08:00
RepairCommand=""
Permanent="yes">
<ExitCode Value="-2147009274" Behavior="success"/>
<RemotePayload
2022-04-20 15:55:01 +08:00
Description="Windows App SDK 1.0.3 Runtime Install"
ProductName="Windows App SDK 1.0.3 Runtime Install"
2022-05-13 23:55:39 +08:00
Size="$(var.WinAppSDKPayloadSize)"
2022-04-20 15:55:01 +08:00
Version="1.0.3.0"
2022-05-13 23:55:39 +08:00
Hash="$(var.WinAppSDKPayloadHash)" />
</ExePackage>
2022-01-06 02:28:09 +08:00
<MsiPackage
2022-05-13 23:55:39 +08:00
SourceFile="$(var.Platform)\Release\PowerToysSetup-$(var.Version)-$(var.Platform).msi"
2022-01-06 02:28:09 +08:00
Compressed="yes"
DisplayInternalUI="no">
<MsiProperty Name="BOOTSTRAPPERINSTALLFOLDER" Value="[InstallFolder]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>