Skip to content

XPack Packaging

Xmake provides a powerful packaging command xmake pack and includes("@builtin/xpack") module to support generating installation packages in various formats (NSIS, Zip, Tar, Deb, Rpm, etc.).

For packaging commands, see Pack Programs. For the complete XPack API, see XPack API.

Basic Usage

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")

Generate Package

bash
$ xmake pack

Generate Specific Format

bash
$ xmake pack -f nsis
$ xmake pack -f zip