summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-17 23:39:49 +0800
committerruki <[email protected]>2023-11-17 23:39:49 +0800
commit08aa2aa500c79d8683629c5861beeebd99683213 (patch)
treee767826daf19c136fe8ca5ad04a68690b4960045
parenteed21f73a71d6e77f939db7c3404b3cd60bfb36b (diff)
improve batchcmds
-rw-r--r--xmake/plugins/pack/archive.lua4
-rw-r--r--xmake/plugins/pack/batchcmds.lua4
-rw-r--r--xmake/plugins/pack/nsis/main.lua4
3 files changed, 7 insertions, 5 deletions
diff --git a/xmake/plugins/pack/archive.lua b/xmake/plugins/pack/archive.lua
index 2f497fe19..cc6b3431a 100644
--- a/xmake/plugins/pack/archive.lua
+++ b/xmake/plugins/pack/archive.lua
@@ -21,10 +21,12 @@
-- imports
import("core.base.option")
import("utils.archive")
-import(".batchcmds")
+import("batchcmds")
-- pack archive package
function _pack_archive(package)
+ local batchcmds_ = batchcmds.get_installcmds(package)
+-- batchcmds_:runcmds()
end
function main(package, format)
diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua
index 1e24b733b..2bd45b86e 100644
--- a/xmake/plugins/pack/batchcmds.lua
+++ b/xmake/plugins/pack/batchcmds.lua
@@ -394,7 +394,7 @@ function get_installcmds(package)
script(package, batchcmds_)
end
end
- return batchcmds_:cmds()
+ return batchcmds_
end
-- get uninstall commands
@@ -413,6 +413,6 @@ function get_uninstallcmds(package)
script(package, batchcmds_)
end
end
- return batchcmds_:cmds()
+ return batchcmds_
end
diff --git a/xmake/plugins/pack/nsis/main.lua b/xmake/plugins/pack/nsis/main.lua
index 1435d1107..6b9d2961f 100644
--- a/xmake/plugins/pack/nsis/main.lua
+++ b/xmake/plugins/pack/nsis/main.lua
@@ -120,12 +120,12 @@ end
-- get install commands
function _get_installcmds(package)
- return _get_commands_string(package, batchcmds.get_installcmds(package), {install = true})
+ return _get_commands_string(package, batchcmds.get_installcmds(package):cmds(), {install = true})
end
-- get uninstall commands
function _get_uninstallcmds(package)
- return _get_commands_string(package, batchcmds.get_uninstallcmds(package), {install = false})
+ return _get_commands_string(package, batchcmds.get_uninstallcmds(package):cmds(), {install = false})
end
-- get value and filter it