diff --git a/data/computercraft/lua/bios.lua b/data/computercraft/lua/bios.lua index 703f2b7..3dee6d4 100644 --- a/data/computercraft/lua/bios.lua +++ b/data/computercraft/lua/bios.lua @@ -1,4 +1,4 @@ -_G._HOST = _G._HOST .. " (LeonOS 1.6.0)" +_G._HOST = _G._HOST .. " (LeonOS 0.1.0)" local fs = rawget(_G, "fs") @@ -33,8 +33,8 @@ local reboot = pull(os, "restart") local rc = { _NAME = "LeonOS", _VERSION = { - major = 1, - minor = 6, + major = 0, + minor = 1, patch = 0 }, queueEvent = pull(os, "queueEvent"), diff --git a/installer.lua b/installer.lua index ff4000f..b610167 100644 --- a/installer.lua +++ b/installer.lua @@ -1,8 +1,8 @@ -- LeonOS installer local DEFAULT_ROM_DIR = "/rc" -print("Start loading LeonOS installer...\n") -print("[Installer] Loading module 1\n") +print("Start loading LeonOS installer...") +print("[Installer] Loading module 1") local function dl(f) local hand, err = http.get(f, nil, true) if not hand then @@ -14,41 +14,41 @@ local function dl(f) return data end -print("[Installer] Loading done.\n") -print("[Installer] Loading module 2\n") +print("[Installer] Loading done.") +print("[Installer] Loading module 2") -- set up package.loaded for LeonOS libs package.loaded.rc = { expect = require("cc.expect").expect, write = write, sleep = sleep } -print("[Installer] Loading done.\n") -print("[Installer] Loading module 3\n") +print("[Installer] Loading done.") +print("[Installer] Loading module 3") package.loaded.term = term package.loaded.colors = colors _G.require = require -print("[Installer] Loading done.\n") -print("[Installer] Loading module 4\n") +print("[Installer] Loading done.") +print("[Installer] Loading module 4") function term.at(x, y) term.setCursorPos(x, y) return term end -print("[Installer] Loading done.\n") -print("[Installer] Loading module 5\n") +print("[Installer] Loading done.") +print("[Installer] Loading module 5") local function ghload(f, c) return assert(load(dl("https://gh.catmak.name/https://raw.githubusercontent.com/"..f), "="..(c or f), "t", _G))() end -print("[Installer] Loading done.\n") -print("[Installer] Loading module 6\n") +print("[Installer] Loading done.") +print("[Installer] Loading module 6") local json = ghload("rxi/json.lua/master/json.lua", "ghload(json)") package.loaded["rc.json"] = json -print("[Installer] Loading module 7\n") +print("[Installer] Loading module 7") local function rcload(f) return ghload( "Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/rom/"..f, f) end -print("[Installer] Loading done.\n") -print("[Installer] Loading module 8\n") +print("[Installer] Loading done.") +print("[Installer] Loading module 8") -- get LeonOS's textutils with its extra utilities local tu = rcload("apis/textutils.lua") @@ -86,9 +86,9 @@ for y=2, term.getSize() do end term.at(1, 2) tu.coloredPrint(colors.yellow, - "LeonOS Installer\n=======================") -print("You are going to install LeonOS to your computer.") -print("This will overwrite any existing files in the installation directory.") + "LeonOS Installer (v".._VERSION..")\n=======================") +tu.coloredPrint("You are going to install LeonOS to your computer.") +tu.coloredPrint("This will ",colors.red,"overwrite any existing files", colors.white, " in the installation directory.") tu.coloredPrint(colors.yellow, "Are you sure? (y/n)") local confirm = read() if confirm ~= "y" then