From 29b1af482fd21def5b569f471f0ba97107a44cfa Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Mon, 1 Sep 2025 07:57:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0LeonOS=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E8=87=B30.1.0=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=A8=8B=E5=BA=8F=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将LeonOS版本号从1.6.0降级至0.1.0以反映实际开发阶段 移除安装程序中的多余换行符并使用coloredPrint统一输出样式 --- data/computercraft/lua/bios.lua | 6 +++--- installer.lua | 36 ++++++++++++++++----------------- 2 files changed, 21 insertions(+), 21 deletions(-) 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