From fa5af0b295ca74cf6d69450ddcd9325722f86fd1 Mon Sep 17 00:00:00 2001 From: Jane Roxanne Date: Tue, 10 Sep 2019 19:02:04 -0500 Subject: [PATCH] Module init. --- src/modules/bootmenu/init.lua | 0 src/modules/bootmenu/manifest.ini | 10 ++++++++++ src/modules/cpio-plus/init.lua | 0 src/modules/cpio-plus/manifest.ini | 0 src/modules/cpiofs/init.lua | 0 src/modules/cpiofs/manifest.ini | 0 src/modules/foxfs/init.lua | 0 src/modules/foxfs/manifest.ini | 0 src/modules/fuchas/init.lua | 0 src/modules/fuchas/manifest.ini | 0 src/modules/loadfile/init.lua | 23 +++++++++++++++++++++++ src/modules/loadfile/manifest.ini | 10 ++++++++++ src/modules/oefi1/init.lua | 0 src/modules/oefi1/manifest.ini | 0 src/modules/oefi2/init.lua | 0 src/modules/oefi2/manifest.ini | 0 src/modules/openos/init.lua | 5 +++++ src/modules/openos/manifest.ini | 10 ++++++++++ src/modules/proximafs/init.lua | 0 src/modules/proximafs/manifest.ini | 0 src/modules/umanfs/init.lua | 0 src/modules/umanfs/manifest.ini | 0 src/modules/vdev/init.lua | 0 src/modules/vdev/manifest.ini | 0 24 files changed, 58 insertions(+) create mode 100644 src/modules/bootmenu/init.lua create mode 100644 src/modules/bootmenu/manifest.ini create mode 100644 src/modules/cpio-plus/init.lua create mode 100644 src/modules/cpio-plus/manifest.ini create mode 100644 src/modules/cpiofs/init.lua create mode 100644 src/modules/cpiofs/manifest.ini create mode 100644 src/modules/foxfs/init.lua create mode 100644 src/modules/foxfs/manifest.ini create mode 100644 src/modules/fuchas/init.lua create mode 100644 src/modules/fuchas/manifest.ini create mode 100644 src/modules/loadfile/init.lua create mode 100644 src/modules/loadfile/manifest.ini create mode 100644 src/modules/oefi1/init.lua create mode 100644 src/modules/oefi1/manifest.ini create mode 100644 src/modules/oefi2/init.lua create mode 100644 src/modules/oefi2/manifest.ini create mode 100644 src/modules/openos/init.lua create mode 100644 src/modules/openos/manifest.ini create mode 100644 src/modules/proximafs/init.lua create mode 100644 src/modules/proximafs/manifest.ini create mode 100644 src/modules/umanfs/init.lua create mode 100644 src/modules/umanfs/manifest.ini create mode 100644 src/modules/vdev/init.lua create mode 100644 src/modules/vdev/manifest.ini 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