mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:01:12 +00:00
feat(updater): 重写并增强更新器功能
重构更新器代码,增加错误处理和进度显示 添加版本检查、JSON库加载和文件下载功能 改进用户界面和失败安全机制
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
_G._HOST = _G._HOST .. " (LeonOS 1.0.0)"
|
||||
_G._HOST = _G._HOST .. " (LeonOS 1.0.1)"
|
||||
local fs = rawget(_G, "fs")
|
||||
|
||||
_G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom"
|
||||
@@ -32,7 +32,7 @@ local rc = {
|
||||
_VERSION = {
|
||||
major = 1,
|
||||
minor = 0,
|
||||
patch = 0
|
||||
patch = 1
|
||||
},
|
||||
queueEvent = pull(os, "queueEvent"),
|
||||
startTimer = pull(os, "startTimer"),
|
||||
|
||||
@@ -37,6 +37,7 @@ if args[1] == "run" then
|
||||
if not _G.colors then _G.colors = require("colors") end
|
||||
if not _G.textutils then _G.textutils = require("textutils") end
|
||||
if not _G.shell then _G.shell = require("shell") end
|
||||
if not _G.http then _G.http = require("http") end
|
||||
|
||||
-- 执行下载的代码
|
||||
local func, err = load(data, "=<wget-run>", "t", _G)
|
||||
|
||||
Reference in New Issue
Block a user