mirror of
https://github.com/sbrow/thor.git
synced 2026-10-25 10:11:55 -04:00
fix: ./defaults is now published alongside the binary.
Stopgap until they can be properly included in the build.
This commit is contained in:
+14
-1
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user