diff options
| author | ruki <[email protected]> | 2024-12-17 00:34:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-12-17 00:34:31 +0800 |
| commit | 4fe52e2dff1b781fa73c3a4119bc750b8b242db3 (patch) | |
| tree | c02b7413fcd512f458c6d562196ab386d434301f | |
| parent | 02879d82807aa8812a7e4967b1dd3597996ab23b (diff) | |
improve to find nuget package
| -rw-r--r-- | xmake/modules/package/manager/nuget/find_package.lua | 8 | ||||
| -rw-r--r-- | 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 |
