made installer

This commit is contained in:
2026-03-19 11:16:05 -04:00
parent 9b338328f0
commit d0f26a937f
16 changed files with 982 additions and 179 deletions

View File

@@ -158,6 +158,13 @@ local ok, err = xpcall(function()
file.close()
end
local eeprom
if apis.fs.exists("/startup.lua") then
eeprom="/startup.lua"
elseif apis.fs.exists("/eeprom") then
eeprom="/eeprom"
end
local eventQueue = {}
local function queueEvent(event, ...)
@@ -252,9 +259,9 @@ local ok, err = xpcall(function()
return nil
end
end,
getEEPROM = function() return getFile("/startup.lua") end,
getEEPROM = function() return getFile(eeprom) end,
setEEPROM = function(_, text)
local h = apis.fs.open("/startup.lua", "w")
local h = apis.fs.open(eeprom, "w")
h.write(text)
h.close()
end,

View File

@@ -22,6 +22,25 @@ local colors = {
[0x000000]=0x8000
}
local plt = {
0xFFFFFF,
0xFF0000,
0x00FF00,
0x0000FF,
0x00FFFF,
0xFF00FF,
0xFFFF00,
0xFF6D00,
0x6DFF55,
0x24FFFF,
0x924900,
0x6D6D55,
0xDBDBAA,
0x6D00FF,
0xB6FF00,
0x000000
}
local fg,bg=0x6D6D55,0x000000
local l1f,l1d,l2,ops={},{},{},0
@@ -155,7 +174,7 @@ local function newtty(obj, id, ev)
obj.setPaletteColor(0x8000, 0x000000) -- #B6FF00
kernel.devfs.data["tty"][id] = function(op, mode)
if op=="type" then
return "character device"
return "Terminal"
elseif op=="open" then
local h = {
read=function(amount)
@@ -203,6 +222,9 @@ local function newtty(obj, id, ev)
end,
gctrl=function()
return serializeBool(ctrl)..";"..serializeBool(alt)
end,
gplt=function()
return plt
end
}
if mode=="rw" then