Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7029593

missing download dialog when download JavaFX installer with DT plugin

XMLWordPrintable

    • 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;
                 }
             }

            herrick Andy Herrick (Inactive)
            ngthomas Thomas Ng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: