diff --git a/build/_offline.lua b/build/_offline.lua index b8deeb4..52b119c 100644 --- a/build/_offline.lua +++ b/build/_offline.lua @@ -87,6 +87,7 @@ local function write_files(files, path) end end +-- write installation manifiest and offline install manager local function write_install() local handle = fs.open("install_manifest.json", "w") handle.write(b64_decode(install_manifest)) @@ -103,7 +104,7 @@ lgray() write_files(app_files, "/") write_files(dep_files, "/") --- write a install manifest and offline installer +-- write an install manifest and the offline installer write_install() green() diff --git a/build/bundle.py b/build/bundle.py index f45f2ab..3894044 100644 --- a/build/bundle.py +++ b/build/bundle.py @@ -7,7 +7,7 @@ import sys path_prefix = "./_minified/" # get git build info -build = subprocess.check_output(["git", "describe", "--tags"]).strip().decode("utf-8") +build = subprocess.check_output(["git", "describe", "--tags"]).strip().decode('UTF-8') # list files in a directory def list_files(path): @@ -110,7 +110,7 @@ manifest = { "coordinator" : list_files("./coordinator"), "pocket" : list_files("./pocket"), }, - "depends" : [ "system", "scada-common", "graphics", "lockbox" ], + "depends" : [ "system", "scada-common", "graphics", "lockbox" ] } # write the application installation items as Lua tables diff --git a/build/ccmsim.lua b/build/ccmsim.lua index a265076..d311a7c 100644 --- a/build/ccmsim.lua +++ b/build/ccmsim.lua @@ -132,7 +132,7 @@ if #opts == 0 or opts[1] == "help" then println(" check - check your installed versions") println(" update-rm - delete everything except the config,") println(" so that you can upload files for a") - println(" new two-file/off-line update") + println(" new two-file off-line update") println(" uninstall - delete all app files and config") return else @@ -144,7 +144,6 @@ else end -- run selected mode - if mode == "check" then local local_ok, manifest = read_local_manifest() if not local_ok then diff --git a/build/imgen.py b/build/imgen.py index 265f786..a854b1f 100644 --- a/build/imgen.py +++ b/build/imgen.py @@ -44,11 +44,9 @@ def get_version(path, is_lib = False): # generate installation manifest object def make_manifest(size): - os.chdir('./_minified') - manifest = { "versions" : { - "installer" : get_version("../ccmsi.lua"), + "installer" : get_version("./ccmsi.lua"), "bootloader" : get_version("./startup.lua"), "common" : get_version("./scada-common/util.lua", True), "comms" : get_version("./scada-common/comms.lua", True), @@ -97,8 +95,6 @@ def make_manifest(size): } } - os.chdir('../') - return manifest # write initial manifest with placeholder size diff --git a/ccmsi.lua b/ccmsi.lua index b056a9f..bc91112 100644 --- a/ccmsi.lua +++ b/ccmsi.lua @@ -160,7 +160,7 @@ local function _clean_dir(dir, tree) if fs.isDir(path) then _clean_dir(path, tree[val]) if #fs.list(path) == 0 then fs.delete(path);println("deleted "..path) end - elseif (not _in_array(val, tree)) and (val ~= "config.lua" ) then ---@todo delete on full release + elseif (not _in_array(val, tree)) and (val ~= "config.lua" ) then ---@todo remove config.lua on full release fs.delete(path) println("deleted "..path) end @@ -249,7 +249,6 @@ else end -- run selected mode - if mode == "check" then local ok, manifest = get_remote_manifest() if not ok then return end