diff options
| author | ruki <[email protected]> | 2025-02-06 23:10:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-02-06 23:10:44 +0800 |
| commit | 6eaa4760792b4edf26ad9dc271225cf7b83d7633 (patch) | |
| tree | 1b708137ae1e21f6f6b0533e75f0847e01392bb0 | |
| parent | d0425ec0b0126b02c6c03b7db52372109157335b (diff) | |
improve xmake.cli
| -rw-r--r-- | xmake/rules/xmake_cli/xmake.lua | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/xmake/rules/xmake_cli/xmake.lua b/xmake/rules/xmake_cli/xmake.lua index a7e21a9e1..2e28f04cd 100644 --- a/xmake/rules/xmake_cli/xmake.lua +++ b/xmake/rules/xmake_cli/xmake.lua @@ -25,32 +25,16 @@ rule("xmake.cli") assert(target:pkg("libxmake"), 'please add_packages("libxmake") to target(%s) first!', target:name()) end) after_install(function (target) - - -- get lua script directory local scriptdir = path.join(target:scriptdir(), "src") if not os.isfile(path.join(scriptdir, "lua", "main.lua")) then import("lib.detect.find_path") scriptdir = find_path("lua/main.lua", path.join(target:scriptdir(), "**")) end - -- install xmake-core lua scripts first - local libxmake = target:pkg("libxmake") - local programdir = path.join(libxmake:installdir(), "share", "xmake") local installdir = path.join(target:installdir(), "share", target:name()) - assert(os.isdir(programdir), "%s not found!", programdir) if not os.isdir(installdir) then os.mkdir(installdir) end - if scriptdir then - os.mkdir(path.join(installdir, "plugins")) - os.vcp(path.join(programdir, "core"), installdir) - os.vcp(path.join(programdir, "modules"), installdir) - os.vcp(path.join(programdir, "themes"), installdir) - os.vcp(path.join(programdir, "plugins", "lua"), path.join(installdir, "plugins")) - os.vcp(path.join(programdir, "actions", "build", "xmake.lua"), path.join(installdir, "actions", "build", "xmake.lua")) - else - os.vcp(path.join(programdir, "*"), installdir) - end -- install xmake/cli lua scripts -- @@ -76,8 +60,4 @@ rule("xmake.cli") if scriptdir then os.setenv("XMAKE_MODULES_DIR", scriptdir) end - local libxmake = target:pkg("libxmake") - local programdir = path.join(libxmake:installdir(), "share", "xmake") - assert(os.isdir(programdir), "%s not found!", programdir) - os.setenv("XMAKE_PROGRAM_DIR", programdir) end) |
