hot reload working
This commit is contained in:
26
build_file.c
26
build_file.c
@@ -17,8 +17,8 @@
|
||||
#include "src/wasm_app/wasm_app.meta.c"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
core_init();
|
||||
int ok = 0;
|
||||
ma_arena_t *arena = ma_create(ma_default_reserve_size);
|
||||
|
||||
SRC_SearchPaths.include_path = (char*[]){OS_GetAbsolutePath(&Perm, s8_lit("../src")).str};
|
||||
SRC_SearchPaths.include_path_count = 1;
|
||||
@@ -30,10 +30,10 @@ int main(int argc, char **argv) {
|
||||
os_systemf("py core_math_gen.py");
|
||||
os_set_working_dir("../../build");
|
||||
}
|
||||
mt_ui(arena);
|
||||
mt_app(arena);
|
||||
mt_wasm_app(arena);
|
||||
mt_render(arena);
|
||||
mt_ui(tcx->temp);
|
||||
mt_app(tcx->temp);
|
||||
mt_wasm_app(tcx->temp);
|
||||
mt_render(tcx->temp);
|
||||
|
||||
b32 run_server = false;
|
||||
b32 core_test_target = true;
|
||||
@@ -44,10 +44,22 @@ int main(int argc, char **argv) {
|
||||
os_systemf("start /D ..\\package ..\\package\\run_server.bat");
|
||||
}
|
||||
|
||||
if (win32_target && cache_code_modified(s8_lit("../src/wasm_app/main.c"), s8_lit("app_win32.exe"))) {
|
||||
if (win32_target && cache_code_modified(s8_lit("../src/wasm_app/main.c"), s8_lit("app.dll"))) {
|
||||
os_delete_file(s8_lit("app_win32.pdb"));
|
||||
ok = os_systemf(
|
||||
"cl ../src/wasm_app/main.c -Fe:app_win32.exe -Fd:app_win32.pdb"
|
||||
"cl ../src/wasm_app/main.c -Fe:app.dll -Fd:app.pdb"
|
||||
" -I ../src"
|
||||
" /Zi /FC /nologo /Oi"
|
||||
" /WX /W3 /wd4200 /diagnostics:column"
|
||||
" /link /incremental:no /DEBUG:FULL /DLL"
|
||||
);
|
||||
if (ok != 0) return ok;
|
||||
}
|
||||
|
||||
if (win32_target && cache_code_modified(s8_lit("../src/wasm_app/win32_exe.c"), s8_lit("app_win32.exe"))) {
|
||||
// os_delete_file(s8_lit("app_win32.pdb"));
|
||||
ok = os_systemf(
|
||||
"cl ../src/wasm_app/win32_exe.c -Fe:app_win32.exe -Fd:app_win32.pdb"
|
||||
" -I ../src"
|
||||
" /Zi /FC /nologo /Oi"
|
||||
" /WX /W3 /wd4200 /diagnostics:column"
|
||||
|
||||
Reference in New Issue
Block a user