diff options
| author | ruki <[email protected]> | 2026-08-05 23:57:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-05 23:57:23 +0800 |
| commit | 5c68815ee523bb6fff7d285016e57efbc88d483a (patch) | |
| tree | 9a489c26bc85ab263e887893b5b24fa3a437b6c0 /xmake/modules/private | |
| parent | e33ddd0560f28d86beb65ec6087fc126d786f56b (diff) | |
rewrite to install plugin from xmake-repo
Diffstat (limited to 'xmake/modules/private')
| -rw-r--r-- | xmake/modules/private/action/require/install.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/private/check/checkers/api/package/kind.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/private/xrepo/action/install.lua | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/install.lua b/xmake/modules/private/action/require/install.lua index b7ba9ef5e..6adf0dfa2 100644 --- a/xmake/modules/private/action/require/install.lua +++ b/xmake/modules/private/action/require/install.lua @@ -82,7 +82,8 @@ function main(requires_raw) -- install packages environment.enter() - local packages = install_packages(requires, {requires_extra = requires_extra}) + local packagekind = option.get("plugin") and "plugin" or "package" + local packages = install_packages(requires, {packagekind = packagekind, requires_extra = requires_extra}) if packages then _check_missing_packages(packages) end diff --git a/xmake/modules/private/check/checkers/api/package/kind.lua b/xmake/modules/private/check/checkers/api/package/kind.lua index 4a9c309e3..d2c7afd10 100644 --- a/xmake/modules/private/check/checkers/api/package/kind.lua +++ b/xmake/modules/private/check/checkers/api/package/kind.lua @@ -37,6 +37,6 @@ function main(opt) end return true end - return value == "binary" or value == "toolchain" or value == "template" + return value == "binary" or value == "toolchain" or value == "template" or value == "plugin" end})) end diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index b0d297b38..9e9bb1086 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -47,6 +47,7 @@ function menu_options() "e.g.", " - xrepo install -p cross --toolchain=mytool --includes='toolchain1.lua" .. path.envsep() .. "toolchain2.lua'"}, {nil, "policies", "kv", nil, "Set the policies." }, + {nil, "plugin", "k", nil, "Install plugin packages from <repository>/plugins/"}, {category = "Visual Studio SDK Configuration" }, {nil, "vs", "kv", nil, "The Microsoft Visual Studio" , " e.g. --vs=2017" }, @@ -281,6 +282,9 @@ function _install_packages(packages) if option.get("build") or is_debug then table.insert(require_argv, "--build") end + if option.get("plugin") then + table.insert(require_argv, "--plugin") + end local extra = {system = false} if mode == "debug" then extra.debug = true |
