diff options
| author | ruki <[email protected]> | 2024-08-22 00:49:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-08-22 00:49:04 +0800 |
| commit | 906fa7a6d77e20190ebe943361e53c595237e52e (patch) | |
| tree | 960ee5521e3112addc64d214930abeb8cbd8fa29 /core/src | |
| parent | 7b05f6e814dedea34ca11a27833e7c39c3afe246 (diff) | |
archive xmake.xmz
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/demo/xmake.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/demo/xmake.lua b/core/src/demo/xmake.lua index f519dd88a..f0900402d 100644 --- a/core/src/demo/xmake.lua +++ b/core/src/demo/xmake.lua @@ -88,3 +88,15 @@ target("demo") end end) + -- embed all script files + add_rules("utils.bin2c", {linewidth = 16, extensions = ".xmz"}) + on_config(function (target) + import("utils.archive.archive") + if has_config("embed") then + local archivefile = path.join(target:autogendir(), "bin2c", "xmake.xmz") + print("archiving %s ..", archivefile) + os.tryrm(archivefile) + local rootdir = path.normalize(path.join(os.projectdir(), "..", "xmake")) + archive(archivefile, rootdir, {recurse = true, curdir = rootdir}) + end + end) |
