(callback)
| 344 | }); |
| 345 | } |
| 346 | function buildAppFileSystem(callback) { |
| 347 | if(Config.appPayload.length > 0){ |
| 348 | let uint8Array = getBase64Data(Config.appPayload); |
| 349 | createFile("/", Config.payloadZipFile, uint8Array); |
| 350 | callback(); |
| 351 | }else if(Config.appZipFile.length > 0){ |
| 352 | loadFile(Config.locateAppBaseUrl, Config.appZipFile, (uint8Array) => { |
| 353 | if (Config.Program.length > 0) { |
| 354 | let zipEntries = getZipEntries(uint8Array); |
| 355 | let folder = Config.appZipFile.toLowerCase().endsWith('.zip') ? |
| 356 | Config.appZipFile.substring(0, Config.appZipFile.length - 4) : Config.appZipFile; |
| 357 | let executablePathAndFilename = folder + "/" + Config.Program; |
| 358 | let exeFileList = zipEntries.filter(e => !e.directory && e.filename === executablePathAndFilename); |
| 359 | if (exeFileList.length == 1) { |
| 360 | Config.appSubfolder = folder; |
| 361 | } |
| 362 | } |
| 363 | createFile("/", Config.appZipFile, uint8Array); |
| 364 | callback(); |
| 365 | }); |
| 366 | }else{ |
| 367 | callback(); |
| 368 | } |
| 369 | } |
| 370 | function buildExtraFileSystems(callback) { |
| 371 | let extraFSs = []; |
| 372 | if(Config.extraPayload.length > 0){ |
no test coverage detected