begin prototype, transcript browser

This commit is contained in:
Krzosa Karol
2025-07-27 10:18:54 +02:00
parent c8a4d19a72
commit 6724814440
19 changed files with 165 additions and 263 deletions

View File

@@ -19,8 +19,7 @@
#include "src/app/app.meta.c"
#include "src/ui/ui.meta.c"
#include "src/render/render.meta.c"
#include "src/wasm_app/wasm_app.meta.c"
#include "src/text_editor/text_editor.meta.c"
#include "src/prototype/prototype.meta.c"
#include "src/testing/testing.meta.c"
void build_testing_target(void) {
@@ -69,26 +68,12 @@ void build_win32_app_base_target(void) {
if (ok != 0) exit(ok);
}
void build_text_editor_dll_target(void) {
if (!cache_code_modified(s8("../src/text_editor/text_editor_main.c"), s8("app.dll"))) {
return;
}
int ok = os_systemf(
"cl ../src/text_editor/text_editor_main.c -Fe:app.dll -Fd:app.pdb"
" -I ../src /DAPP_IS_DLL"
" /Zi /FC /nologo /Oi"
" /WX /W3 /wd4200 /diagnostics:column"
" /link /incremental:no /DEBUG:FULL /DLL"
);
if (ok != 0) exit(ok);
}
void build_prototype_dll_target(void) {
if (!cache_code_modified(s8("../src/wasm_app/main.c"), s8("app.dll"))) {
if (!cache_code_modified(s8("../src/prototype/main.c"), s8("app.dll"))) {
return;
}
int ok = os_systemf(
"cl ../src/wasm_app/main.c -Fe:app.dll -Fd:app.pdb"
"cl ../src/prototype/main.c -Fe:app.dll -Fd:app.pdb"
" -I ../src /DAPP_IS_DLL"
" /Zi /FC /nologo /Oi"
" /WX /W3 /wd4200 /diagnostics:column"
@@ -99,13 +84,13 @@ void build_prototype_dll_target(void) {
void build_prototype_wasm_target(void) {
b32 html_code_modified = cache_code_modified(s8("../src/app/app_wasm.html"), s8("../package/index.html"));
b32 wasm_code_modified = cache_code_modified(s8("../src/wasm_app/main.c"), s8("main.wasm"));
b32 wasm_code_modified = cache_code_modified(s8("../src/prototype/main.c"), s8("main.wasm"));
if (html_code_modified) {
os_copy("../src/app/app_wasm.html", "../package/index.html", os_copy_overwrite);
}
if (wasm_code_modified) {
int ok = os_systemf(
"clang ../src/wasm_app/main.c -o main.wasm"
"clang ../src/prototype/main.c -o main.wasm"
" -Oz -g -I../src"
" -Wall -Wno-missing-braces -Wno-single-bit-bitfield-constant-conversion -Wno-unsequenced -Wno-initializer-overrides"
" -fdiagnostics-absolute-paths -fdiagnostics-format=msvc"
@@ -118,12 +103,12 @@ void build_prototype_wasm_target(void) {
}
void build_prototype_standalone_target(void) {
if (!cache_code_modified(s8("../src/wasm_app/main.c"), s8("standalone_app.exe"))) {
if (!cache_code_modified(s8("../src/prototype/main.c"), s8("standalone_app.exe"))) {
return;
}
int ok = os_systemf(
"cl ../src/wasm_app/main.c -Fe:standalone_app.exe -Fd:standalone_app.pdb"
"cl ../src/prototype/main.c -Fe:standalone_app.exe -Fd:standalone_app.pdb"
" -I ../src"
" /Zi /FC /nologo /Oi"
" /WX /W3 /wd4200 /diagnostics:column"
@@ -159,15 +144,13 @@ int main(int argc, char **argv) {
generate_math_code(tcx->temp);
generate_ui_code(tcx->temp);
generate_app_code(tcx->temp);
generate_wasm_app_code(tcx->temp);
generate_prototype_code(tcx->temp);
generate_render_code(tcx->temp);
generate_testing_code(tcx->temp);
generate_text_editor_code(tcx->temp);
b32 run_win32_app_base_target = true;
b32 run_testing_target = true;
b32 run_text_editor_dll_target = true;
b32 run_prototype_dll_target = false;
b32 run_prototype_dll_target = true;
b32 run_prototype_wasm_target = false;
b32 run_prototype_standalone_target = false;
b32 run_server = false;
@@ -192,10 +175,6 @@ int main(int argc, char **argv) {
build_win32_app_base_target();
}
if (run_text_editor_dll_target) {
build_text_editor_dll_target();
}
if (run_prototype_wasm_target) {
build_prototype_wasm_target();
}