Xmake 提供了强大的打包命令 xmake pack 和 includes("@builtin/xpack") 模块,支持生成各种格式的安装包(NSIS, Zip, Tar, Deb, Rpm 等)。
关于打包命令的使用,请参阅打包程序。XPack 的完整接口请参阅 XPack 接口文档。
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