extensible config
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 13 Dec 2021 04:55:35 +0000 (22:55 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 13 Dec 2021 04:55:35 +0000 (22:55 -0600)
.gitignore [new file with mode: 0644]
src/build.onyx
src/config.onyx.template [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a15ae7a
--- /dev/null
@@ -0,0 +1,2 @@
+src/config.onyx
+*.code-workspace
\ No newline at end of file
index 9de9978bbbbbcc7f5f806b9f54bf9de2b57fe360..e98d2f8a98c61f5c7b7fcf632e75d32f85db25b1 100644 (file)
@@ -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 (file)
index 0000000..2471283
--- /dev/null
@@ -0,0 +1,3 @@
+package runtime.vars
+
+ONYX_MODULE_DIR :: // ...