Skip to content

Commit 7f07aa2

Browse files
committed
Add dependencies to Vcpkg
1 parent fd9fcdb commit 7f07aa2

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/UniGetUI.PackageEngine.Managers.Vcpkg/Helpers/VcpkgPkgDetailsHelper.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ protected override void GetDetails_UnSafe(IPackageDetails details)
5454

5555
details.Tags = Tags.ToArray();
5656

57+
foreach (var iDep in contents?["dependencies"]?.AsArray() ?? [])
58+
{
59+
string? val = iDep?.GetValue<string>();
60+
if (val is not null)
61+
{
62+
details.Dependencies.Add(new() { Name = val, Version = "", Mandatory = true, });
63+
}
64+
}
65+
5766
logger.Close(0);
5867
}
5968

src/UniGetUI.PackageEngine.Managers.Vcpkg/Vcpkg.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public Vcpkg()
4242
{
4343
CanRunAsAdmin = true,
4444
SupportsCustomSources = true,
45+
CanListDependencies = true,
4546
SupportsProxy = ProxySupport.No,
4647
SupportsProxyAuth = false,
4748
};

src/UniGetUI.PackageEngine.Managers.WinGet/WinGet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public WinGet()
4343
CanRunInteractively = true,
4444
SupportsCustomVersions = true,
4545
CanDownloadInstaller = true,
46+
CanListDependencies = true,
4647
SupportsCustomArchitectures = true,
4748
SupportedCustomArchitectures = [Architecture.x86, Architecture.x64, Architecture.arm64],
4849
SupportsCustomScopes = true,

0 commit comments

Comments
 (0)