refactor(installer): 更新库路径并移除未使用的下载代码

- 将默认ROM路径从primary分支更新为main分支
- 移除已注释掉的库下载功能代码
This commit is contained in:
2025-08-31 17:21:24 +08:00
parent 5df704f025
commit 41d9a689dc

View File

@@ -1,19 +1,19 @@
-- LeonOS installer -- LeonOS installer
local DEFAULT_ROM_DIR = "/rc" local DEFAULT_ROM_DIR = "/rc"
print("Downloading required libraries...") -- print("Downloading required libraries...")
local function dl(f) -- local function dl(f)
local hand, err = http.get(f, nil, true) -- local hand, err = http.get(f, nil, true)
if not hand then -- if not hand then
error(err, 0) -- error(err, 0)
end -- end
local data = hand.readAll() -- local data = hand.readAll()
hand.close() -- hand.close()
return data -- return data
end -- end
-- set up package.loaded for LeonOS libs -- set up package.loaded for LeonOS libs
package.loaded.rc = { package.loaded.rc = {
@@ -40,7 +40,7 @@ package.loaded["rc.json"] = json
local function rcload(f) local function rcload(f)
return ghload( return ghload(
"LeonMMcoset/LeonOS/primary/data/computercraft/lua/rom/"..f, f) "Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/rom/"..f, f)
end end
-- get LeonOS's textutils with its extra utilities -- get LeonOS's textutils with its extra utilities