2using System.Collections;
3using System.Collections.Generic;
4using System.Collections.Specialized;
6using System.Threading.Tasks;
11using Nuke.Common.Tooling;
12using Nuke.Common.Utilities;
25 public static ValueOrError<Tool>
EnsureXRepo => XMakeTasks.EnsureXMake
26 .Transform(t => t.With(
"lua private.xrepo"));
33 private static void EnsureSupportedPackageManagers(ref Tool xrepo,
string package)
35 if (package.Contains(
"vcpkg::"))
43 else if (package.Contains(
"conan::"))
45 .Get($
"Conan is needed for package(s) {package} but it couldn't be installed");
66 public static Tool
Install(
string package,
string options =
"",
string extraArgs =
"")
68 var xrepo =
XRepo.With($
"install -v -y {options.PrependNonEmpty("-f
"):nq} {extraArgs:nq} {package}");
69 EnsureSupportedPackageManagers(ref xrepo, package);
93 public static Tool
Info(
string package,
string options =
"",
string extraArgs =
"")
95 var xrepo =
XRepo.With($
"info -y {options.PrependNonEmpty("-f
"):nq} {extraArgs:nq} {package}");
96 EnsureSupportedPackageManagers(ref xrepo, package);
104 =>
XRepoItem.Parse(output.RemoveAnsiEscape());
Wrapper class for VCPKG a C++ package manager by Microsoft.
static ValueOrError< Tool > EnsureVcpkg
Get an instance of VCPKG or an error if setup has failed.
static AbsolutePath VcpkgPathInProject
Path to a place where a local VCPKG instance can be found / should be set up.