summaryrefslogtreecommitdiff
path: root/xmake/actions/addon/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-08-11 00:55:18 +0800
committerruki <[email protected]>2026-08-11 00:55:18 +0800
commit1cb3fd90ef205361dad1276e58e63d67bda6f283 (patch)
treeb4c49d889889eb086616d26dae7db12db3f7f20d /xmake/actions/addon/main.lua
parentc7e176a0674d67e4c6440f2234f730b4ab234c18 (diff)
use manifest.txt for addon
Diffstat (limited to 'xmake/actions/addon/main.lua')
-rw-r--r--xmake/actions/addon/main.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/xmake/actions/addon/main.lua b/xmake/actions/addon/main.lua
index e3ed7e5be..878b1712d 100644
--- a/xmake/actions/addon/main.lua
+++ b/xmake/actions/addon/main.lua
@@ -112,15 +112,13 @@ function _install_from_local(dir, name)
for _, payloaddir in ipairs(addon.payloads_of(payloadroot)) do
os.vcp(path.join(payloadroot, payloaddir), path.join(dstdir, payloaddir))
end
- local manifestfile = path.join(dir, "addon.lua")
- if os.isfile(manifestfile) then
- os.vcp(manifestfile, path.join(dstdir, "addon.lua"))
- end
+
-- we need to roll back the installed payloads if it cannot be registered, e.g. the name conflicts
try
{
function ()
- addon.register(name, LOCALVERSION)
+ addon.register(name, LOCALVERSION, manifest and {
+ description = manifest.description, deps = #manifest.deps > 0 and manifest.deps or nil})
end,
catch
{