feat(安装系统): 添加应用启动器并更新安装路径

添加新的应用启动器程序(app.lua)用于从/app目录运行应用
将包安装路径从/rom改为/app目录
更新安装器版本号至0.3.6 Beta 2
确保/app目录在安装过程中自动创建
This commit is contained in:
2025-09-02 10:13:01 +08:00
parent a4b55d1fc8
commit e0c295dfd1
3 changed files with 65 additions and 2 deletions

View File

@@ -134,9 +134,15 @@ local function install_package(pkg_name, options)
-- 安装文件
print("Installing version: " .. latest_version)
-- 确保app目录存在
local app_dir = "/app"
if not fs.exists(app_dir) then
fs.makeDir(app_dir)
end
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(app_dir, file_path)
-- 确保目标目录存在
local dest_dir = fs.getDir(dest)