mt_embed_file
This commit is contained in:
19
build_file.c
19
build_file.c
@@ -11,19 +11,13 @@
|
||||
#include "src/meta/cgen.c"
|
||||
|
||||
#include "src/app/app.meta.c"
|
||||
#include "src/wasm_app/ui.meta.c"
|
||||
#include "src/wasm_app/wasm_app.meta.c"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
cache_init(&Perm, s8_lit("cache_build_file"));
|
||||
int ok = 0;
|
||||
|
||||
ma_arena_t *arena = ma_create(ma_default_reserve_size);
|
||||
sb8_t *include_paths = sb8(arena);
|
||||
sb8_append(include_paths, OS_GetAbsolutePath(&Perm, s8_lit("../src")));
|
||||
|
||||
cg_files_t files = cg_lex_files(arena, s8_lit("../src/wasm_app/main.c"), include_paths);
|
||||
meta_app(arena);
|
||||
meta_ui(arena);
|
||||
|
||||
if (cache_code_modified(s8_lit("../src/core/core_math_gen.py"), s8_null)) {
|
||||
os_set_working_dir("../src/core");
|
||||
@@ -31,19 +25,14 @@ int main(int argc, char **argv) {
|
||||
os_set_working_dir("../../build");
|
||||
}
|
||||
|
||||
b32 execute_python_snippets = false; // make sure to not abuse, just for quick maths
|
||||
meta_app(arena);
|
||||
mt_wasm_app(arena);
|
||||
|
||||
b32 run_server = false;
|
||||
b32 core_test_target = false;
|
||||
b32 win32_target = true;
|
||||
b32 wasm_target = false;
|
||||
|
||||
if (execute_python_snippets) {
|
||||
for (cg_file_t *it = files.first; it; it = it->next) {
|
||||
i64 idx = s8_find(it->content, s8_lit("/*#"), 0);
|
||||
if (idx != -1) os_systemf("\"D:\\dev\\apps\\bin\\pyorun.bat\" %s", it->path.str);
|
||||
}
|
||||
}
|
||||
|
||||
if (run_server) {
|
||||
os_systemf("start /D ..\\package ..\\package\\run_server.bat");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user