mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-12 18:29:24 +08:00
81f99264b3
* Update VCRedist version to latest * Silently continue when VCRedist hits 0x666 error
132 lines
7.9 KiB
XML
132 lines
7.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?define UpgradeCode="6341382d-c0a9-4238-9188-be9607e3fab2"?>
|
|
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
|
|
<?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 VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe"?>
|
|
<?define VCRedistPayloadSize="25234792"?>
|
|
<?define VCRedistPayloadHash="D4F9181E70E3F1AA6C8EDFFCC15B3C3D4BABE36B"?>
|
|
|
|
<?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 VCRedistDownloadUrl="https://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/8E126191012691AE22A0D5A89FAC01B59BABC7B680E5D9B65828935FD366E375/VC_redist.arm64.exe"?>
|
|
<?define VCRedistPayloadSize="11500416"?>
|
|
<?define VCRedistPayloadHash="FEECAC80EF04125B058381487332872896F38477"?>
|
|
|
|
<!--TODO: define to ARM64 Program files once it's available-->
|
|
<?define PlatformProgramFiles="[ProgramFiles6432Folder]"?>
|
|
|
|
<?endif?>
|
|
|
|
<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">
|
|
<Bundle Name="PowerToys (Preview) $(var.PowerToysPlatform)"
|
|
Version="$(var.Version)"
|
|
Manufacturer="Microsoft Corporation"
|
|
IconSourceFile="$(var.BinDir)svgs\icon.ico"
|
|
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>
|
|
|
|
<util:FileSearch Variable="HasDotnet605" Path="$(var.PlatformProgramFiles)dotnet\shared\Microsoft.WindowsDesktop.App\6.0.5\System.Xaml.dll" Result="exists" />
|
|
<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" />
|
|
|
|
<Variable Name="InstallFolder" Type="string" Value="$(var.PlatformProgramFiles)PowerToys" bal:Overridable="yes"/>
|
|
|
|
<Variable Name="MsiLogFolder" Type="string" Value="[LocalAppDataFolder]\Microsoft\PowerToys\" />
|
|
<Log Disable="no" Prefix='powertoys-bootstrapper-msi-$(var.Version)' Extension=".log" />
|
|
|
|
<!-- 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>
|
|
|
|
<util:RegistrySearch Variable="DetectedVCRedistVersion" Root="HKLM" Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\$(var.PowerToysPlatform)" Value="Minor" Result="value" Format="raw" />
|
|
|
|
<Chain>
|
|
<ExePackage
|
|
Name="windowsdesktop-runtime-6.0.5-win-$(var.PowerToysPlatform).exe"
|
|
Compressed="no"
|
|
Id="DotnetRuntime6"
|
|
DetectCondition="HasDotnet605"
|
|
DownloadUrl="$(var.Dotnet6DownloadUrl)"
|
|
InstallCommand="/install /quiet /norestart"
|
|
RepairCommand="/repair /passive /norestart"
|
|
Permanent="yes"
|
|
PerMachine="yes"
|
|
UninstallCommand="/uninstall /quiet /norestart">
|
|
<ExitCode Value="1638" Behavior="success"/>
|
|
<RemotePayload
|
|
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)" />
|
|
</ExePackage>
|
|
<ExePackage
|
|
Name="MicrosoftEdgeWebview2Setup.exe"
|
|
Compressed="yes"
|
|
Id="WebView2"
|
|
DetectCondition="HasWebView2PerMachine OR HasWebView2PerUser"
|
|
SourceFile="WebView2\MicrosoftEdgeWebview2Setup.exe"
|
|
InstallCommand="/silent /install"
|
|
RepairCommand="/repair /passive"
|
|
Permanent="yes"
|
|
PerMachine="yes"
|
|
UninstallCommand="/silent /uninstall">
|
|
</ExePackage>
|
|
<ExePackage
|
|
Name="VCRedist-14.32.31332.exe"
|
|
DetectCondition="DetectedVCRedistVersion >= 32"
|
|
Compressed="no"
|
|
Id="VCRedist"
|
|
DownloadUrl="$(var.VCRedistDownloadUrl)"
|
|
InstallCommand="/install /quiet /norestart"
|
|
RepairCommand="/repair /quiet /norestart"
|
|
Permanent="yes">
|
|
<ExitCode Value="1638" Behavior="success"/>
|
|
<RemotePayload
|
|
Description="Microsoft Visual C++ 2015-2022 Redistributable ($(var.PowerToysPlatform)) - 14.32.31332"
|
|
ProductName="Microsoft Visual C++ 2015-2022 Redistributable ($(var.PowerToysPlatform)) - 14.32.31332"
|
|
Size="$(var.VCRedistPayloadSize)"
|
|
Version="14.32.31332.0"
|
|
Hash="$(var.VCRedistPayloadHash)" />
|
|
</ExePackage>
|
|
<MsiPackage
|
|
SourceFile="$(var.PowerToysPlatform)\Release\PowerToysSetup-$(var.Version)-$(var.PowerToysPlatform).msi"
|
|
Compressed="yes"
|
|
DisplayInternalUI="no">
|
|
<MsiProperty Name="BOOTSTRAPPERINSTALLFOLDER" Value="[InstallFolder]" />
|
|
</MsiPackage>
|
|
</Chain>
|
|
</Bundle>
|
|
</Wix>
|