Skip to content

Commit

Permalink
Separate upgrade codes for per machine and per user installation
Browse files Browse the repository at this point in the history
Move per machine check to bootstrapper
Move all defines to common.wxs
Fix CI
  • Loading branch information
stefansjfw committed Feb 14, 2023
1 parent 65a7b88 commit 14f36cb
Show file tree
Hide file tree
Showing 14 changed files with 254 additions and 106 deletions.
182 changes: 168 additions & 14 deletions .github/actions/spell-check/expect.txt

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions .pipelines/ci/templates/build-powertoys-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,22 @@ steps:
clean: false
maximumCpuCount: true

- task: PowerShell@2
displayName: Clean installer dir before building per-user installer
inputs:
targetType: inline
script: git clean -xfd -e *exe -- .\installer\
pwsh: true

- task: NuGetCommand@2
displayName: Restore NuGet packages for PowerToysSetup.sln
inputs:
command: restore
feedsToUse: config
configPath: NuGet.config
restoreSolution: installer\PowerToysSetup.sln
restoreDirectory: '$(Build.SourcesDirectory)\installer\packages'

- task: VSBuild@1
displayName: 'Build PowerToys per-user MSI'
inputs:
Expand Down
18 changes: 17 additions & 1 deletion installer/PowerToysSetup/Common.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,39 @@

<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?if $(var.Platform) = x64?>
<?define PowerToysPlatform="x64"?>
<?define PlatformProgramFiles="[ProgramFiles64Folder]"?>
<?define PlatformLK="x64" ?>
<?define BinDir="$(var.RepoDir)x64\$(var.Configuration)\" ?>
<?else?>
<!-- stable WIX 3 doesn't support ARM64, so we build installers as x86 -->
<?define PowerToysPlatform="ARM64"?>
<!--TODO: define to ARM64 Program files once it's available-->
<?define PlatformProgramFiles="[ProgramFiles6432Folder]"?>
<?define PlatformLK="arm64" ?>
<?define BinDir="$(var.RepoDir)ARM64\$(var.Configuration)\" ?>
<?endif?>

<?if $(var.PerUser) = "true"?>
<?define BundleName="PowerToys (Preview) $(var.PowerToysPlatform) User"?>
<?define PerMachineYesNo="no"?>
<?define MSIPath="UserSetup"?>
<?define MSIName="PowerToysUserSetup-$(var.Version)-$(var.PowerToysPlatform).msi"?>
<?define DefaultInstallDir="LocalAppDataFolder" ?>
<?define RegistryScope="HKCU" ?>
<?define InstallScope="perUser" ?>
<?define InstallPrivileges="limited" ?>
<?else?>
<?define UpgradeCodeGUID="D8B559DB-4C98-487A-A33F-50A8EEE42726" ?>
<?else?>
<?define BundleName="PowerToys (Preview) $(var.PowerToysPlatform)"?>
<?define PerMachineYesNo="yes"?>
<?define MSIPath="MachineSetup"?>
<?define MSIName="PowerToysSetup-$(var.Version)-$(var.PowerToysPlatform).msi"?>
<?define DefaultInstallDir="ProgramFiles64Folder" ?>
<?define RegistryScope="HKLM" ?>
<?define InstallScope="perMachine" ?>
<?define InstallPrivileges="elevated" ?>
<?define UpgradeCodeGUID="42B84BF7-5FBF-473B-9C8B-049DC16F7708" ?>
<?endif?>

<?define BinX32Dir="$(var.RepoDir)x86\$(var.Configuration)\" ?>
Expand Down
43 changes: 17 additions & 26 deletions installer/PowerToysSetup/PowerToys.wxs
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<?define UpgradeCode="6341382d-c0a9-4238-9188-be9607e3fab2"?>
<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?if $(var.PerUser) = "true" ?>
<?define PerMachineYesNo="no"?>
<?define MSISufix="perUser"?>
<?else?>
<?define PerMachineYesNo="yes"?>
<?define MSISufix="perMachine"?>
<?endif?>
<?if $(var.Platform) = x64?>
<?define BinDir="$(var.RepoDir)$(var.Platform)\$(var.Configuration)\" ?>
<?define PowerToysPlatform="x64"?>

<?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"?>

<!--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)"

<?include $(sys.CURRENTDIR)\Common.wxi?>

<Bundle Name="$(var.BundleName)"
Version="$(var.Version)"
Manufacturer="Microsoft Corporation"
IconSourceFile="$(var.BinDir)svgs\icon.ico"
Expand All @@ -54,10 +35,20 @@

<!-- 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="MinimumVersion" Type="version" Value="0.0.0.0"/>
<Variable Name="TargetPowerToysVersion" Type="version" Value="$(var.Version)"/>
<Variable Name="DetectedPowerToysVersion" Type="version" Value="0.0.0.0"/>
<Variable Name="DetectedPowerToysUserVersion" Type="version" Value="0.0.0.0"/>

<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 &gt;= DetectedPowerToysVersion OR WixBundleInstalled</bal:Condition>

<?if $(var.PerUser) = "true" ?>
<util:ProductSearch Id="SearchInstalledPowerToysUserVersion" Variable="DetectedPowerToysUserVersion" UpgradeCode="D8B559DB-4C98-487A-A33F-50A8EEE42726" Result="version" />
<bal:Condition Message="PowerToys is already installed on this system for all users. We recommend first uninstalling that version before installing this one." >MinimumVersion &gt;= DetectedPowerToysVersion</bal:Condition>
<bal:Condition Message="The same or later version of PowerToys is already installed." >TargetPowerToysVersion &gt;= DetectedPowerToysUserVersion OR WixBundleInstalled</bal:Condition>
<?else?>
<bal:Condition Message="A later version of PowerToys is already installed." >TargetPowerToysVersion &gt;= DetectedPowerToysVersion OR WixBundleInstalled</bal:Condition>
<?endif?>

<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" />
Expand Down Expand Up @@ -90,7 +81,7 @@
</ExePackage>
<MsiPackage
DisplayName="Installing PowerToys"
SourceFile="$(var.PowerToysPlatform)\Release\$(var.MSISufix)\PowerToysSetup-$(var.Version)-$(var.PowerToysPlatform)-$(var.MSISufix).msi"
SourceFile="$(var.PowerToysPlatform)\Release\$(var.MSIPath)\$(var.MSIName)"
Compressed="yes"
DisplayInternalUI="no">
<MsiProperty Name="BOOTSTRAPPERINSTALLFOLDER" Value="[InstallFolder]" />
Expand Down
8 changes: 4 additions & 4 deletions installer/PowerToysSetup/PowerToysBootstrapper.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<OutputName>PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputType>Bundle</OutputType>
<SuppressAclReset>True</SuppressAclReset>
<OutputName Condition=" '$(PerUser)' != 'true' ">PowerToysSetup-$(Version)-$(Platform)-perMachine</OutputName>
<OutputName Condition=" '$(PerUser)' == 'true' ">PowerToysSetup-$(Version)-$(Platform)-perUser</OutputName>
<OutputPath Condition=" '$(PerUser)' != 'true' ">$(Platform)\$(Configuration)\perMachine</OutputPath>
<OutputPath Condition=" '$(PerUser)' == 'true' ">$(Platform)\$(Configuration)\perUser</OutputPath>
<OutputName Condition=" '$(PerUser)' != 'true' ">PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputName Condition=" '$(PerUser)' == 'true' ">PowerToysUserSetup-$(Version)-$(Platform)</OutputName>
<OutputPath Condition=" '$(PerUser)' != 'true' ">$(Platform)\$(Configuration)\MachineSetup</OutputPath>
<OutputPath Condition=" '$(PerUser)' == 'true' ">$(Platform)\$(Configuration)\UserSetup</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<NuGetPackageImportStamp />
</PropertyGroup>
Expand Down
16 changes: 8 additions & 8 deletions installer/PowerToysSetup/PowerToysInstaller.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ call "..\..\..\publish.cmd" x64
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\modules\FileExplorerPreview\monacoSRC</DefineConstants>
<PreBuildEvent>IF NOT DEFINED IsPipeline (
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0
SET PTRoot=..\..\..\..
call "..\..\publish.cmd" arm64
SET PTRoot=..\..\..\..\..
call "..\..\..\publish.cmd" arm64
)</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
Expand Down Expand Up @@ -70,8 +70,8 @@ call "..\..\publish.cmd" arm64
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>022a9d30-7c4f-416d-a9df-5ff2661cc0ad</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName Condition=" '$(PerUser)' != 'true' ">PowerToysSetup-$(Version)-$(Platform)-perMachine</OutputName>
<OutputName Condition=" '$(PerUser)' == 'true' ">PowerToysSetup-$(Version)-$(Platform)-perUser</OutputName>
<OutputName Condition=" '$(PerUser)' != 'true' ">PowerToysSetup-$(Version)-$(Platform)</OutputName>
<OutputName Condition=" '$(PerUser)' == 'true' ">PowerToysUserSetup-$(Version)-$(Platform)</OutputName>
<OutputType>Package</OutputType>
<SuppressAclReset>True</SuppressAclReset>
<NuGetPackageImportStamp>
Expand All @@ -82,10 +82,10 @@ call "..\..\publish.cmd" arm64
<SuppressSpecificWarnings>1026;1076</SuppressSpecificWarnings>
</PropertyGroup>
<PropertyGroup>
<OutputPath Condition=" '$(PerUser)' != 'true' ">$(Platform)\$(Configuration)\perMachine</OutputPath>
<OutputPath Condition=" '$(PerUser)' == 'true' ">$(Platform)\$(Configuration)\perUser</OutputPath>
<IntermediateOutputPath Condition=" '$(PerUser)' != 'true' ">obj\$(Platform)\$(Configuration)\perMachine</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PerUser)' == 'true' ">obj\$(Platform)\$(Configuration)\perUser</IntermediateOutputPath>
<OutputPath Condition=" '$(PerUser)' != 'true' ">$(Platform)\$(Configuration)\MachineSetup</OutputPath>
<OutputPath Condition=" '$(PerUser)' == 'true' ">$(Platform)\$(Configuration)\UserSetup</OutputPath>
<IntermediateOutputPath Condition=" '$(PerUser)' != 'true' ">obj\$(Platform)\$(Configuration)\MachineSetup</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PerUser)' == 'true' ">obj\$(Platform)\$(Configuration)\UserSetup</IntermediateOutputPath>
<SuppressIces>ICE40</SuppressIces>
</PropertyGroup>
<PropertyGroup>
Expand Down
16 changes: 4 additions & 12 deletions installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
Language="1033"
Version="$(var.Version)"
Manufacturer="Microsoft Corporation"
UpgradeCode="42B84BF7-5FBF-473B-9C8B-049DC16F7708">
UpgradeCode="$(var.UpgradeCodeGUID)">


<Package InstallerVersion="500" Compressed="yes" InstallScope="$(var.InstallScope)" InstallPrivileges="$(var.InstallPrivileges)" Platform="$(var.PlatformLK)" />

<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." />

<Upgrade Id="42B84BF7-5FBF-473B-9C8B-049DC16F7708">
<Upgrade Id="$(var.UpgradeCodeGUID)">
<UpgradeVersion
Minimum="0.0.0" Maximum="$(var.Version)"
Property="PREVIOUSVERSIONSINSTALLED"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>

Expand Down Expand Up @@ -131,10 +131,9 @@
<![CDATA[BOOTSTRAPPERINSTALLFOLDER <> DEFAULTBOOTSTRAPPERINSTALLFOLDER OR PREVIOUSINSTALLFOLDER = ""]]>
</SetProperty>

<SetProperty Id="InstallScope" Value="$(var.InstallScope)" Before="DetectPrevInstallScope" Sequence="execute"></SetProperty>
<SetProperty Id="InstallScope" Value="$(var.InstallScope)" Before="DetectPrevInstallPath" Sequence="execute"></SetProperty>
<InstallExecuteSequence>
<Custom Action="DetectPrevInstallPath" After="AppSearch" />
<Custom Action="DetectPrevInstallScope" After="DetectPrevInstallPath" />
<Custom Action="SetRegisterPowerToysSchTaskParam" Before="RegisterPowerToysSchTask" />
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
<Custom Action="SetUnApplyModulesRegistryChangeSetsParam" Before="UnApplyModulesRegistryChangeSets" />
Expand Down Expand Up @@ -389,13 +388,6 @@
DllEntry="DetectPrevInstallPathCA"
/>

<CustomAction Id="DetectPrevInstallScope"
Return="check"
Impersonate="yes"
BinaryKey="PTCustomActions"
DllEntry="DetectPrevInstallScopeCA"
/>

<CustomAction Id="ApplyModulesRegistryChangeSets"
Return="check"
Impersonate="yes"
Expand Down
9 changes: 7 additions & 2 deletions installer/PowerToysSetup/generateFileList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ if ($isWinAppSdkProj -eq $True) {
}
}

$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "backup_restore_settings.json", "createdump.exe") + $interopFilesList + $winAppSDKfilesList
$fileExclusionList = @("*Test*", "*.pdb", "*.lastcodeanalysissucceeded", "createdump.exe", "backup_restore_settings.json") + $interopFilesList + $winAppSDKfilesList

$fileInclusionList = @("*.dll", "*.exe", "*.json", "*.msix", "*png", "*gif", "*ico", "*cur", "*svg", "index.html", "reg.js", "monacoSpecialLanguages.js", "resources.pri")

$dllsToIgnore = @("System.CodeDom.dll", "WindowsBase.dll")

if ($fileDepsJson -eq [string]::Empty) {
$fileDepsRoot = $depsPath
} else {
Expand All @@ -68,8 +70,11 @@ if ($fileDepsJson -eq [string]::Empty) {
}
}

$fileExclusionList = $fileExclusionList.where({$_ -notin $dllsToIgnore})

if ($isLauncherPlugin -eq $True) {
$fileExclusionList += @("Ijwhost.dll", "PowerToys.Common.UI.dll", "PowerToys.GPOWrapper.dll", "PowerToys.GPOWrapperProjection.dll", "PowerToys.PowerLauncher.Telemetry.dll", "PowerToys.ManagedCommon.dll", "PowerToys.ManagedTelemetry.dll", "PowerToys.Settings.UI.Lib.dll", "Wox.Infrastructure.dll", "Wox.Plugin.dll")
$fileInclusionList += @("*.deps.json")
$fileExclusionList += @("Ijwhost.dll", "PowerToys.Common.UI.dll", "PowerToys.GPOWrapper.dll", "PowerToys.GPOWrapperProjection.dll", "PowerToys.PowerLauncher.Telemetry.dll", "PowerToys.ManagedCommon.dll", "PowerToys.Settings.UI.Lib.dll", "Wox.Infrastructure.dll", "Wox.Plugin.dll")
}

$fileList = Get-ChildItem $fileDepsRoot -Include $fileInclusionList -Exclude $fileExclusionList -File -Name
Expand Down
30 changes: 2 additions & 28 deletions installer/PowerToysSetupCustomActions/CustomAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ TRACELOGGING_DEFINE_PROVIDER(
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0'
const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0'

static const wchar_t* POWERTOYS_EXE_COMPONENT = L"{A2C66D91-3485-4D00-B04D-91844E6B345B}";
static const wchar_t* POWERTOYS_UPGRADE_CODE = L"{42B84BF7-5FBF-473B-9C8B-049DC16F7708}";

struct WcaSink : spdlog::sinks::base_sink<std::mutex>
{
virtual void sink_it_(const spdlog::details::log_msg& msg) override
Expand Down Expand Up @@ -755,38 +752,15 @@ UINT __stdcall DetectPrevInstallPathCA(MSIHANDLE hInstall)
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, "DetectPrevInstallPathCA");
MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", L"");
try
{
if (auto install_path = GetMsiPackageInstalledPath())
{
MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", install_path->data());
}
}
catch (...)
{
}
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
return WcaFinalize(er);
}

UINT __stdcall DetectPrevInstallScopeCA(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, "DetectPrevInstallScopeCA");

LPWSTR currentScope = nullptr;
hr = WcaGetProperty(L"InstallScope", &currentScope);

try
{
auto install_scope = registry::install_scope::get_current_install_scope();
if (install_scope == registry::install_scope::InstallScope::PerMachine && std::wstring{ currentScope } == L"perUser")
if (auto install_path = GetMsiPackageInstalledPath(std::wstring{ currentScope } == L"perUser"))
{
PMSIHANDLE hRecord = MsiCreateRecord(0);
MsiRecordSetString(hRecord, 0, TEXT("PowerToys is already installed on this system for all users. We recommend first uninstalling that version before installing this one.'"));
MsiProcessMessage(hInstall, static_cast<INSTALLMESSAGE>(INSTALLMESSAGE_ERROR + MB_OK), hRecord);
hr = E_FAIL;
MsiSetPropertyW(hInstall, L"PREVIOUSINSTALLFOLDER", install_path->data());
}
}
catch (...)
Expand Down
1 change: 0 additions & 1 deletion installer/PowerToysSetupCustomActions/CustomAction.def
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ EXPORTS
CreateDotnetRuntimeHardlinksCA
DeleteDotnetRuntimeHardlinksCA
DetectPrevInstallPathCA
DetectPrevInstallScopeCA
RemoveScheduledTasksCA
TelemetryLogInstallSuccessCA
TelemetryLogInstallCancelCA
Expand Down
2 changes: 1 addition & 1 deletion src/Version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>0.68.1</Version>
<Version>0.0.1</Version>
<DevEnvironment>Local</DevEnvironment>
</PropertyGroup>
</Project>
12 changes: 5 additions & 7 deletions src/common/updating/updating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ using namespace registry::install_scope;

namespace // Strings in this namespace should not be localized
{
const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/stefansjfw/latest";
const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/stefansjfw";
const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/stefansjfw/PowerToys/releases/latest";
const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/stefansjfw/PowerToys/releases";

const wchar_t LOCAL_BUILD_ERROR[] = L"Local build cannot be updated";
const wchar_t NETWORK_ERROR[] = L"Network error";
Expand Down Expand Up @@ -45,15 +45,14 @@ namespace updating
std::pair<Uri, std::wstring> extract_installer_asset_download_info(const json::JsonObject& release_object)
{
const std::wstring_view required_architecture = get_architecture_string(get_current_architecture());
constexpr const std::wstring_view required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN;
std::wstring_view required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN;
// Desc-sorted by its priority
const std::array<std::wstring_view, 2> asset_extensions = { L".exe", L".msi" };

const InstallScope current_install_scope = get_current_install_scope();
std::wstring install_scope = L"permachine";
if (current_install_scope == InstallScope::PerUser)
{
install_scope = L"peruser";
required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN_USER;
}

for (const auto asset_extension : asset_extensions)
Expand All @@ -67,8 +66,7 @@ namespace updating
const bool extension_matched = filename_lower.ends_with(asset_extension);
const bool architecture_matched = filename_lower.find(required_architecture) != std::wstring::npos;
const bool filename_matched = filename_lower.find(required_filename_pattern) != std::wstring::npos;
const bool scope_matched = filename_lower.find(install_scope) != std::wstring::npos;
const bool asset_matched = extension_matched && architecture_matched && filename_matched && scope_matched;
const bool asset_matched = extension_matched && architecture_matched && filename_matched;
if (asset_matched)
{
return std::make_pair(Uri{ asset.GetNamedString(L"browser_download_url") }, std::move(filename_lower));
Expand Down
1 change: 1 addition & 0 deletions src/common/updating/updating.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ namespace updating

// non-localized
constexpr inline std::wstring_view INSTALLER_FILENAME_PATTERN = L"powertoyssetup";
constexpr inline std::wstring_view INSTALLER_FILENAME_PATTERN_USER = L"powertoysusersetup";
}
Loading

0 comments on commit 14f36cb

Please sign in to comment.