diff options
Diffstat (limited to 'core/src/xmake/xmake.lua')
| -rw-r--r-- | core/src/xmake/xmake.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/src/xmake/xmake.lua b/core/src/xmake/xmake.lua index af0bfd877..f5f2d9699 100644 --- a/core/src/xmake/xmake.lua +++ b/core/src/xmake/xmake.lua @@ -55,3 +55,17 @@ target("xmake") add_defines("UNICODE", "_UNICODE") 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}) + target:add("files", archivefile) + target:add("defines", "XM_EMBED_ENABLE=1") + end + end) |
