Fix installer process windows

This commit is contained in:
luiscuenca 2019-07-27 08:53:32 -07:00
parent 7486e906eb
commit d54bb02f47
No known key found for this signature in database
GPG key ID: 2387ECD129A6961D
2 changed files with 16 additions and 8 deletions

View file

@ -702,13 +702,14 @@ void CLauncherDlg::OnTimer(UINT_PTR nIDEvent) {
_splashStep = SPLASH_DURATION;
setDrawDialog(DrawStep::DrawProcessUpdate);
theApp._manager.updateProgress(LauncherManager::ProcessType::Uninstall, 0.0f);
} else if (theApp._manager.shouldSkipSplashScreen()) {
theApp._manager.updateProgress(LauncherManager::ProcessType::Uninstall, 1.0f);
setDrawDialog(DrawStep::DrawProcessFinishUpdate);
_splashStep = SPLASH_DURATION;
_showSplash = false;
} else {
if (theApp._manager.shouldSkipSplashScreen()) {
_splashStep = SPLASH_DURATION;
} else {
theApp._manager.addToLog(_T("Start splash screen"));
setDrawDialog(DrawStep::DrawLogo);
}
theApp._manager.addToLog(_T("Start splash screen"));
setDrawDialog(DrawStep::DrawLogo);
}
} else if (_splashStep > SPLASH_DURATION && !theApp._manager.needsToWait()) {
_showSplash = false;

View file

@ -611,11 +611,18 @@ void LauncherManager::onFileDownloaded(ProcessType type) {
}
void LauncherManager::restartNewLauncher() {
CString tempPath;
LauncherManager::getAndCreatePaths(LauncherManager::PathType::Temp_Directory, tempPath);
tempPath += "hql.exe";
CString installPath;
LauncherManager::getAndCreatePaths(LauncherManager::PathType::Launcher_Directory, installPath);
installPath += LAUNCHER_EXE_FILENAME;
CopyFile(installPath, tempPath, false);
closeLog();
if (_willContinueUpdating) {
LauncherUtils::launchApplication(_tempLauncherPath, _T(" --restart --noUpdate --continueUpdating"));
LauncherUtils::launchApplication(tempPath, _T(" --restart --noUpdate --continueUpdating"));
} else {
LauncherUtils::launchApplication(_tempLauncherPath, _T(" --restart --noUpdate --skipSplash"));
LauncherUtils::launchApplication(tempPath, _T(" --restart --noUpdate --skipSplash"));
}
Sleep(500);
}