diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index 10c4fed..62989e1 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -1574,11 +1574,15 @@ class AssetGuard extends EventEmitter { self.progress -= self[identifier].dlsize self[identifier] = new DLTracker([], 0) if(self.totaldlsize === 0) { - self.emit('extracting') - AssetGuard._extractPackXZ(self.extractQueue, self.javaexec).then(() => { - self.extractQueue = [] + if(self.extractQueue.length > 0){ + self.emit('extracting') + AssetGuard._extractPackXZ(self.extractQueue, self.javaexec).then(() => { + self.extractQueue = [] + self.emit('dlcomplete') + }) + } else { self.emit('dlcomplete') - }) + } } }) return true diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 599fedc..6a6088c 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -216,6 +216,8 @@ let serverStatusListener = setInterval(() => refreshServerStatus(true), 300000) let sysAEx let scanAt +let extractListener + function asyncSystemScan(launchAfter = true){ setLaunchDetails('Please wait..') @@ -315,7 +317,17 @@ function asyncSystemScan(launchAfter = true){ remote.getCurrentWindow().setProgressBar(-1) // Wait for extration to complete. - setLaunchDetails('Extracting..') + const eLStr = 'Extracting' + let dotStr = '' + setLaunchDetails(eLStr) + extractListener = setInterval(() => { + if(dotStr.length >= 3){ + dotStr = '' + } else { + dotStr += '.' + } + setLaunchDetails(eLStr + dotStr) + }, 750) } else if(m.task === 2){ @@ -323,6 +335,11 @@ function asyncSystemScan(launchAfter = true){ ConfigManager.setJavaExecutable(m.jPath) ConfigManager.save() + if(extractListener != null){ + clearInterval(extractListener) + extractListener = null + } + setLaunchDetails('Java Installed!') if(launchAfter){ @@ -356,6 +373,8 @@ let serv let versionData let forgeData +let progressListener + function dlAsync(login = true){ // Login parameter is temporary for debug purposes. Allows testing the validation/downloads without @@ -443,12 +462,26 @@ function dlAsync(login = true){ } else if(m.task === 0.7){ // Download done, extracting. - setLaunchDetails('Extracting libraries..') + const eLStr = 'Extracting libraries' + let dotStr = '' + setLaunchDetails(eLStr) + progressListener = setInterval(() => { + if(dotStr.length >= 3){ + dotStr = '' + } else { + dotStr += '.' + } + setLaunchDetails(eLStr + dotStr) + }, 750) } else if(m.task === 1){ // Download will be at 100%, remove the loading from the OS progress bar. remote.getCurrentWindow().setProgressBar(-1) + if(progressListener != null){ + clearInterval(progressListener) + progressListener = null + } setLaunchDetails('Preparing to launch..') aEx.send({task: 0, content: 'loadForgeData', argsArr: [serv.id]}) diff --git a/libraries/java/PackXZExtract.jar b/libraries/java/PackXZExtract.jar index 5994c15..e0c4a7d 100644 Binary files a/libraries/java/PackXZExtract.jar and b/libraries/java/PackXZExtract.jar differ