Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --set root path
- _G.rootPath = "/"
- _G.w, _G.h = term.getSize()
- --load parameters
- os.loadAPI(rootPath .. "params")
- --load other variables
- _G.prgPath = params.prgPath
- _G.osFilesPath = params.osFilesPath
- _G.sysPath = params.sysPath
- _G.usrPath = params.usrPath
- _G.regPath = params.regPath
- _G.funcPath = params.funcPath
- _G.restPath = params.restPath
- --install updates
- if params.update ~= 0 then
- os.loadAPI(sysPath .. "recover/recovery")
- recovery.recover(params.update)
- end
- --load main system functions
- os.loadAPI(sysPath .. "main")
- os.loadAPI(sysPath .. "ui")
- os.loadAPI(sysPath .. "recovery/recovery")
- --load functions
- os.loadAPI(funcPath .. "cred")
- os.loadAPI(funcPath .. "debug")
- os.loadAPI(funcPath .. "func")
- os.loadAPI(funcPath .. "periph")
- --load registry settings
- os.loadAPI(regPath .. "prg")
- os.loadAPI(regPath .. "settings")
- --make sure that the system didn't crash
- params.debugger()
- --[[
- --set it to crash in case the system shuts down incorrectly
- os.unloadAPI(rootPath .. "params")
- local file = fs.open(rootPath .. "params", "r")
- local data = file.readAll()
- file.close()
- data = string.gsub(data, 'crash = 0', 'crash = 1')
- file = fs.open(rootPath .. "params", "w")
- file.write(data)
- file.close()
- --reload the API
- os.loadAPI(rootPath .. "params")]]--
- if term.isColor() then
- _G.tbCol = params.tbColMain
- _G.tbxCol = params.tbxColMain
- _G.txCol = params.txColMain
- _G.bgCol = params.bgCol
- _G.stxCol = params.stxColMain
- else
- _G.tbCol = params.tbMain
- _G.tbxCol = params.tbMain
- _G.txCol = params.txMain
- _G.bgCol = params.bgCol
- _G.stxCol = params.stxMain
- end
- --start OS
- main.start()
Add Comment
Please, Sign In to add comment