fix: 更新安装程序版本号并优化shell欢迎界面

- 将安装程序版本号从0.3.7 Beta 9更新至0.3.7 Beta 10
- 重构shell.lua中的欢迎界面显示逻辑,避免重复代码
- 统一在shell启动时显示欢迎信息和图标
This commit is contained in:
2025-09-02 16:42:31 +08:00
parent 119f43b7cc
commit 937e6bdf0c
2 changed files with 9 additions and 16 deletions

View File

@@ -27,24 +27,9 @@ local textutils = require("textutils")
if os.version then if os.version then
textutils.coloredPrint(colors.yellow, os.version(), colors.white) textutils.coloredPrint(colors.yellow, os.version(), colors.white)
local image = paintutils.parseImage([[
f f
f f
ffff
]])
paintutils.drawImage(image, term.getCursorPos())
else else
textutils.coloredPrint(colors.yellow, rc.version(), colors.white) textutils.coloredPrint(colors.yellow, rc.version(), colors.white)
local image = paintutils.parseImage([[
f f
f f
ffff
]])
paintutils.drawImage(image, term.getCursorPos())
end end
textutils.coloredPrint(colors.yellow, "Welcome using the beta version of LeonOS!", colors.white)
thread.vars().parentShell = thread.id() thread.vars().parentShell = thread.id()
shell.init(_ENV) shell.init(_ENV)
@@ -97,6 +82,14 @@ for _, prog in ipairs(fs.list(completions)) do
end end
local history = {} local history = {}
local image = paintutils.parseImage([[
f f
f f
ffff
]])
paintutils.drawImage(image, term.getCursorPos())
textutils.coloredPrint(colors.yellow, "Welcome using the beta version of LeonOS!", colors.white)
while true do while true do
term.setTextColor(colors.yellow) term.setTextColor(colors.yellow)
rc.write("$ "..shell.dir().." >>> ") rc.write("$ "..shell.dir().." >>> ")

View File

@@ -1,5 +1,5 @@
-- LeonOS installer -- LeonOS installer
local INSTALLER_VERSION = "0.3.7 Beta 9" local INSTALLER_VERSION = "0.3.7 Beta 10"
local DEFAULT_ROM_DIR = "/leonos" local DEFAULT_ROM_DIR = "/leonos"
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...") print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")