diff --git a/launchers/qt/CMakeLists.txt b/launchers/qt/CMakeLists.txt index 5c2da72fb4..7056e953ba 100644 --- a/launchers/qt/CMakeLists.txt +++ b/launchers/qt/CMakeLists.txt @@ -191,7 +191,6 @@ elseif (APPLE) add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${src_files} ${RES_SOURCES}) set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${APP_NAME} MACOSX_BUNDLE_BUNDLE_NAME ${APP_NAME}) - set_target_properties(${PROJECT_NAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD diff --git a/launchers/qt/resources/qml/HFBase/LoginBase.qml b/launchers/qt/resources/qml/HFBase/LoginBase.qml index cedad8cc32..41d011635e 100644 --- a/launchers/qt/resources/qml/HFBase/LoginBase.qml +++ b/launchers/qt/resources/qml/HFBase/LoginBase.qml @@ -127,6 +127,7 @@ Item { left: parent.left right: parent.right; } + onAccepted: LauncherState.login(username.text, password.text, displayName.text) } HFButton { diff --git a/launchers/qt/src/Helper_windows.cpp b/launchers/qt/src/Helper_windows.cpp index fdaf5c3a4a..ebbf1fab72 100644 --- a/launchers/qt/src/Helper_windows.cpp +++ b/launchers/qt/src/Helper_windows.cpp @@ -8,6 +8,7 @@ #include "objbase.h" #include "objidl.h" #include "shlguid.h" +#include #include #include diff --git a/launchers/qt/src/LauncherInstaller_windows.cpp b/launchers/qt/src/LauncherInstaller_windows.cpp index ffd6218fab..d9ecde395b 100644 --- a/launchers/qt/src/LauncherInstaller_windows.cpp +++ b/launchers/qt/src/LauncherInstaller_windows.cpp @@ -47,42 +47,47 @@ void LauncherInstaller::install() { qDebug() << "not successful"; } - qDebug() << "LauncherInstaller: create uninstall link"; - QString uninstallLinkPath = _launcherInstallDir.absolutePath() + "/Uninstall HQ.lnk"; - if (QFile::exists(uninstallLinkPath)) { - QFile::remove(uninstallLinkPath); - } - - - - QString desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); - QString applicationPath = _launcherApplicationsDir.absolutePath(); - - QString appStartLinkPath = applicationPath + "/HQ.lnk"; - QString uninstallAppStartLinkPath = applicationPath + "/Uninstall HQ.lnk"; - QString desktopAppLinkPath = desktopPath + "/HQ.lnk"; - - - createSymbolicLink((LPCSTR)oldLauncherPath.toStdString().c_str(), (LPCSTR)uninstallLinkPath.toStdString().c_str(), - (LPCSTR)("Click to Uninstall HQ"), (LPCSTR)("--uninstall")); - - createSymbolicLink((LPCSTR)oldLauncherPath.toStdString().c_str(), (LPCSTR)uninstallAppStartLinkPath.toStdString().c_str(), - (LPCSTR)("Click to Uninstall HQ"), (LPCSTR)("--uninstall")); - - createSymbolicLink((LPCSTR)oldLauncherPath.toStdString().c_str(), (LPCSTR)desktopAppLinkPath.toStdString().c_str(), - (LPCSTR)("Click to Setup and Launch HQ")); - - createSymbolicLink((LPCSTR)oldLauncherPath.toStdString().c_str(), (LPCSTR)appStartLinkPath.toStdString().c_str(), - (LPCSTR)("Click to Setup and Launch HQ")); + deleteShortcuts(); + createShortcuts(); createApplicationRegistryKeys(); } else { - qDebug() << "FAILED!!!!!!!"; + qDebug() << "Failed to install HQ Launcher"; } } +void LauncherInstaller::createShortcuts() { + QString launcherPath = _launcherInstallDir.absolutePath() + "/HQ Launcher.exe"; + + QString uninstallLinkPath = _launcherInstallDir.absolutePath() + "/Uninstall HQ.lnk"; + QString desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + QString applicationPath = _launcherApplicationsDir.absolutePath(); + + QString appStartLinkPath = applicationPath + "/HQ Launcher.lnk"; + QString uninstallAppStartLinkPath = applicationPath + "/Uninstall HQ.lnk"; + QString desktopAppLinkPath = desktopPath + "/HQ Launcher.lnk"; + + + createSymbolicLink((LPCSTR)launcherPath.toStdString().c_str(), (LPCSTR)uninstallLinkPath.toStdString().c_str(), + (LPCSTR)("Click to Uninstall HQ"), (LPCSTR)("--uninstall")); + + createSymbolicLink((LPCSTR)launcherPath.toStdString().c_str(), (LPCSTR)uninstallAppStartLinkPath.toStdString().c_str(), + (LPCSTR)("Click to Uninstall HQ"), (LPCSTR)("--uninstall")); + + createSymbolicLink((LPCSTR)launcherPath.toStdString().c_str(), (LPCSTR)desktopAppLinkPath.toStdString().c_str(), + (LPCSTR)("Click to Setup and Launch HQ")); + + createSymbolicLink((LPCSTR)launcherPath.toStdString().c_str(), (LPCSTR)appStartLinkPath.toStdString().c_str(), + (LPCSTR)("Click to Setup and Launch HQ")); +} + void LauncherInstaller::uninstall() { qDebug() << "Uninstall Launcher"; + deleteShortcuts(); + deleteApplicationRegistryKeys(); +} + +void LauncherInstaller::deleteShortcuts() { QString desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); QString applicationPath = _launcherApplicationsDir.absolutePath(); @@ -91,7 +96,7 @@ void LauncherInstaller::uninstall() { QFile::remove(uninstallLinkPath); } - QString appStartLinkPath = applicationPath + "/HQ.lnk"; + QString appStartLinkPath = applicationPath + "/HQ Launcher.lnk"; if (QFile::exists(appStartLinkPath)) { QFile::remove(appStartLinkPath); } @@ -101,12 +106,10 @@ void LauncherInstaller::uninstall() { QFile::remove(uninstallAppStartLinkPath); } - QString desktopAppLinkPath = desktopPath + "/HQ.lnk"; + QString desktopAppLinkPath = desktopPath + "/HQ Launcher.lnk"; if (QFile::exists(desktopAppLinkPath)) { QFile::remove(desktopAppLinkPath); } - - deleteApplicationRegistryKeys(); }