Files
Halyde/halyde/core/boot.lua
T
2026-04-30 15:09:56 +00:00

1 line
1.5 KiB
Lua

local a=...local b=a("/halyde/lib/filesystem.lua")(a)_G._OSVERSION="Halyde 2.8.1"_G._OSLOGO=""local c,d=b.open("/halyde/config/oslogo.ans","r"),nil;repeat d=c:read(math.huge)_OSLOGO=_OSLOGO..(d or"")until not d;_G.package={["preloaded"]={}}a("/halyde/core/datatools.lua")()function _G.import(a,...)local c=table.pack(...)if package.preloaded[a]then return package.preloaded[a]end;local d;if b.exists(a)then d=a elseif b.exists("/halyde/lib/"..a..".lua")then d="/halyde/lib/"..a..".lua"elseif shell and shell.workingDirectory and b.exists(shell.workingDirectory..a)then d=shell.workingDirectory..a end;assert(d,"module not found\npossible locations:\n/halyde/lib/"..a..".lua")local a,b,e=b.open(d),"",nil;repeat e=a:read(math.huge or math.maxinteger)b=b..(e or"")until not e;a:close()return(assert(load(b,"="..d))(table.unpack(c)))end;local function a(a)local b,c,d=assert(b.open("/halyde/lib/"..a..".lua","r")),"",nil;repeat d=b:read(math.huge or math.maxinteger)c=c..(d or"")until not d;package.preloaded[a]=assert(load(c,"="..a))()_G[a]=nil end;a("component")a("computer")a("filesystem")local a=import("component")local b=a.gpu;local a=a.list("screen")()b.bind(a)b.setResolution(b.maxResolution())local a=import("filesystem")if not a.exists("/halyde/config/shell.json")then a.copy("/halyde/config/generate/shell.json","/halyde/config/shell.json")end;if not a.exists("/halyde/config/startupapps.json")then a.copy("/halyde/config/generate/startupapps.json","/halyde/config/startupapps.json")end;a=nil;import("/halyde/core/cormgr.lua")