summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-22 00:29:43 +0800
committerruki <[email protected]>2023-11-22 00:29:43 +0800
commitfaaeb0ccf5d4b56f058cda41aab9c59fb018f8cd (patch)
tree9f044b2e6fd981373767a29ee5ac781dcc8171a6
parent5f9f4298aa66c0c64e6e8d48a191ef01bf746e74 (diff)
add xpack component apis
-rw-r--r--xmake/includes/xpack/xmake.lua20
1 files changed, 18 insertions, 2 deletions
diff --git a/xmake/includes/xpack/xmake.lua b/xmake/includes/xpack/xmake.lua
index 3eb0d86cb..d07f1982e 100644
--- a/xmake/includes/xpack/xmake.lua
+++ b/xmake/includes/xpack/xmake.lua
@@ -58,7 +58,9 @@ local apis = {
-- set nsis display name
"xpack.set_nsis_displayname",
-- set nsis display icon
- "xpack.set_nsis_displayicon"
+ "xpack.set_nsis_displayicon",
+ -- set package component description
+ "xpack_component.set_description"
},
paths = {
-- set the spec file path, support the custom variable pattern, e.g. set_specfile("", {pattern = "%${([^\n]-)}"})
@@ -90,7 +92,21 @@ local apis = {
-- add custom commands script after installing
"xpack.after_installcmd",
-- add custom commands script after uninstalling
- "xpack.after_uninstallcmd"
+ "xpack.after_uninstallcmd",
+ -- add custom load script in component
+ "xpack_component.on_load",
+ -- add custom commands script before installing in component
+ "xpack_component.before_installcmd",
+ -- add custom commands script before uninstalling in component
+ "xpack_component.before_uninstallcmd",
+ -- rewrite custom install commands script in component, we will also get it from target/rules
+ "xpack_component.on_installcmd",
+ -- rewrite custom uninstall commands script in component, we will also get it from target/rules
+ "xpack_component.on_uninstallcmd",
+ -- add custom commands script after installing in component
+ "xpack_component.after_installcmd",
+ -- add custom commands script after uninstalling in component
+ "xpack_component.after_uninstallcmd"
},
keyvalues = {
-- set the spec variable