winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8a6574808c8c7401d1cceb50a49dcece284e6654
parent 66b851fd9316eeb17f0a99a7681fb50e5064bbb0
Author: Ryan Fu <69221034+ryfu-msft@users.noreply.github.com>
Date:   Thu, 15 Dec 2022 18:39:36 -0800

Make zip feature stable (#2774)


Diffstat:
Mdoc/Settings.md | 11-----------
Mschemas/JSON/settings/settings.schema.0.2.json | 5-----
Msrc/AppInstallerCLICore/Workflows/ArchiveFlow.cpp | 4++--
Msrc/AppInstallerCLICore/Workflows/InstallFlow.cpp | 13-------------
Msrc/AppInstallerCLIE2ETests/BaseCommand.cs | 1-
Msrc/AppInstallerCLIE2ETests/InstallCommand.cs | 9---------
Msrc/AppInstallerCLITests/WorkFlow.cpp | 18------------------
Msrc/AppInstallerCommonCore/ExperimentalFeature.cpp | 4----
Msrc/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h | 5++---
Msrc/AppInstallerCommonCore/Public/winget/UserSettings.h | 2--
Msrc/AppInstallerCommonCore/UserSettings.cpp | 1-
11 files changed, 4 insertions(+), 69 deletions(-)

diff --git a/doc/Settings.md b/doc/Settings.md @@ -220,17 +220,6 @@ The `experimentalFeatures` settings involve the configuration of these "experime }, ``` -### zipInstall - -This feature enables the Windows Package Manager to install from a zip file. -You can enable the feature as shown below. - -```json - "experimentalFeatures": { - "zipInstall": true - }, -``` - ### directMSI This feature enables the Windows Package Manager to directly install MSI packages with the MSI APIs rather than through msiexec. diff --git a/schemas/JSON/settings/settings.schema.0.2.json b/schemas/JSON/settings/settings.schema.0.2.json @@ -204,11 +204,6 @@ "type": "boolean", "default": false }, - "zipInstall": { - "description": "Enable support for installing zip packages.", - "type": "boolean", - "default": false - }, "openLogsArgument": { "description": "Enable argument to open default logs location", "type": "boolean", diff --git a/src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp b/src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp @@ -2,10 +2,10 @@ // Licensed under the MIT License. #include "pch.h" #include "ArchiveFlow.h" -#include "winget/Archive.h" -#include "winget/Filesystem.h" #include "PortableFlow.h" #include <winget/AdminSettings.h> +#include <winget/Archive.h> +#include <winget/Filesystem.h> using namespace AppInstaller::Manifest; diff --git a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp @@ -74,18 +74,6 @@ namespace AppInstaller::CLI::Workflow } } - // TODO: Remove check once feature becomes stable - void EnsureFeatureEnabledForArchiveInstall(Execution::Context& context) - { - auto installer = context.Get<Execution::Data::Installer>().value(); - - if (IsArchiveType(installer.BaseInstallerType)) - { - context << - Workflow::EnsureFeatureEnabled(Settings::ExperimentalFeature::Feature::ZipInstall); - } - } - Execution::Args::Type GetUnsupportedArgumentType(UnsupportedArgumentEnum unsupportedArgument) { Execution::Args::Type execArg; @@ -484,7 +472,6 @@ namespace AppInstaller::CLI::Workflow void EnsureSupportForInstall(Execution::Context& context) { context << - Workflow::EnsureFeatureEnabledForArchiveInstall << Workflow::EnsureSupportForPortableInstall << Workflow::EnsureValidNestedInstallerMetadataForArchiveInstall; } diff --git a/src/AppInstallerCLIE2ETests/BaseCommand.cs b/src/AppInstallerCLIE2ETests/BaseCommand.cs @@ -85,7 +85,6 @@ namespace AppInstallerCLIE2ETests this.ConfigureFeature("experimentalCmd", status); this.ConfigureFeature("dependencies", status); this.ConfigureFeature("directMSI", status); - this.ConfigureFeature("zipInstall", status); this.ConfigureFeature("openLogsArgument", status); } } diff --git a/src/AppInstallerCLIE2ETests/InstallCommand.cs b/src/AppInstallerCLIE2ETests/InstallCommand.cs @@ -15,15 +15,6 @@ namespace AppInstallerCLIE2ETests public class InstallCommand : BaseCommand { /// <summary> - /// One time setup. - /// </summary> - [OneTimeSetUp] - public void OneTimeSetup() - { - this.ConfigureFeature("zipInstall", true); - } - - /// <summary> /// Set up. /// </summary> [SetUp] diff --git a/src/AppInstallerCLITests/WorkFlow.cpp b/src/AppInstallerCLITests/WorkFlow.cpp @@ -1140,8 +1140,6 @@ TEST_CASE("InstallFlowWithNonApplicableArchitecture", "[InstallFlow][workflow]") TEST_CASE("InstallFlow_Zip_Exe", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1171,8 +1169,6 @@ TEST_CASE("InstallFlow_Zip_Exe", "[InstallFlow][workflow]") TEST_CASE("InstallFlow_Zip_BadRelativePath", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1200,8 +1196,6 @@ TEST_CASE("InstallFlow_Zip_BadRelativePath", "[InstallFlow][workflow]") TEST_CASE("InstallFlow_Zip_MissingNestedInstaller", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1222,8 +1216,6 @@ TEST_CASE("InstallFlow_Zip_MissingNestedInstaller", "[InstallFlow][workflow]") TEST_CASE("InstallFlow_Zip_UnsupportedNestedInstaller", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1244,8 +1236,6 @@ TEST_CASE("InstallFlow_Zip_UnsupportedNestedInstaller", "[InstallFlow][workflow] TEST_CASE("InstallFlow_Zip_MultipleNonPortableNestedInstallers", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1266,8 +1256,6 @@ TEST_CASE("InstallFlow_Zip_MultipleNonPortableNestedInstallers", "[InstallFlow][ TEST_CASE("InstallFlow_Zip_ArchiveScanFailed", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1292,8 +1280,6 @@ TEST_CASE("InstallFlow_Zip_ArchiveScanFailed", "[InstallFlow][workflow]") TEST_CASE("InstallFlow_Zip_ArchiveScanOverride_AdminSettingDisabled", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -1321,8 +1307,6 @@ TEST_CASE("InstallFlow_Zip_ArchiveScanOverride_AdminSettingDisabled", "[InstallF TEST_CASE("InstallFlow_Zip_ArchiveScanOverride_AdminSettingEnabled", "[InstallFlow][workflow]") { TestCommon::TempFile installResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream installOutput; TestContext context{ installOutput, std::cin }; @@ -2139,8 +2123,6 @@ TEST_CASE("UpdateFlow_UpdateExe", "[UpdateFlow][workflow]") TEST_CASE("UpdateFlow_UpdateZip_Exe", "[UpdateFlow][workflow]") { TestCommon::TempFile updateResultPath("TestExeInstalled.txt"); - TestCommon::TestUserSettings testSettings; - testSettings.Set<Setting::EFZipInstall>(true); std::ostringstream updateOutput; TestContext context{ updateOutput, std::cin }; diff --git a/src/AppInstallerCommonCore/ExperimentalFeature.cpp b/src/AppInstallerCommonCore/ExperimentalFeature.cpp @@ -42,8 +42,6 @@ namespace AppInstaller::Settings return userSettings.Get<Setting::EFDependencies>(); case ExperimentalFeature::Feature::DirectMSI: return userSettings.Get<Setting::EFDirectMSI>(); - case ExperimentalFeature::Feature::ZipInstall: - return userSettings.Get<Setting::EFZipInstall>(); case ExperimentalFeature::Feature::OpenLogsArgument: return userSettings.Get<Setting::EFOpenLogsArgument>(); case ExperimentalFeature::Feature::Pinning: @@ -79,8 +77,6 @@ namespace AppInstaller::Settings return ExperimentalFeature{ "Show Dependencies Information", "dependencies", "https://aka.ms/winget-settings", Feature::Dependencies }; case Feature::DirectMSI: return ExperimentalFeature{ "Direct MSI Installation", "directMSI", "https://aka.ms/winget-settings", Feature::DirectMSI }; - case Feature::ZipInstall: - return ExperimentalFeature{ "Zip Installation", "zipInstall", "https://aka.ms/winget-settings", Feature::ZipInstall }; case Feature::OpenLogsArgument: return ExperimentalFeature{ "Open Logs Argument", "openLogsArgument", "https://aka.ms/winget-settings", Feature::OpenLogsArgument }; case Feature::Pinning: diff --git a/src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h b/src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h @@ -24,9 +24,8 @@ namespace AppInstaller::Settings Dependencies = 0x1, // Before making DirectMSI non-experimental, it should be part of manifest validation. DirectMSI = 0x2, - ZipInstall = 0x4, - OpenLogsArgument = 0x8, - Pinning = 0x10, + OpenLogsArgument = 0x4, + Pinning = 0x8, Max, // This MUST always be after all experimental features // Features listed after Max will not be shown with the features command diff --git a/src/AppInstallerCommonCore/Public/winget/UserSettings.h b/src/AppInstallerCommonCore/Public/winget/UserSettings.h @@ -77,7 +77,6 @@ namespace AppInstaller::Settings EFExperimentalArg, EFDependencies, EFDirectMSI, - EFZipInstall, EFOpenLogsArgument, EFPinning, // Telemetry @@ -147,7 +146,6 @@ namespace AppInstaller::Settings SETTINGMAPPING_SPECIALIZATION(Setting::EFExperimentalArg, bool, bool, false, ".experimentalFeatures.experimentalArg"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFDependencies, bool, bool, false, ".experimentalFeatures.dependencies"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFDirectMSI, bool, bool, false, ".experimentalFeatures.directMSI"sv); - SETTINGMAPPING_SPECIALIZATION(Setting::EFZipInstall, bool, bool, false, ".experimentalFeatures.zipInstall"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFOpenLogsArgument, bool, bool, false, ".experimentalFeatures.openLogsArgument"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFPinning, bool, bool, false, ".experimentalFeatures.pinning"sv); // Telemetry diff --git a/src/AppInstallerCommonCore/UserSettings.cpp b/src/AppInstallerCommonCore/UserSettings.cpp @@ -260,7 +260,6 @@ namespace AppInstaller::Settings WINGET_VALIDATE_PASS_THROUGH(EFExperimentalArg) WINGET_VALIDATE_PASS_THROUGH(EFDependencies) WINGET_VALIDATE_PASS_THROUGH(EFDirectMSI) - WINGET_VALIDATE_PASS_THROUGH(EFZipInstall) WINGET_VALIDATE_PASS_THROUGH(EFOpenLogsArgument) WINGET_VALIDATE_PASS_THROUGH(EFPinning) WINGET_VALIDATE_PASS_THROUGH(TelemetryDisable)