Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for installing portables from a zip #2500

Merged
merged 23 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/AppInstallerCLICore/AppInstallerCLICore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
<ClInclude Include="ExecutionReporter.h" />
<ClInclude Include="Invocation.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="PortableInstaller.h" />
<ClInclude Include="Public\AppInstallerCLICore.h" />
<ClInclude Include="Resources.h" />
<ClInclude Include="Search\Search.h" />
Expand Down Expand Up @@ -327,6 +328,7 @@
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="PortableInstaller.cpp" />
<ClCompile Include="Resources.cpp" />
<ClCompile Include="VTSupport.cpp" />
<ClCompile Include="Workflows\ArchiveFlow.cpp" />
Expand Down
6 changes: 6 additions & 0 deletions src/AppInstallerCLICore/AppInstallerCLICore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@
<ClInclude Include="Workflows\PromptFlow.h">
<Filter>Workflows</Filter>
</ClInclude>
<ClInclude Include="PortableInstaller.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
Expand Down Expand Up @@ -337,6 +340,9 @@
<ClCompile Include="Workflows\ArchiveFlow.cpp">
<Filter>Workflows</Filter>
</ClCompile>
<ClCompile Include="PortableInstaller.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="PropertySheet.props" />
Expand Down
20 changes: 13 additions & 7 deletions src/AppInstallerCLICore/ExecutionContextData.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
#include <winget/RepositorySource.h>
#include <winget/Manifest.h>
#include <winget/ARPCorrelation.h>
#include <winget/PortableARPEntry.h>
#include <winget/PortableEntry.h>
#include "CompletionData.h"
#include "PackageCollection.h"
#include "PortableInstaller.h"
#include "Workflows/WorkflowBase.h"

#include <filesystem>
Expand Down Expand Up @@ -54,8 +53,9 @@ namespace AppInstaller::CLI::Execution
Dependencies,
DependencySource,
AllowedArchitectures,
PortableEntry,
AllowUnknownScope,
PortableInstaller,
ExtractedItems,
Max
};

Expand Down Expand Up @@ -220,15 +220,21 @@ namespace AppInstaller::CLI::Execution
};

template <>
struct DataMapping<Data::PortableEntry>
struct DataMapping<Data::AllowUnknownScope>
{
using value_t = Portable::PortableEntry;
using value_t = bool;
};

template <>
struct DataMapping<Data::AllowUnknownScope>
struct DataMapping<Data::PortableInstaller>
{
using value_t = bool;
using value_t = CLI::Portable::PortableInstaller;
};

template <>
struct DataMapping<Data::ExtractedItems>
{
using value_t = std::vector<std::filesystem::path>;
};
}
}
Loading