mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
bugfix.
This commit is contained in:
parent
16ad59685e
commit
a1837aa20e
@ -376,8 +376,8 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
|
|||||||
|
|
||||||
let received = 0
|
let received = 0
|
||||||
await downloadFile(asset.url, asset.path, ({ transferred }) => {
|
await downloadFile(asset.url, asset.path, ({ transferred }) => {
|
||||||
received += transferred
|
received = transferred
|
||||||
setDownloadPercentage(transferred/asset.size)
|
setDownloadPercentage(Math.trunc((transferred/asset.size)*100))
|
||||||
})
|
})
|
||||||
setDownloadPercentage(100)
|
setDownloadPercentage(100)
|
||||||
|
|
||||||
@ -395,10 +395,8 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
|
|||||||
// Show installing progress bar.
|
// Show installing progress bar.
|
||||||
remote.getCurrentWindow().setProgressBar(2)
|
remote.getCurrentWindow().setProgressBar(2)
|
||||||
|
|
||||||
const newJavaExec = await extractJdk(asset.path)
|
|
||||||
|
|
||||||
// Wait for extration to complete.
|
// Wait for extration to complete.
|
||||||
const eLStr = 'Extracting'
|
const eLStr = 'Extracting Java'
|
||||||
let dotStr = ''
|
let dotStr = ''
|
||||||
setLaunchDetails(eLStr)
|
setLaunchDetails(eLStr)
|
||||||
const extractListener = setInterval(() => {
|
const extractListener = setInterval(() => {
|
||||||
@ -410,6 +408,8 @@ async function downloadJava(effectiveJavaOptions, launchAfter = true) {
|
|||||||
setLaunchDetails(eLStr + dotStr)
|
setLaunchDetails(eLStr + dotStr)
|
||||||
}, 750)
|
}, 750)
|
||||||
|
|
||||||
|
const newJavaExec = await extractJdk(asset.path)
|
||||||
|
|
||||||
// Extraction complete, remove the loading from the OS progress bar.
|
// Extraction complete, remove the loading from the OS progress bar.
|
||||||
remote.getCurrentWindow().setProgressBar(-1)
|
remote.getCurrentWindow().setProgressBar(-1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user