patch management
Use texteditor if available Auto disable if patches folder doesnt exist And show a restart message after file edit Sort menu entries in execution order Warning sign for failing patches
This commit is contained in:
1 parent
cf9d3a0d70
commit
4e944dc918
5 files changed
+203
No files matched your search
@@ -15,6 +15,11 @@ local userpatch = {
|
||||
before_exit = "8", -- to be started a bit before exit before settings are saved (always)
|
||||
on_exit = "9", -- to be started right before exit (always)
|
||||
|
||||
-- hash table for patch execution status
|
||||
-- key: name of the patch
|
||||
-- value: true (success), false (failure), nil (not executed)
|
||||
execution_status = {},
|
||||
|
||||
-- the patch function itself
|
||||
applyPatches = function(priority) end, -- to be overwritten, if the device allows it.
|
||||
}
|
||||
@@ -64,6 +69,7 @@ local function runUserPatchTasks(dir, priority)
|
||||
if fullpath:match("%.lua$") then -- execute patch-files first
|
||||
logger.info("Applying patch:", fullpath)
|
||||
local ok, err = pcall(dofile, fullpath)
|
||||
userpatch.execution_status[entry] = ok
|
||||
if not ok then
|
||||
logger.warn("Patching failed:", err)
|
||||
-- Only show InfoMessage, when UIManager is working
|
||||
|
||||
Reference in new issue
Block a user