Xmake 提供了强大的打包命令 xmake pack 和 includes("@builtin/xpack") 模块,支持生成各种格式的安装包(NSIS, Zip, Tar, Deb, Rpm 等)。
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")
$ xmake pack$ xmake pack -f nsis
$ xmake pack -f zip