diff options
| author | ruki <[email protected]> | 2023-11-09 22:46:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-09 22:46:16 +0800 |
| commit | caa1342b25ed7e71b3975a6b40ec8823aa5f0d23 (patch) | |
| tree | 1e7bd6b12ef4175ab0b6a6f48d4032bf360ad1b5 | |
| parent | ba750b500a475c11e28613bc63384d74b44296d8 (diff) | |
add more apis and arguments
| -rw-r--r-- | xmake/includes/xpack/xmake.lua | 18 | ||||
| -rw-r--r-- | xmake/plugins/pack/xmake.lua | 9 |
2 files changed, 22 insertions, 5 deletions
diff --git a/xmake/includes/xpack/xmake.lua b/xmake/includes/xpack/xmake.lua index 31e898236..3491fa7ba 100644 --- a/xmake/includes/xpack/xmake.lua +++ b/xmake/includes/xpack/xmake.lua @@ -28,16 +28,26 @@ -- define apis local apis = { values = { - -- set package version, we will also use project/target version if it's not configured + -- set package version, we will also get it from project/target "xpack.set_version", -- set pacakge homepage url "xpack.set_homepage", -- set package description "xpack.set_description", - -- set package license, we will also use target license if it's not configured + -- set package license, we will also get them from target "xpack.set_license", - -- add target names to be packaged - "xpack.add_targets" + -- add package formats, e.g. nsis, deb, rpm, targz, zip, runself, ... + "xpack.add_formats", + -- add targets to be packaged + "xpack.add_targets", + -- add install files, we will also get them from target + "xpack.add_installfiles", + -- set install directory, we will also get it from target + "xpack.set_installdir", + -- 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" } } for _, apiname in ipairs(apis.values) do diff --git a/xmake/plugins/pack/xmake.lua b/xmake/plugins/pack/xmake.lua index 700f6c259..a8cce7762 100644 --- a/xmake/plugins/pack/xmake.lua +++ b/xmake/plugins/pack/xmake.lua @@ -25,6 +25,13 @@ task("pack") usage = "xmake pack [options] [names]", description = "Pack binary installation packages.", options = { - {nil, "names", "vs", nil, "The package names."} + {'o', "output", "kv", nil, "The output directory. (default: build/xpack)"}, + {'f', "formats", "kv", "all", "Pack the given package formats.", + "e.g.", + " - xmake pack -f nsis,deb,rpm", + "values:", + values = {"nsis", "deb", "rpm", "runself", "targz", "zip"}}, + {}, + {nil, "packages", "vs", nil, "The package names."} } } |
