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 all 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
20 changes: 14 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,6 @@ jobs:
isPackaged: true
filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess"

- template: templates/e2e-test.template.yml
parameters:
title: "COM API E2E Tests (In-process)"
isPackaged: false
filter: "TestCategory=InProcess"

- task: PowerShell@2
displayName: 'Set program files directory'
inputs:
Expand All @@ -236,6 +230,20 @@ jobs:
Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles}"
}

# Resolves resource strings utilized by InProc E2E tests.
- task: CopyFiles@2
displayName: 'Copy resources.pri to dotnet directory'
inputs:
SourceFolder: '$(buildOutDir)\AppInstallerCLI'
TargetFolder: '$(platformProgramFiles)\dotnet'
Contents: resources.pri

- template: templates/e2e-test.template.yml
parameters:
title: "COM API E2E Tests (In-process)"
isPackaged: false
filter: "TestCategory=InProcess"

# Winmd accessed by test runner process (dotnet.exe)
- task: CopyFiles@2
displayName: 'Copy winmd to dotnet directory'
Expand Down
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
13 changes: 6 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,8 @@ namespace AppInstaller::CLI::Execution
Dependencies,
DependencySource,
AllowedArchitectures,
PortableEntry,
AllowUnknownScope,
PortableInstaller,
Max
};

Expand Down Expand Up @@ -220,15 +219,15 @@ 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;
};
}
}
Loading