This commit is contained in:
Daniel Scalzi 2023-03-18 03:05:37 -04:00
parent 16ad59685e
commit a1837aa20e
No known key found for this signature in database
GPG Key ID: 9E3E2AFE45328AA5

View File

@ -376,8 +376,8 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
let received = 0
await downloadFile(asset.url, asset.path, ({ transferred }) => {
received += transferred
setDownloadPercentage(transferred/asset.size)
received = transferred
setDownloadPercentage(Math.trunc((transferred/asset.size)*100))
})
setDownloadPercentage(100)
@ -395,10 +395,8 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
// Show installing progress bar.
remote.getCurrentWindow().setProgressBar(2)
const newJavaExec = await extractJdk(asset.path)
// Wait for extration to complete.
const eLStr = 'Extracting'
const eLStr = 'Extracting Java'
let dotStr = ''
setLaunchDetails(eLStr)
const extractListener = setInterval(() => {
@ -410,6 +408,8 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
setLaunchDetails(eLStr + dotStr)
}, 750)
const newJavaExec = await extractJdk(asset.path)
// Extraction complete, remove the loading from the OS progress bar.
remote.getCurrentWindow().setProgressBar(-1)