mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-11-23 18:58:06 +11:00
Module init.
This commit is contained in:
parent
9a4c6a94d7
commit
fa5af0b295
0
src/modules/bootmenu/init.lua
Normal file
0
src/modules/bootmenu/init.lua
Normal file
10
src/modules/bootmenu/manifest.ini
Normal file
10
src/modules/bootmenu/manifest.ini
Normal file
@ -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
|
0
src/modules/cpio-plus/init.lua
Normal file
0
src/modules/cpio-plus/init.lua
Normal file
0
src/modules/cpio-plus/manifest.ini
Normal file
0
src/modules/cpio-plus/manifest.ini
Normal file
0
src/modules/cpiofs/init.lua
Normal file
0
src/modules/cpiofs/init.lua
Normal file
0
src/modules/cpiofs/manifest.ini
Normal file
0
src/modules/cpiofs/manifest.ini
Normal file
0
src/modules/foxfs/init.lua
Normal file
0
src/modules/foxfs/init.lua
Normal file
0
src/modules/foxfs/manifest.ini
Normal file
0
src/modules/foxfs/manifest.ini
Normal file
0
src/modules/fuchas/init.lua
Normal file
0
src/modules/fuchas/init.lua
Normal file
0
src/modules/fuchas/manifest.ini
Normal file
0
src/modules/fuchas/manifest.ini
Normal file
23
src/modules/loadfile/init.lua
Normal file
23
src/modules/loadfile/init.lua
Normal file
@ -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.
|
10
src/modules/loadfile/manifest.ini
Normal file
10
src/modules/loadfile/manifest.ini
Normal file
@ -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
|
0
src/modules/oefi1/init.lua
Normal file
0
src/modules/oefi1/init.lua
Normal file
0
src/modules/oefi1/manifest.ini
Normal file
0
src/modules/oefi1/manifest.ini
Normal file
0
src/modules/oefi2/init.lua
Normal file
0
src/modules/oefi2/init.lua
Normal file
0
src/modules/oefi2/manifest.ini
Normal file
0
src/modules/oefi2/manifest.ini
Normal file
5
src/modules/openos/init.lua
Normal file
5
src/modules/openos/init.lua
Normal file
@ -0,0 +1,5 @@
|
||||
local component = require("component")
|
||||
|
||||
local function openos_kload(env, fs)
|
||||
ENV.BOOTFUNC = ENV.lib.loadfile(fs, "init.lua")
|
||||
end
|
10
src/modules/openos/manifest.ini
Normal file
10
src/modules/openos/manifest.ini
Normal file
@ -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
|
0
src/modules/proximafs/init.lua
Normal file
0
src/modules/proximafs/init.lua
Normal file
0
src/modules/proximafs/manifest.ini
Normal file
0
src/modules/proximafs/manifest.ini
Normal file
0
src/modules/umanfs/init.lua
Normal file
0
src/modules/umanfs/init.lua
Normal file
0
src/modules/umanfs/manifest.ini
Normal file
0
src/modules/umanfs/manifest.ini
Normal file
0
src/modules/vdev/init.lua
Normal file
0
src/modules/vdev/init.lua
Normal file
0
src/modules/vdev/manifest.ini
Normal file
0
src/modules/vdev/manifest.ini
Normal file
Loading…
Reference in New Issue
Block a user