Example #1
0
        void InstallMacOS(CancellationToken ct, IProgress <InstallerEvent> progress)
        {
            var tempFilePath = DirectoryPath.GetTempPath() / new FileName("jdk" + ".dmg");

            progress.DoInstallerStep("Starting download of Java Development Kit",
                                     () => DownloadHelper.DownloadFileWithProgress(_downloadUrlMac, tempFilePath, ct, progress, "oraclelicense=accept-securebackup-cookie"),
                                     e => _fs.Delete(tempFilePath));

            Process.Start("open", tempFilePath.NativePath);

            progress.Report(new InstallerMessage("Please start the JDK installer by double clicking the icon inside the '" + _jdk_name + "' window."));
            progress.Report(new InstallerMessage("Waiting for the JDK installer to finish..."));
            while (!_fs.Exists(_pathToJdkMac))
            {
                Thread.Sleep(50);
            }
        }