mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[installer] Support per-user installation (#24087)
* Add per user installer
* Separate upgrade codes for per machine and per user installation
Move per machine check to bootstrapper
Move all defines to common.wxs
Fix CI
* Update installer/PowerToysSetup/generateFileList.ps1
Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
* Update installer/PowerToysSetup/generateAllFileComponents.ps1
Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
* Update installer/PowerToysSetup/generateFileList.ps1
Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
* expect.txt
* Revert "Update installer/PowerToysSetup/generateFileList.ps1"
This reverts commit 34545dab9c.
* Update release CI to build both installers
* Revert bundle name change
It messes up app ID for per-user installation which ends up breaking winget update
of the per-user PT
* spellcheck
* Fix bad merge
* Add RegistryPreview
* Include backup_restore_settings.json
* Revert testing endpoint change
---------
Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
|
||||
#include <common/SettingsAPI/settings_helpers.h>
|
||||
#include <common/utils/json.h>
|
||||
#include <common/utils/registry.h>
|
||||
|
||||
using namespace registry::install_scope;
|
||||
|
||||
namespace // Strings in this namespace should not be localized
|
||||
{
|
||||
@@ -42,9 +45,16 @@ 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();
|
||||
if (current_install_scope == InstallScope::PerUser)
|
||||
{
|
||||
required_filename_pattern = updating::INSTALLER_FILENAME_PATTERN_USER;
|
||||
}
|
||||
|
||||
for (const auto asset_extension : asset_extensions)
|
||||
{
|
||||
for (auto asset_elem : release_object.GetNamedArray(L"assets"))
|
||||
|
||||
Reference in New Issue
Block a user