diff options
| author | ruki <[email protected]> | 2023-11-16 23:05:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-16 23:05:56 +0800 |
| commit | 41de52de7a82e4ed8ef7e0b86ebed344e69820ea (patch) | |
| tree | efc47095943cb54e64289d565a2243ea920e1272 /xmake/plugins | |
| parent | d7cac5b8d0cde98ab4979c6e7602042511a27833 (diff) | |
add xpack to xmake/core
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/pack/main.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/pack/xmake.lua | 1 | ||||
| -rw-r--r-- | xmake/plugins/pack/xpack.lua | 7 |
3 files changed, 11 insertions, 1 deletions
diff --git a/xmake/plugins/pack/main.lua b/xmake/plugins/pack/main.lua index 09160fda0..dfaac68d8 100644 --- a/xmake/plugins/pack/main.lua +++ b/xmake/plugins/pack/main.lua @@ -81,7 +81,9 @@ function main() local oldir = os.cd(project.directory()) -- build targets first - _build_targets() + if option.get("autobuild") then + _build_targets() + end -- do pack _pack_packages() diff --git a/xmake/plugins/pack/xmake.lua b/xmake/plugins/pack/xmake.lua index 4bbd7f4bf..ce2a6e701 100644 --- a/xmake/plugins/pack/xmake.lua +++ b/xmake/plugins/pack/xmake.lua @@ -26,6 +26,7 @@ task("pack") description = "Pack binary installation packages.", options = { {'o', "outputdir", "kv", nil, "The output directory. (default: build/xpack)"}, + {nil, "autobuild", "kv", true, "Build targets automatically."}, {'f', "formats", "kv", "all", "Pack the given package formats.", "e.g.", " - xmake pack -f nsis,deb,rpm", diff --git a/xmake/plugins/pack/xpack.lua b/xmake/plugins/pack/xpack.lua index c925a9af1..9e747cc0a 100644 --- a/xmake/plugins/pack/xpack.lua +++ b/xmake/plugins/pack/xpack.lua @@ -43,6 +43,13 @@ function xpack:get(name) end end +-- set value +function xpack:set(name, ...) + if self._info then + self._info:set(name, ...) + end +end + -- get the extra configuration function xpack:extraconf(name, item, key) if self._info then |
