XPack 打包
Xmake 提供了强大的打包命令 xmake pack 和 includes("@builtin/xpack") 模块,支持生成各种格式的安装包(NSIS, Zip, Tar, Deb, Rpm 等)。
基础用法
EXPLORER
src
main.cpp
xmake.lua
Lua xmake.lua
12345678910111213
add_rules("mode.debug", "mode.release")
includes("@builtin/xpack")
target("test")
set_kind("binary")
add_files("src/*.cpp")
xpack("test_pack")
set_formats("nsis", "zip", "targz")
set_title("Hello Xmake")
set_author("ruki")
add_targets("test")
生成包
bash
$ xmake pack生成指定格式
bash
$ xmake pack -f nsis
$ xmake pack -f zip