From 99d1e515a92811ef688324111588fdfe4f1d31e9 Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Tue, 2 Sep 2025 07:56:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=87=B30.3.4=E5=B9=B6=E4=BF=AE=E6=94=B9=E5=8C=85=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将LeonOS版本号从0.3.3升级至0.3.4 修改包管理相关路径从/rom到/leonos,以统一安装目录 --- data/computercraft/lua/bios.lua | 4 ++-- data/computercraft/lua/rom/programs/pkg.lua | 10 +++++----- installer.lua | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/computercraft/lua/bios.lua b/data/computercraft/lua/bios.lua index 2bae903..ddf6edf 100644 --- a/data/computercraft/lua/bios.lua +++ b/data/computercraft/lua/bios.lua @@ -1,4 +1,4 @@ -_G._HOST = _G._HOST .. " (LeonOS 0.3.3)" +_G._HOST = _G._HOST .. " (LeonOS 0.3.4)" 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 = 0, minor = 3, - patch = 3 + patch = 4 }, queueEvent = pull(os, "queueEvent"), startTimer = pull(os, "startTimer"), diff --git a/data/computercraft/lua/rom/programs/pkg.lua b/data/computercraft/lua/rom/programs/pkg.lua index 73e82ed..e7c6145 100644 --- a/data/computercraft/lua/rom/programs/pkg.lua +++ b/data/computercraft/lua/rom/programs/pkg.lua @@ -26,9 +26,9 @@ term.at(1, 2) -- 包管理器配置 local pkg_config = { repo_url = "https://example.com/leonos/packages", -- 包仓库URL - local_pkg_dir = "/rom/packages", -- 本地包存储目录 - installed_db = "/rom/packages/installed.json", -- 已安装包数据库 - cache_dir = "/rom/cache" -- 缓存目录 + local_pkg_dir = "/leonos/packages", -- 本地包存储目录 + installed_db = "/leonos/packages/installed.json", -- 已安装包数据库 + cache_dir = "/leonos/cache" -- 缓存目录 } -- 确保必要的目录存在 @@ -136,7 +136,7 @@ local function install_package(pkg_name, options) print("Installing version: " .. latest_version) for _, file_path in ipairs(meta.files or {}) do local src = fs.combine(version_path, file_path) - local dest = fs.combine("/rom", file_path) + local dest = fs.combine("/leonos", file_path) -- 确保目标目录存在 local dest_dir = fs.getDir(dest) @@ -250,7 +250,7 @@ local function remove_package(pkg_name) if ok and meta then -- 删除包文件 for _, file_path in ipairs(meta.files or {}) do - local dest = fs.combine("/rom", file_path) + local dest = fs.combine("/leonos", file_path) if fs.exists(dest) then fs.delete(dest) print("Removed: " .. file_path) diff --git a/installer.lua b/installer.lua index 04389fa..c5b2eff 100644 --- a/installer.lua +++ b/installer.lua @@ -1,5 +1,5 @@ -- LeonOS installer -local INSTALLER_VERSION = "0.3.3" +local INSTALLER_VERSION = "0.3.4" local DEFAULT_ROM_DIR = "/leonos" print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")