fix: ./defaults is now published alongside the binary.

Stopgap until they can be properly included in the build.
This commit is contained in:
Spencer Brower
2026-08-30 12:22:09 -04:00
parent 229b6dcf04
commit 7cb1f5be32
3 changed files with 30 additions and 2 deletions
+14 -1
View File
@@ -2,4 +2,17 @@ package main
import "core:os"
DEFAULTS_PATH :: #directory + os.Path_Separator_String + "defaults"
// Path to the built-in default layouts, resolved at runtime.
//
// The default points at the `defaults` directory next to the source tree (via
// `#directory`), which works for local `odin run`/`odin build` from the repo.
// Packaged builds install `defaults/` to a fixed location and override this
// with `-define:THOR_DEFAULTS_PATH=<path>` (see flake.nix).
//
// TODO: bake these into the binary at compile time via `#load_directory` so the
// binary is self-contained and this runtime path goes away entirely. See
// TODOS.md.
DEFAULTS_PATH :: #config(
THOR_DEFAULTS_PATH,
#directory + os.Path_Separator_String + "defaults",
)