forked from microsoft/winget-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCOMCommand.cpp
More file actions
48 lines (44 loc) · 1.87 KB
/
Copy pathCOMCommand.cpp
File metadata and controls
48 lines (44 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "pch.h"
#include "COMCommand.h"
#include "Workflows/DownloadFlow.h"
#include "Workflows/InstallFlow.h"
#include "Workflows/PromptFlow.h"
#include "Workflows/UninstallFlow.h"
#include "Workflows/WorkflowBase.h"
#include "Workflows/DependenciesFlow.h"
namespace AppInstaller::CLI
{
using namespace AppInstaller::CLI::Execution;
using namespace AppInstaller::CLI::Workflow;
using namespace AppInstaller::Manifest;
using namespace AppInstaller::Utility::literals;
// IMPORTANT: To use this command, the caller should have already retrieved the package manifest (GetManifest()) and added it to the Context Data
void COMDownloadCommand::ExecuteInternal(Context& context) const
{
context <<
Workflow::ReportExecutionStage(ExecutionStage::Discovery) <<
Workflow::SelectInstaller <<
Workflow::EnsureApplicableInstaller <<
Workflow::ReportIdentityAndInstallationDisclaimer <<
Workflow::ShowPromptsForSinglePackage(/* ensureAcceptance */ true) <<
Workflow::SetDownloadDirectory <<
Workflow::DownloadPackageDependencies <<
Workflow::DownloadInstaller;
}
// IMPORTANT: To use this command, the caller should have already executed the COMDownloadCommand
void COMInstallCommand::ExecuteInternal(Context& context) const
{
context <<
Workflow::InstallDependencies <<
Workflow::ReverifyInstallerHash <<
Workflow::InstallPackageInstaller;
}
// IMPORTANT: To use this command, the caller should have already retrieved the InstalledPackageVersion and added it to the Context Data
void COMUninstallCommand::ExecuteInternal(Execution::Context& context) const
{
context <<
Workflow::UninstallSinglePackage;
}
}