diff options
| author | ruki <[email protected]> | 2023-11-14 23:36:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-14 23:36:10 +0800 |
| commit | f112896723402213c49453f8f4b5938abeb5020e (patch) | |
| tree | 49c260e5ed86e71d8876ad0a659ef1f7aa273283 | |
| parent | d0f0d575d144bcf4fe69732e8b256e79a0b3ed10 (diff) | |
add more script apis
| -rw-r--r-- | xmake/core/project/rule.lua | 6 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 6 | ||||
| -rw-r--r-- | xmake/includes/xpack/xmake.lua | 10 |
3 files changed, 21 insertions, 1 deletions
diff --git a/xmake/core/project/rule.lua b/xmake/core/project/rule.lua index 57510b45a..c6f476d61 100644 --- a/xmake/core/project/rule.lua +++ b/xmake/core/project/rule.lua @@ -318,7 +318,9 @@ function rule.apis() , "rule.on_clean" , "rule.on_package" , "rule.on_install" + , "rule.on_installcmd" , "rule.on_uninstall" + , "rule.on_uninstallcmd" , "rule.on_linkcmd" , "rule.on_buildcmd" , "rule.on_buildcmd_file" @@ -334,7 +336,9 @@ function rule.apis() , "rule.before_clean" , "rule.before_package" , "rule.before_install" + , "rule.before_installcmd" , "rule.before_uninstall" + , "rule.before_uninstallcmd" , "rule.before_linkcmd" , "rule.before_buildcmd" , "rule.before_buildcmd_file" @@ -350,7 +354,9 @@ function rule.apis() , "rule.after_clean" , "rule.after_package" , "rule.after_install" + , "rule.after_installcmd" , "rule.after_uninstall" + , "rule.after_uninstallcmd" , "rule.after_linkcmd" , "rule.after_buildcmd" , "rule.after_buildcmd_file" diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 3f4a4efc0..54e5c03ab 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2768,7 +2768,9 @@ function target.apis() , "target.on_clean" , "target.on_package" , "target.on_install" + , "target.on_installcmd" , "target.on_uninstall" + , "target.on_uninstallcmd" -- target.before_xxx , "target.before_run" , "target.before_test" @@ -2779,7 +2781,9 @@ function target.apis() , "target.before_clean" , "target.before_package" , "target.before_install" + , "target.before_installcmd" , "target.before_uninstall" + , "target.before_uninstallcmd" -- target.after_xxx , "target.after_run" , "target.after_test" @@ -2791,7 +2795,9 @@ function target.apis() , "target.after_clean" , "target.after_package" , "target.after_install" + , "target.after_installcmd" , "target.after_uninstall" + , "target.after_uninstallcmd" } } end diff --git a/xmake/includes/xpack/xmake.lua b/xmake/includes/xpack/xmake.lua index 1e53e37dd..3026e57e9 100644 --- a/xmake/includes/xpack/xmake.lua +++ b/xmake/includes/xpack/xmake.lua @@ -56,10 +56,18 @@ local apis = { "xpack.add_installfiles" }, script = { + -- add custom commands script before installing + "xpack.before_installcmd", + -- add custom commands script before uninstalling + "xpack.before_uninstallcmd", -- add custom install commands script, we will also get it from target/rules "xpack.on_installcmd", -- add custom uninstall commands script, we will also get it from target/rules - "xpack.on_uninstallcmd" + "xpack.on_uninstallcmd", + -- add custom commands script after installing + "xpack.after_installcmd", + -- add custom commands script after uninstalling + "xpack.after_uninstallcmd" }, keyvalues = { -- set the spec variable |
