Skip to content

Commit

Permalink
address final comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Fu authored and Ryan Fu committed Jul 15, 2023
2 parents 24e7573 + 9200b51 commit 4613a22
Show file tree
Hide file tree
Showing 53 changed files with 871 additions and 171 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ rowids
roy
RRF
rrr
RTTI
runspace
runtimeclass
ryfu
Expand Down
8 changes: 7 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,13 @@ jobs:
"$(buildOutDir)\Microsoft.Management.Deployment.InProc\Microsoft.Management.Deployment.InProc.dll"
"$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\WinGetUtil*Interop.dll"
"$(buildOutDir)\UndockedRegFreeWinRT\winrtact.dll"
"$(buildOutDir)\Microsoft.WinGet.Client\Microsoft.WinGet.*Client.dll" --config default --recurse'
"$(buildOutDir)\Microsoft.WinGet.Client.Cmdlets\Microsoft.WinGet.Client*.dll"
"$(buildOutDir)\ConfigurationRemotingServer\ConfigurationRemoting*Server.dll"
"$(buildOutDir)\ConfigurationRemotingServer\ConfigurationRemoting*Server.exe"
"$(buildOutDir)\ConfigurationRemotingServer\Microsoft.Management.Configuration*.dll"
"$(buildOutDir)\Microsoft.Management.Configuration\Microsoft.Management.Configuration*.dll"
"$(buildOutDir)\Microsoft.Management.Configuration.OutOfProc\Microsoft.Management.Configuration*.dll"
--config default --recurse'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
Expand Down
10 changes: 9 additions & 1 deletion src/AppInstallerCLI/AppInstallerCLI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EnablePREfast>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -212,6 +215,7 @@
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">stdcpp17</LanguageStandard>
<SDLCheck Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</SDLCheck>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EnablePREfast>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</RuntimeTypeInfo>
</ClCompile>
<Manifest>
<AdditionalManifestFiles Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
Expand Down Expand Up @@ -247,6 +251,10 @@
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</EnablePREfast>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down Expand Up @@ -295,4 +303,4 @@
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.210505.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.210505.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.210505.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.210505.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>
</Project>
12 changes: 12 additions & 0 deletions src/AppInstallerCLICore/AppInstallerCLICore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EnablePREfast>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</RuntimeTypeInfo>
</ClCompile>
<Link>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
Expand All @@ -250,6 +253,7 @@
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</TreatWarningAsError>
<SDLCheck Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</SDLCheck>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EnablePREfast>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Windows</SubSystem>
Expand Down Expand Up @@ -277,6 +281,10 @@
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EnablePREfast>
<EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</EnablePREfast>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</RuntimeTypeInfo>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand Down Expand Up @@ -314,6 +322,10 @@
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|ARM64'">MultiThreaded</RuntimeLibrary>
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">MultiThreaded</RuntimeLibrary>
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|ARM'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|ARM64'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">false</RuntimeTypeInfo>
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">false</RuntimeTypeInfo>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Commands/ConfigureCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace AppInstaller::CLI
OpenConfigurationSet <<
ShowConfigurationSet <<
ShowConfigurationSetConflicts <<
ConfirmConfigurationProcessing <<
ConfirmConfigurationProcessing(true) <<
ApplyConfigurationSet;
}
}
Expand Down
18 changes: 16 additions & 2 deletions src/AppInstallerCLICore/Commands/ConfigureTestCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
// Licensed under the MIT License.
#include "pch.h"
#include "ConfigureTestCommand.h"
#include "Workflows/ConfigurationFlow.h"

using namespace AppInstaller::CLI::Workflow;

namespace AppInstaller::CLI
{
std::vector<Argument> ConfigureTestCommand::GetArguments() const
{
return {};
return {
Argument{ Execution::Args::Type::ConfigurationFile, Resource::String::ConfigurationFileArgumentDescription, ArgumentType::Positional, true },
Argument{ Execution::Args::Type::ConfigurationAcceptWarning, Resource::String::ConfigurationAcceptWarningArgumentDescription, ArgumentType::Flag },
};
}

Resource::LocString ConfigureTestCommand::ShortDescription() const
Expand All @@ -28,6 +34,14 @@ namespace AppInstaller::CLI

void ConfigureTestCommand::ExecuteInternal(Execution::Context& context) const
{
Command::ExecuteInternal(context);
context <<
VerifyIsFullPackage <<
VerifyFile(Execution::Args::Type::ConfigurationFile) <<
CreateConfigurationProcessor <<
OpenConfigurationSet <<
ShowConfigurationSet <<
ShowConfigurationSetConflicts <<
ConfirmConfigurationProcessing(false) <<
TestConfigurationSet;
}
}
8 changes: 3 additions & 5 deletions src/AppInstallerCLICore/Commands/DownloadCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "DownloadCommand.h"
#include "Workflows/DownloadFlow.h"
#include "Workflows/InstallFlow.h"
#include "Workflows/PromptFlow.h"
#include "Resources.h"
#include <AppInstallerRuntime.h>

Expand Down Expand Up @@ -78,15 +79,12 @@ namespace AppInstaller::CLI
Workflow::GetManifestFromPackage(false);
}

if (context.IsTerminated())
{
return;
}

context <<
Workflow::SetDownloadDirectory <<
Workflow::SelectInstaller <<
Workflow::EnsureApplicableInstaller <<
Workflow::ReportIdentityAndInstallationDisclaimer <<
Workflow::ShowPromptsForSinglePackage(/* ensureAcceptance */ true) <<
Workflow::DownloadPackageDependencies <<
Workflow::DownloadInstaller;
}
Expand Down
8 changes: 7 additions & 1 deletion src/AppInstallerCLICore/Resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ namespace AppInstaller::CLI::Resource
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationEnabledMessage);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationEnablingMessage);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFailedToApply);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFailedToTest);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFailedToGetDetails);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFieldInvalidType);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFieldInvalidValue);
Expand All @@ -71,15 +72,19 @@ namespace AppInstaller::CLI::Resource
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFileInvalid);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationFileVersionUnknown);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationGettingDetails);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationInDesiredState);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationInform);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationInitializing);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationLocal);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationModuleNameOnly);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationModuleWithDetails);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationNotEnabledMessage);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationNoTestRun);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationNotInDesiredState);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationReadingConfigFile);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationSettings);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationSuccessfullyApplied);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationUnexpectedTestResult);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationUnitAssertHadNegativeResult);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationUnitFailed);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationUnitFailedConfigSet);
Expand All @@ -104,7 +109,8 @@ namespace AppInstaller::CLI::Resource
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationUnitSkipped);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationWaitingOnAnother);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationWarning);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationWarningPrompt);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationWarningPromptApply);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigurationWarningPromptTest);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigureCommandLongDescription);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigureCommandShortDescription);
WINGET_DEFINE_RESOURCE_STRINGID(ConfigureShowCommandLongDescription);
Expand Down
Loading

0 comments on commit 4613a22

Please sign in to comment.