From f467d71abc40d4fee6e896d7a0b8e4f5be7e16db Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 17 Jul 2026 23:49:52 +0800 Subject: add batchcmds:call and transform for bin2obj/c --- tests/projects/other/bin2obj/xmake.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/projects/other/bin2obj/xmake.lua') diff --git a/tests/projects/other/bin2obj/xmake.lua b/tests/projects/other/bin2obj/xmake.lua index 9541e17ae..74a50a027 100644 --- a/tests/projects/other/bin2obj/xmake.lua +++ b/tests/projects/other/bin2obj/xmake.lua @@ -6,3 +6,10 @@ target("test") add_files("src/*.c") add_files("src/data.bin", {zeroend = true}) add_files("src/xmake.ico", {zeroend = false}) + add_files("src/asset.bin", {zeroend = true, transform = function (inputfile, outputfile, opt) + print("transform ..") + import("core.base.bytes") + assert(bytes and opt.target) + local data = io.readfile(inputfile, {encoding = "binary"}) + io.writefile(outputfile, data:reverse(), {encoding = "binary"}) + end}) -- cgit v1.3.1