bootloader cleanup and added license to installer downloads

This commit is contained in:
Mikayla Fischler 2023-11-04 12:51:24 -04:00
parent 7ef363a3c2
commit 25f68f338c
2 changed files with 11 additions and 13 deletions

View File

@ -60,7 +60,7 @@ def make_manifest(size):
}, },
"files" : { "files" : {
# common files # common files
"system" : [ "initenv.lua", "startup.lua", "configure.lua" ], "system" : [ "initenv.lua", "startup.lua", "configure.lua", "LICENSE" ],
"common" : list_files("./scada-common"), "common" : list_files("./scada-common"),
"graphics" : list_files("./graphics"), "graphics" : list_files("./graphics"),
"lockbox" : list_files("./lockbox"), "lockbox" : list_files("./lockbox"),

View File

@ -1,30 +1,28 @@
local util = require("scada-common.util") local util = require("scada-common.util")
local BOOTLOADER_VERSION = "0.3"
local println = util.println local println = util.println
local println_ts = util.println_ts
local BOOTLOADER_VERSION = "0.4"
println("SCADA BOOTLOADER V" .. BOOTLOADER_VERSION) println("SCADA BOOTLOADER V" .. BOOTLOADER_VERSION)
println("BOOT> SCANNING FOR APPLICATIONS...")
local exit_code ---@type boolean local exit_code
println_ts("BOOT> SCANNING FOR APPLICATIONS...")
if fs.exists("reactor-plc/startup.lua") then if fs.exists("reactor-plc/startup.lua") then
println("BOOT> FOUND REACTOR PLC CODE: EXEC STARTUP") println("BOOT> EXEC REACTOR PLC STARTUP")
exit_code = shell.execute("reactor-plc/startup") exit_code = shell.execute("reactor-plc/startup")
elseif fs.exists("rtu/startup.lua") then elseif fs.exists("rtu/startup.lua") then
println("BOOT> FOUND RTU CODE: EXEC STARTUP") println("BOOT> EXEC RTU STARTUP")
exit_code = shell.execute("rtu/startup") exit_code = shell.execute("rtu/startup")
elseif fs.exists("supervisor/startup.lua") then elseif fs.exists("supervisor/startup.lua") then
println("BOOT> FOUND SUPERVISOR CODE: EXEC STARTUP") println("BOOT> EXEC SUPERVISOR STARTUP")
exit_code = shell.execute("supervisor/startup") exit_code = shell.execute("supervisor/startup")
elseif fs.exists("coordinator/startup.lua") then elseif fs.exists("coordinator/startup.lua") then
println("BOOT> FOUND COORDINATOR CODE: EXEC STARTUP") println("BOOT> EXEC COORDINATOR STARTUP")
exit_code = shell.execute("coordinator/startup") exit_code = shell.execute("coordinator/startup")
elseif fs.exists("pocket/startup.lua") then elseif fs.exists("pocket/startup.lua") then
println("BOOT> FOUND POCKET CODE: EXEC STARTUP") println("BOOT> EXEC POCKET STARTUP")
exit_code = shell.execute("pocket/startup") exit_code = shell.execute("pocket/startup")
else else
println("BOOT> NO SCADA STARTUP FOUND") println("BOOT> NO SCADA STARTUP FOUND")
@ -32,6 +30,6 @@ else
return false return false
end end
if not exit_code then println_ts("BOOT> APPLICATION CRASHED") end if not exit_code then println("BOOT> APPLICATION CRASHED") end
return exit_code return exit_code