diff options
| author | ruki <[email protected]> | 2023-11-08 23:45:19 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-08 23:45:19 +0800 |
| commit | d1e979268f9a1e809d8128c7842ff9ccd677fd62 (patch) | |
| tree | 829718d3136d74ad481e21ceacc2a753f9ece619 | |
| parent | 559db0ba424acaf4f591083e495d97c918931c05 (diff) | |
add xpack plugin stub
| -rw-r--r-- | xmake/includes/xpack/xmake.lua | 7 | ||||
| -rw-r--r-- | xmake/plugins/pack/main.lua | 27 | ||||
| -rw-r--r-- | xmake/plugins/pack/xmake.lua | 30 |
3 files changed, 64 insertions, 0 deletions
diff --git a/xmake/includes/xpack/xmake.lua b/xmake/includes/xpack/xmake.lua index 09c9c2832..c812001f1 100644 --- a/xmake/includes/xpack/xmake.lua +++ b/xmake/includes/xpack/xmake.lua @@ -18,5 +18,12 @@ -- @file xmake.lua -- +-- Define xpack interfaces to generate installation package. e.g. nsis, deb, rpm, ... +-- +-- And we can call `xmake pack` plugin to pack them. +-- +-- @see https://github.com/xmake-io/xmake/issues/1433 +-- +-- define package description interp_add_scopeapis("xpack.set_description", {kind = "values"}) diff --git a/xmake/plugins/pack/main.lua b/xmake/plugins/pack/main.lua new file mode 100644 index 000000000..e29bf45ce --- /dev/null +++ b/xmake/plugins/pack/main.lua @@ -0,0 +1,27 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file main.lua +-- + +-- imports +import("core.base.option") + +function main() + +end + diff --git a/xmake/plugins/pack/xmake.lua b/xmake/plugins/pack/xmake.lua new file mode 100644 index 000000000..700f6c259 --- /dev/null +++ b/xmake/plugins/pack/xmake.lua @@ -0,0 +1,30 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file pack.lua +-- + +task("pack") + set_category("plugin") + on_run("main") + set_menu { + usage = "xmake pack [options] [names]", + description = "Pack binary installation packages.", + options = { + {nil, "names", "vs", nil, "The package names."} + } + } |
