From 4fe52e2dff1b781fa73c3a4119bc750b8b242db3 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 17 Dec 2024 00:34:31 +0800 Subject: improve to find nuget package --- xmake/modules/package/manager/nuget/find_package.lua | 8 ++++++++ xmake/modules/package/manager/nuget/install_package.lua | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/xmake/modules/package/manager/nuget/find_package.lua b/xmake/modules/package/manager/nuget/find_package.lua index f766139e0..1dfd5a64d 100644 --- a/xmake/modules/package/manager/nuget/find_package.lua +++ b/xmake/modules/package/manager/nuget/find_package.lua @@ -22,6 +22,7 @@ import("lib.detect.find_file") import("lib.detect.find_tool") import("core.base.option") +import("core.base.json") import("core.project.config") import("core.project.target") @@ -32,4 +33,11 @@ import("core.project.target") -- function main(name, opt) opt = opt or {} + + -- load manifest info + local installdir = assert(opt.installdir, "installdir not found!") + local stubdir = path.join(installdir, "stub") + local manifestfile = path.join(stubdir, "obj", "project.assets.json") + local manifest = json.loadfile(manifestfile) + print(manifest) end diff --git a/xmake/modules/package/manager/nuget/install_package.lua b/xmake/modules/package/manager/nuget/install_package.lua index 281fa2f16..902c6ac2b 100644 --- a/xmake/modules/package/manager/nuget/install_package.lua +++ b/xmake/modules/package/manager/nuget/install_package.lua @@ -20,7 +20,6 @@ -- imports import("core.base.option") -import("core.base.json") import("core.base.semver") import("lib.detect.find_tool") @@ -49,9 +48,6 @@ function _install(dotnet, name, opt) -- install package os.vrunv(dotnet, argv, {curdir = stubdir}) - - local manifestfile = path.join(stubdir, "obj", "project.assets.json") - io.cat(manifestfile) end -- install package -- cgit v1.3.1