diff --git a/src/modules/bootmenu/init.lua b/src/modules/bootmenu/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/bootmenu/manifest.ini b/src/modules/bootmenu/manifest.ini new file mode 100644 index 0000000..543ee3a --- /dev/null +++ b/src/modules/bootmenu/manifest.ini @@ -0,0 +1,10 @@ +; This module simply loads files. +; It registers both an internal and +; external library. +[ZORYA_MOD] +name=loadfile +modver=1.0 +minver=2.0 +maxver=* +author=Adorable-Catgirl +url=https://github.com/Adorable-Catgirl/Zorya-NEO \ No newline at end of file diff --git a/src/modules/cpio-plus/init.lua b/src/modules/cpio-plus/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/cpio-plus/manifest.ini b/src/modules/cpio-plus/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/cpiofs/init.lua b/src/modules/cpiofs/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/cpiofs/manifest.ini b/src/modules/cpiofs/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/foxfs/init.lua b/src/modules/foxfs/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/foxfs/manifest.ini b/src/modules/foxfs/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/fuchas/init.lua b/src/modules/fuchas/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/fuchas/manifest.ini b/src/modules/fuchas/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/loadfile/init.lua b/src/modules/loadfile/init.lua new file mode 100644 index 0000000..ee35d34 --- /dev/null +++ b/src/modules/loadfile/init.lua @@ -0,0 +1,23 @@ +local component = component + +local function loadfile(addr, file) + local handle = assert(component.invoke(addr, "open", file)) + local buffer = "" + repeat + local data = component.invoke(addr, "read", handle, math.huge) + buffer = buffer .. (data or "") + until not data + component.invoke(addr, "close", handle) + local global = {} + for k, v in pairs(_G) do + global[k] = v + end + for k, v in pairs(OSEXPORT) do + global[k] = v + end + return load(buffer, "=" .. file, "bt", global) +end +EXPORT.loadfile = loadfile +MODULE.loadfile = loadfile +OSEXPORT.zorya = OSEXPORT.zorya or {} +OSEXPORT.zorya.loadfile = loadfile --For legacy purposes. \ No newline at end of file diff --git a/src/modules/loadfile/manifest.ini b/src/modules/loadfile/manifest.ini new file mode 100644 index 0000000..543ee3a --- /dev/null +++ b/src/modules/loadfile/manifest.ini @@ -0,0 +1,10 @@ +; This module simply loads files. +; It registers both an internal and +; external library. +[ZORYA_MOD] +name=loadfile +modver=1.0 +minver=2.0 +maxver=* +author=Adorable-Catgirl +url=https://github.com/Adorable-Catgirl/Zorya-NEO \ No newline at end of file diff --git a/src/modules/oefi1/init.lua b/src/modules/oefi1/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/oefi1/manifest.ini b/src/modules/oefi1/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/oefi2/init.lua b/src/modules/oefi2/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/oefi2/manifest.ini b/src/modules/oefi2/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/openos/init.lua b/src/modules/openos/init.lua new file mode 100644 index 0000000..669e700 --- /dev/null +++ b/src/modules/openos/init.lua @@ -0,0 +1,5 @@ +local component = require("component") + +local function openos_kload(env, fs) + ENV.BOOTFUNC = ENV.lib.loadfile(fs, "init.lua") +end \ No newline at end of file diff --git a/src/modules/openos/manifest.ini b/src/modules/openos/manifest.ini new file mode 100644 index 0000000..543ee3a --- /dev/null +++ b/src/modules/openos/manifest.ini @@ -0,0 +1,10 @@ +; This module simply loads files. +; It registers both an internal and +; external library. +[ZORYA_MOD] +name=loadfile +modver=1.0 +minver=2.0 +maxver=* +author=Adorable-Catgirl +url=https://github.com/Adorable-Catgirl/Zorya-NEO \ No newline at end of file diff --git a/src/modules/proximafs/init.lua b/src/modules/proximafs/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/proximafs/manifest.ini b/src/modules/proximafs/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/umanfs/init.lua b/src/modules/umanfs/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/umanfs/manifest.ini b/src/modules/umanfs/manifest.ini new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/vdev/init.lua b/src/modules/vdev/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/vdev/manifest.ini b/src/modules/vdev/manifest.ini new file mode 100644 index 0000000..e69de29