From 2469b4569411a0315f1e6788515bb8148900c100 Mon Sep 17 00:00:00 2001 From: Synthasmagoria Date: Fri, 28 Aug 2026 13:24:22 +0200 Subject: [PATCH] Better build and project file platform layer --- TODO.MD | 1 + build_desktop.sh | 23 +++++++++++++-- build_web.sh | 31 ++++++++++++++------ src/main_desktop.odin | 5 ++-- src/project.odin | 59 ++------------------------------------ src/project_default.odin | 61 ++++++++++++++++++++++++++++++++++++++++ src/project_web.odin | 26 +++++++++++++++++ test_web.sh | 1 + 8 files changed, 137 insertions(+), 70 deletions(-) create mode 100644 src/project_default.odin create mode 100644 src/project_web.odin create mode 100755 test_web.sh diff --git a/TODO.MD b/TODO.MD index 356bedc..29d1fa2 100644 --- a/TODO.MD +++ b/TODO.MD @@ -4,3 +4,4 @@ - Make web build - Center line - Zoom sensitivity +- Web read/write diff --git a/build_desktop.sh b/build_desktop.sh index 2083143..6bd7d99 100755 --- a/build_desktop.sh +++ b/build_desktop.sh @@ -1,7 +1,26 @@ #!/bin/bash -eu +EXE_NAME="Transformation Visualizer" OUT_DIR="build/desktop" +ASSETS_DIR="src/assets/" + +if [[ -v 1 ]]; then + if [ "$1" = "DEBUG" ]; then + ODIN_FLAGS="-debug" + elif [ "$1" = "RELEASE" ]; then + ODIN_FLAGS="-no-bounds-check -disable-assert -o:size -extra-linker-flags:\"-Wl,--gc-sections,-s\"" + elif [ "$1" = "TEST" ]; then + ODIN_FLAGS="-o:minimal -no-bounds-check -disable-assert -extra-linker-flags:\"-Wl,--gc-sections,-s\"" + else + echo "Usage: