summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-23 06:41:15 +0800
committerGitHub <[email protected]>2026-03-23 06:41:15 +0800
commit36b97ea5b101ded8d44a3e798e0c8b4748adf9a5 (patch)
treefec3ea025e838a1a49e9fdcffaca2f73b8248169 /tests/projects
parent84634aa837efe4275613d7826dc92f253cdf7cf5 (diff)
parent484b73ea9ab074569edd8708f49868dbf61d0b03 (diff)
Merge pull request #7416 from xmake-io/cli
Improve xmake.cli, use bin2obj
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/xmake_cli/hello/src/lni/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/projects/xmake_cli/hello/src/lni/main.c b/tests/projects/xmake_cli/hello/src/lni/main.c
index d61d60dac..740857750 100644
--- a/tests/projects/xmake_cli/hello/src/lni/main.c
+++ b/tests/projects/xmake_cli/hello/src/lni/main.c
@@ -1,8 +1,7 @@
#include <xmake/xmake.h>
-static tb_byte_t const g_luafiles_data[] = {
- #include "luafiles.xmz.h"
-};
+extern tb_byte_t const _binary_luafiles_xmz_start[];
+extern tb_byte_t const _binary_luafiles_xmz_end[];
static tb_int_t lni_test_hello(lua_State* lua) {
lua_pushliteral(lua, "hello xmake!");
@@ -15,7 +14,8 @@ static tb_void_t lni_initalizer(xm_engine_ref_t engine, lua_State* lua) {
, {tb_null, tb_null}
};
xm_engine_register(engine, "test", lni_test_funcs);
- xm_engine_add_embedfiles(engine, g_luafiles_data, sizeof(g_luafiles_data));
+ xm_engine_add_embedfiles(engine, _binary_luafiles_xmz_start,
+ (tb_size_t)(_binary_luafiles_xmz_end - _binary_luafiles_xmz_start));
}
tb_int_t main(tb_int_t argc, tb_char_t** argv) {