fix mac update issues

This commit is contained in:
dante ruiz 2019-10-29 15:21:54 -07:00
parent da0ba71373
commit 5d69d554f9
3 changed files with 3 additions and 5 deletions

View file

@ -11,7 +11,6 @@
Launcher::Launcher(int& argc, char**argv) : QGuiApplication(argc, argv) { Launcher::Launcher(int& argc, char**argv) : QGuiApplication(argc, argv) {
_launcherState = std::make_shared<LauncherState>(); _launcherState = std::make_shared<LauncherState>();
QString platform; QString platform;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
platform = "Windows"; platform = "Windows";

View file

@ -195,6 +195,8 @@ void LauncherState::requestBuilds() {
_latestBuilds = request->getLatestBuilds(); _latestBuilds = request->getLatestBuilds();
CommandlineOptions* options = CommandlineOptions::getInstance(); CommandlineOptions* options = CommandlineOptions::getInstance();
qDebug() << "Latest version: " << _latestBuilds.launcherBuild.latestVersion
<< "Curretn version: " << getBuildVersion().toInt();
if (shouldDownloadLauncher() && !options->contains("--noUpdate")) { if (shouldDownloadLauncher() && !options->contains("--noUpdate")) {
downloadLauncher(); downloadLauncher();
return; return;
@ -211,7 +213,6 @@ QString LauncherState::getBuildVersion() {
if (processEnvironment.contains("HQ_LAUNCHER_BUILD_VERSION")) { if (processEnvironment.contains("HQ_LAUNCHER_BUILD_VERSION")) {
buildVersion = processEnvironment.value("HQ_LAUNCHER_BUILD_VERSION"); buildVersion = processEnvironment.value("HQ_LAUNCHER_BUILD_VERSION");
} }
return buildVersion; return buildVersion;
} }

View file

@ -50,9 +50,7 @@ int main(int argc, char *argv[]) {
if (hasSuffix(argv[1], "app") && hasSuffix(argv[2], "app")) { if (hasSuffix(argv[1], "app") && hasSuffix(argv[2], "app")) {
bool success = swapLaunchers(argv[1], argv[2]); bool success = swapLaunchers(argv[1], argv[2]);
qDebug() << "Successfully installed Launcher: " << success; qDebug() << "Successfully installed Launcher: " << success;
if (!success) { options->append("--noUpdate");
options->append("--noUpdate");
}
didUpdate = true; didUpdate = true;
} }
} }