Skip to content

Commit 35534e8

Browse files
committed
Merge remote-tracking branch 'yao/exportall' into testmerge
2 parents 5b0b911 + 2c06ee9 commit 35534e8

File tree

27 files changed

+726
-120
lines changed

27 files changed

+726
-120
lines changed

.github/actions/spelling/expect.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ wingetutil
595595
winreg
596596
winrtact
597597
winstring
598+
WMI
598599
Wnd
599600
WNDCLASS
600601
WNDCLASSEX

azure-pipelines.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ jobs:
379379
displayName: Install DSC v3
380380
condition: succeededOrFailed()
381381
382+
# Install required DSC modules until export all command can handle auto acquisition
383+
- pwsh: |
384+
Install-Module -Name Microsoft.WinGet.DSC -Force
385+
Install-Module -Name Microsoft.Windows.Developer -AllowPrerelease -Force
386+
displayName: Install Required DSC Modules for Tests
387+
condition: succeededOrFailed()
388+
382389
- task: PowerShell@2
383390
displayName: Run Unit Tests Packaged
384391
inputs:

src/AppInstallerCLICore/Commands/DebugCommand.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ namespace AppInstaller::CLI
106106
OutputProxyStubInterfaceRegistration<winrt::Windows::Foundation::Collections::IIterable<winrt::Microsoft::Management::Configuration::ConfigurationEnvironment>>(context);
107107
OutputProxyStubInterfaceRegistration<winrt::Windows::Foundation::Collections::IIterable<winrt::Microsoft::Management::Configuration::IConfigurationUnitProcessorDetails>>(context);
108108
OutputProxyStubInterfaceRegistration<winrt::Microsoft::Management::Configuration::IConfigurationUnitProcessorDetails2>(context);
109+
OutputProxyStubInterfaceRegistration<winrt::Microsoft::Management::Configuration::IConfigurationUnitProcessorDetails3>(context);
109110
OutputProxyStubInterfaceRegistration<winrt::Microsoft::Management::Configuration::IGetAllSettingsConfigurationUnitProcessor>(context);
110111
OutputProxyStubInterfaceRegistration<winrt::Microsoft::Management::Configuration::IGetAllUnitsConfigurationUnitProcessor>(context);
111112
OutputProxyStubInterfaceRegistration<winrt::Microsoft::Management::Configuration::IFindUnitProcessorsSetProcessor>(context);

src/AppInstallerCLICore/ConfigurationSetProcessorFactoryRemoting.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@ namespace AppInstaller::CLI::ConfigurationRemoting
2828
// The string used to divide the arguments sent to the remote server
2929
constexpr std::wstring_view s_ArgumentsDivider = L"\n~~~~~~\n"sv;
3030

31-
std::wstring_view ToString(ProcessorEngine value)
32-
{
33-
switch (value)
34-
{
35-
case ProcessorEngine::PowerShell:
36-
return s_ProcessorEngine_PowerShell;
37-
case ProcessorEngine::DSCv3:
38-
return s_ProcessorEngine_DSCv3;
39-
default:
40-
THROW_HR(E_UNEXPECTED);
41-
}
42-
}
43-
4431
// A helper with a convenient function that we use to receive the remote factory object.
4532
struct RemoteFactoryCallback : winrt::implements<RemoteFactoryCallback, IConfigurationStatics>
4633
{
@@ -373,6 +360,19 @@ namespace AppInstaller::CLI::ConfigurationRemoting
373360
}
374361
}
375362

363+
std::wstring_view ToString(ProcessorEngine value)
364+
{
365+
switch (value)
366+
{
367+
case ProcessorEngine::PowerShell:
368+
return s_ProcessorEngine_PowerShell;
369+
case ProcessorEngine::DSCv3:
370+
return s_ProcessorEngine_DSCv3;
371+
default:
372+
THROW_HR(E_UNEXPECTED);
373+
}
374+
}
375+
376376
winrt::hstring ToHString(PropertyName name)
377377
{
378378
switch (name)

src/AppInstallerCLICore/ConfigureExportCommand.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ namespace AppInstaller::CLI
4444
{
4545
context <<
4646
VerifyIsFullPackage <<
47-
SearchSourceForPackageExport <<
4847
CreateConfigurationProcessorWithoutFactory <<
49-
CreateOrOpenConfigurationSet{} <<
48+
CreateOrOpenConfigurationSet{ "0.3", context.Args.Contains(Execution::Args::Type::ConfigurationExportAll) } <<
5049
CreateConfigurationProcessor <<
5150
PopulateConfigurationSetForExport <<
5251
WriteConfigFile;

src/AppInstallerCLICore/PackageCollection.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ namespace AppInstaller::CLI
2828

2929
Utility::LocIndString Id;
3030
Utility::VersionAndChannel VersionAndChannel;
31-
Manifest::ScopeEnum Scope = Manifest::ScopeEnum::Unknown;
31+
Manifest::ScopeEnum Scope = Manifest::ScopeEnum::Unknown;
32+
std::filesystem::path InstalledLocation;
3233
};
3334

3435
// A source along with a set of packages available from it.
@@ -76,4 +77,4 @@ namespace AppInstaller::CLI
7677
// Tries to parse a JSON into a collection of packages.
7778
ParseResult TryParseJson(const Json::Value& root);
7879
}
79-
}
80+
}

src/AppInstallerCLICore/Public/ConfigurationSetProcessorFactoryRemoting.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ namespace AppInstaller::CLI::ConfigurationRemoting
1717
DSCv3,
1818
};
1919

20+
std::wstring_view ToString(ProcessorEngine value);
21+
2022
// Determines the appropriate processor engine to use for the given configuration set.
2123
ProcessorEngine DetermineProcessorEngine(winrt::Microsoft::Management::Configuration::ConfigurationSet set);
2224

src/AppInstallerCLICore/Resources.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ namespace AppInstaller::CLI::Resource
5757
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationAcceptWarningArgumentDescription);
5858
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationAllUsersElevated);
5959
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationApply);
60+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationApplyingUnit);
6061
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationAssert);
6162
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationDependencies);
6263
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationDescriptionWasTruncated);
@@ -69,7 +70,13 @@ namespace AppInstaller::CLI::Resource
6970
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationEnablingMessage);
7071
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportAddingToFile);
7172
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportFailed);
73+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportFailedToGetUnitProcessors);
74+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportingUnit);
75+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportInstallRequiredModule);
76+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportInstallRequiredModuleFailed);
7277
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportSuccessful);
78+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportUnitStart);
79+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationExportUnitFailed);
7380
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFailedToApply);
7481
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFailedToGetDetails);
7582
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFailedToTest);
@@ -83,6 +90,7 @@ namespace AppInstaller::CLI::Resource
8390
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFileVersionUnknown);
8491
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationGettingDetails);
8592
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationGettingResourceSettings);
93+
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationGettingUnitProcessors);
8694
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationHistoryEmpty);
8795
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationHistoryItemArgumentDescription);
8896
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationHistoryItemNotFound);

0 commit comments

Comments
 (0)