diff --git a/launchers/qt/src/Helper.cpp b/launchers/qt/src/Helper.cpp index 2c7f89f0df..fe09f8de00 100644 --- a/launchers/qt/src/Helper.cpp +++ b/launchers/qt/src/Helper.cpp @@ -1,12 +1,13 @@ #include "Helper.h" -#ifdef Q_OS_WIN -#include -#endif +#include #if defined(Q_OS_WIN) -void launchClient(const QString& homePath, const QString& defaultScriptOverride, const QString& displayName, - const QString& contentCachePath, const QString& loginResponseToken) { + +#include + +void launchClient(const QString& clientPath, const QString& homePath, const QString& defaultScriptsPath, + const QString& displayName, const QString& contentCachePath, QString loginResponseToken) { // TODO Fix parameters QString params = "--url " + homePath @@ -15,8 +16,8 @@ void launchClient(const QString& homePath, const QString& defaultScriptOverride, + " --displayName " + displayName + " --cache " + contentCachePath; - if (!_loginTokenResponse.isEmpty()) { - params += " --tokens \"" + _loginTokenResponse.replace("\"", "\\\"") + "\""; + if (!loginResponseToken.isEmpty()) { + params += " --tokens \"" + loginResponseToken.replace("\"", "\\\"") + "\""; } STARTUPINFO si; @@ -31,19 +32,21 @@ void launchClient(const QString& homePath, const QString& defaultScriptOverride, BOOL success = CreateProcess( clientPath.toUtf8().data(), params.toUtf8().data(), - nullptr, // Process handle not inheritable - nullptr, // Thread handle not inheritable - FALSE, // Set handle inheritance to FALSE - CREATE_NEW_CONSOLE, // Opens file in a separate console - nullptr, // Use parent's environment block - nullptr, // Use parent's starting directory - &si, // Pointer to STARTUPINFO structure - &pi // Pointer to PROCESS_INFORMATION structure + nullptr, // Process handle not inheritable + nullptr, // Thread handle not inheritable + FALSE, // Set handle inheritance to FALSE + CREATE_NEW_CONSOLE, // Opens file in a separate console + nullptr, // Use parent's environment block + nullptr, // Use parent's starting directory + &si, // Pointer to STARTUPINFO structure + &pi // Pointer to PROCESS_INFORMATION structure ); + // Close process and thread handles. CloseHandle(pi.hProcess); CloseHandle(pi.hThread); - exit(0); + + QCoreApplication::instance()->quit(); } #endif diff --git a/launchers/qt/src/Helper.h b/launchers/qt/src/Helper.h index ee145e56f3..c64011c4a4 100644 --- a/launchers/qt/src/Helper.h +++ b/launchers/qt/src/Helper.h @@ -1,4 +1,4 @@ #include void launchClient(const QString& clientPath, const QString& homePath, const QString& defaultScriptOverride, - const QString& displayName, const QString& contentCachePath, const QString& loginResponseToken = QString()); + const QString& displayName, const QString& contentCachePath, QString loginResponseToken = QString()); diff --git a/launchers/qt/src/Unzipper.cpp b/launchers/qt/src/Unzipper.cpp index a8bd1d8616..5683156303 100644 --- a/launchers/qt/src/Unzipper.cpp +++ b/launchers/qt/src/Unzipper.cpp @@ -66,7 +66,11 @@ void Unzipper::run() { uint16_t mod_attr = (file_stat.m_external_attr >> 16) & FILE_PERMISSIONS_MASK; uint16_t filetype_attr = (file_stat.m_external_attr >> 16) & S_IFMT; +#ifdef Q_OS_MACOS bool is_symlink = filetype_attr == S_IFLNK; +#else + bool is_symlink = false; +#endif if (is_symlink) { #ifdef Q_OS_MACOS