mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-18 13:38:03 +08:00
104 lines
6.3 KiB
XML
104 lines
6.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?define UpgradeCode="6341382d-c0a9-4238-9188-be9607e3fab2"?>
|
|
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
|
|
<?define BinX64Dir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
|
|
|
|
<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) $(sys.BUILDARCH)"
|
|
Version="$(var.Version)"
|
|
Manufacturer="Microsoft Corporation"
|
|
IconSourceFile="$(var.BinX64Dir)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="HasDotnet3122" Path="[ProgramFiles64Folder]dotnet\shared\Microsoft.WindowsDesktop.App\3.1.22\System.Xaml.dll" Result="exists" />
|
|
<util:FileSearch Variable="HasDotnet603" Path="[ProgramFiles64Folder]dotnet\shared\Microsoft.WindowsDesktop.App\6.0.3\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="[ProgramFiles64Folder]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>
|
|
|
|
<Chain>
|
|
<ExePackage
|
|
Name="windowsdesktop-runtime-3.1.22-win-x64.exe"
|
|
Compressed="no"
|
|
Id="DotnetRuntime"
|
|
DetectCondition="HasDotnet3122"
|
|
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/1c14e24b-7f31-42dc-ba3c-83295a2d6f7e/41b93591162dfe556cc160ae44fbe75e/windowsdesktop-runtime-3.1.22-win-x64.exe"
|
|
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 - 3.1.22 (x64)"
|
|
ProductName="Microsoft Windows Desktop Runtime - 3.1.22 (x64)"
|
|
Size="54342024"
|
|
Version="3.1.22.30721"
|
|
Hash="08EF2F6CFDB33946061884B1CE13FA867EFBD576" />
|
|
</ExePackage>
|
|
<ExePackage
|
|
Name="windowsdesktop-runtime-6.0.3-win-x64.exe"
|
|
Compressed="no"
|
|
Id="DotnetRuntime6"
|
|
DetectCondition="HasDotnet603"
|
|
DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/7f3a766e-9516-4579-aaf2-2b150caa465c/d57665f880cdcce816b278a944092965/windowsdesktop-runtime-6.0.3-win-x64.exe"
|
|
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.3 (x64)"
|
|
ProductName="Microsoft Windows Desktop Runtime - 6.0.3 (x64)"
|
|
Size="57153808"
|
|
Version="6.0.3.31024"
|
|
Hash="85EB71B760EBA108348824A4928ED2BA9775BE76" />
|
|
</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>
|
|
<MsiPackage
|
|
SourceFile="x64\Release\PowerToysSetup-$(var.Version)-x64.msi"
|
|
Compressed="yes"
|
|
DisplayInternalUI="no">
|
|
<MsiProperty Name="BOOTSTRAPPERINSTALLFOLDER" Value="[InstallFolder]" />
|
|
</MsiPackage>
|
|
</Chain>
|
|
</Bundle>
|
|
</Wix>
|