diff --git a/launchers/win32/LauncherDlg.cpp b/launchers/win32/LauncherDlg.cpp index e8f948c42b..cb9583f26e 100644 --- a/launchers/win32/LauncherDlg.cpp +++ b/launchers/win32/LauncherDlg.cpp @@ -258,7 +258,9 @@ afx_msg void CLauncherDlg::OnNextClicked() { startProcess(); } else if (_drawStep == DrawStep::DrawError) { theApp._manager.restartLauncher(); - } else { + } else if (_drawStep == DrawStep::DrawLoginLogin || + _drawStep == DrawStep::DrawLoginErrorCred || + _drawStep == DrawStep::DrawLoginErrorOrg) { CString token; CString username, password, orgname; m_orgname.GetWindowTextW(orgname); @@ -686,6 +688,8 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) { theApp._manager.addToLog(_T("Starting login")); setDrawDialog(DrawStep::DrawLoginLogin); } + } else if (theApp._manager.needsUninstall()) { + theApp._manager.updateProgress(LauncherManager::ProcessType::Uninstall, (float)_splashStep/100); } _splashStep++; } else if (theApp._manager.shouldShutDown()) { diff --git a/launchers/win32/LauncherManager.cpp b/launchers/win32/LauncherManager.cpp index 66a691a4b4..066ec46318 100644 --- a/launchers/win32/LauncherManager.cpp +++ b/launchers/win32/LauncherManager.cpp @@ -152,21 +152,24 @@ BOOL LauncherManager::restartLauncher() { void LauncherManager::updateProgress(ProcessType processType, float progress) { switch (processType) { - case LauncherManager::DownloadContent: + case ProcessType::Uninstall: + _progress = progress; + break; + case ProcessType::DownloadContent: _progress = DOWNLOAD_CONTENT_INSTALL_WEIGHT * progress; break; - case LauncherManager::UnzipContent: + case ProcessType::UnzipContent: _progress = DOWNLOAD_CONTENT_INSTALL_WEIGHT + EXTRACT_CONTENT_INSTALL_WEIGHT * progress; break; - case LauncherManager::DownloadApplication: + case ProcessType::DownloadApplication: _progress = !_shouldUpdate ? (DOWNLOAD_CONTENT_INSTALL_WEIGHT + EXTRACT_CONTENT_INSTALL_WEIGHT + DOWNLOAD_APPLICATION_INSTALL_WEIGHT * progress) : DOWNLOAD_APPLICATION_UPDATE_WEIGHT * progress; break; - case LauncherManager::UnzipApplication: + case ProcessType::UnzipApplication: _progress = !_shouldUpdate ? (DOWNLOAD_CONTENT_INSTALL_WEIGHT + EXTRACT_CONTENT_INSTALL_WEIGHT + diff --git a/launchers/win32/LauncherManager.h b/launchers/win32/LauncherManager.h index 7c1590a512..44730ec8d7 100644 --- a/launchers/win32/LauncherManager.h +++ b/launchers/win32/LauncherManager.h @@ -52,7 +52,8 @@ public: DownloadContent, DownloadApplication, UnzipContent, - UnzipApplication + UnzipApplication, + Uninstall }; LauncherManager(); ~LauncherManager(); @@ -104,9 +105,9 @@ public: void onZipExtracted(ProcessType type, int size); void onFileDownloaded(ProcessType type); float getProgress() { return _progress; } + void updateProgress(ProcessType processType, float progress); private: - void updateProgress(ProcessType processType, float progress); ProcessType _currentProcess { ProcessType::DownloadApplication }; CString _latestApplicationURL; CString _latestVersion;