Skip to content

Commit e1c5ce3

Browse files
committed
embed xmake.xmz
1 parent 23ba59a commit e1c5ce3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

core/src/xmake/engine.c

+11-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@
4949
#ifdef TB_CONFIG_OS_HAIKU
5050
# include <image.h>
5151
#endif
52-
#ifdef XM_EMBED_ENABLE
53-
# include "xmake.xmz.h"
54-
#endif
5552

5653
/* //////////////////////////////////////////////////////////////////////////////////////
5754
* macros
@@ -587,6 +584,13 @@ static luaL_Reg const g_package_functions[] =
587584
// the lua global instance for signal handler
588585
static lua_State* g_lua = tb_null;
589586

587+
// the xmake script files data
588+
#ifdef XM_EMBED_ENABLE
589+
static tb_byte_t g_xmake_xmz_data[] = {
590+
#include "xmake.xmz.h"
591+
};
592+
#endif
593+
590594
/* //////////////////////////////////////////////////////////////////////////////////////
591595
* private implementation
592596
*/
@@ -1334,6 +1338,10 @@ tb_int_t xm_engine_main(xm_engine_ref_t self, tb_int_t argc, tb_char_t** argv, t
13341338
return -1;
13351339
}
13361340

1341+
#ifdef XM_EMBED_ENABLE
1342+
tb_trace_i("g_xmake_xmz_data: %d", sizeof(g_xmake_xmz_data));
1343+
#endif
1344+
13371345
// get the error code
13381346
return (tb_int_t)lua_tonumber(engine->lua, -1);
13391347
}

0 commit comments

Comments
 (0)