Skip to content

Commit

Permalink
Handle Stub Packages for MSIX (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft authored Jul 19, 2023
1 parent c35a578 commit 4364e03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/WingetCreateCore/Common/PackageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,14 @@ private static AppxMetadata GetAppxMetadataAndSetInstallerProperties(string path

// Only create installer nodes for non-resource packages
foreach (var childPackage in bundle.ChildAppxPackages.Where(p => p.PackageType == PackageType.Application))
{
var appxFile = bundle.AppxBundleReader.GetPayloadPackage(childPackage.RelativeFilePath);
{
// Ignore stub packages.
if (childPackage.RelativeFilePath.StartsWith("AppxMetadata\\Stub", StringComparison.OrdinalIgnoreCase))
{
continue;
}

var appxFile = bundle.AppxBundleReader.GetPayloadPackage(childPackage.RelativeFilePath);
appxMetadatas.Add(new AppxMetadata(appxFile.GetStream()));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/WingetCreateCore/WingetCreateCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="jose-jwt" Version="3.1.1" />
<PackageReference Include="Microsoft.CorrelationVector" Version="1.0.42" />
<PackageReference Include="Microsoft.Msix.Utils" Version="2.1.0" />
<PackageReference Include="Microsoft.Msix.Utils" Version="2.1.1" />
<!--https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#generatepathproperty-->
<PackageReference Include="Microsoft.WindowsPackageManager.Utils" Version="1.5.2" GeneratePathProperty="true" />
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.14" />
Expand Down

0 comments on commit 4364e03

Please sign in to comment.