From a8bdf4c862c9d08848fab0e1416aec78d1efa8ff Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 12 Dec 2021 22:55:35 -0600 Subject: [PATCH] extensible config --- .gitignore | 2 ++ src/build.onyx | 21 +++++++-------------- src/config.onyx.template | 3 +++ 3 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 .gitignore create mode 100644 src/config.onyx.template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a15ae7a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +src/config.onyx +*.code-workspace \ No newline at end of file diff --git a/src/build.onyx b/src/build.onyx index 9de9978..e98d2f8 100644 --- a/src/build.onyx +++ b/src/build.onyx @@ -1,19 +1,12 @@ -#local runtime :: package runtime + +#load "config" +#load "main" #load "core/std" -// These paths are very specific to where I keep Onyx on my system. -// In the short-term, Onyx modules should be copied locally to this -// project. -#if runtime.OS == runtime.OS_Windows { - #load_path "\\dev\\onyx\\" -} -#if runtime.OS == runtime.OS_Linux { - #load_path "/home/brendan/dev/c/onyx" -} +#local runtime :: package runtime +#load_path runtime.vars.ONYX_MODULE_DIR #library_path "./lib" -#load "modules/glfw3/module" -#load "modules/opengles/module" - -#load "main" \ No newline at end of file +#load "glfw3/module" +#load "opengles/module" \ No newline at end of file diff --git a/src/config.onyx.template b/src/config.onyx.template new file mode 100644 index 0000000..2471283 --- /dev/null +++ b/src/config.onyx.template @@ -0,0 +1,3 @@ +package runtime.vars + +ONYX_MODULE_DIR :: // ... -- 2.25.1