-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b138
-
x86
-
windows
-
Verified
In JREInstall.cpp, function installJavaFX, it's using dlg.DownloadFile(pszURL1, szInsFile, TRUE, TRUE) to download the file. The download will work - but it will be always silent. No download progress dialog will be shown.
Download progress dialog should be shown for better user experience
To trigger download with UI, we need to call dlg.setInstallerURL and dlg.setInstallerFile, and then dlg.doModal, and let the callback does the download and integrity check.
Something similar to the install function in JREInstall.cpp:
if (silent) {
hr = dlg.DownloadSilent(szBestVersionURL, szInstallerFile);
if (FAILED(hr)) {
break;
}
bDownloaded = TRUE;
} else {
dlg.setInstallerURL(szBestVersionURL);
dlg.setInstallerFile(szInstallerFile);
TCHAR szJREPrefix[BUFFER_SIZE];
TCHAR szNameText[BUFFER_SIZE];
::LoadString(_Module.GetModuleInstance(), IDS_JRE, szJREPrefix,
BUFFER_SIZE);
wsprintf (szNameText, "%s %s", szJREPrefix, szBestVersion);
dlg.setNameText(szNameText);
if (dlg.DoModal() == IDOK) {
bDownloaded = TRUE;
}
}
Download progress dialog should be shown for better user experience
To trigger download with UI, we need to call dlg.setInstallerURL and dlg.setInstallerFile, and then dlg.doModal, and let the callback does the download and integrity check.
Something similar to the install function in JREInstall.cpp:
if (silent) {
hr = dlg.DownloadSilent(szBestVersionURL, szInstallerFile);
if (FAILED(hr)) {
break;
}
bDownloaded = TRUE;
} else {
dlg.setInstallerURL(szBestVersionURL);
dlg.setInstallerFile(szInstallerFile);
TCHAR szJREPrefix[BUFFER_SIZE];
TCHAR szNameText[BUFFER_SIZE];
::LoadString(_Module.GetModuleInstance(), IDS_JRE, szJREPrefix,
BUFFER_SIZE);
wsprintf (szNameText, "%s %s", szJREPrefix, szBestVersion);
dlg.setNameText(szNameText);
if (dlg.DoModal() == IDOK) {
bDownloaded = TRUE;
}
}