From 6cb589d18e9f27843ec06348abcf4cd497b69033 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Thu, 13 Nov 2014 13:28:46 +0000 Subject: [PATCH] Made Bonjour install Windows only #4196 --- src/gui/src/MainWindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 26915d98..ac67e654 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -50,6 +50,8 @@ #if defined(Q_OS_WIN) static const char synergyConfigName[] = "synergy.sgc"; static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.sgc);;All files (*.*)")); +static const char bonjourUrl[] = "http://synergy-project.org/bonjour/BonjourPSSetup.exe"; +static const char bonjourInstaller[] = "BonjourSetup.exe"; #else static const char synergyConfigName[] = "synergy.conf"; static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.conf);;All files (*.*)")); @@ -62,9 +64,6 @@ static const char* synergyIconFiles[] = ":/res/icons/16x16/synergy-connected.png" }; -static const char bonjourUrl[] = "http://synergy-project.org/bonjour/BonjourPSSetup.exe"; -static const char bonjourInstaller[] = "BonjourSetup.exe"; - MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) : m_Settings(settings), m_AppConfig(appConfig), @@ -1008,6 +1007,7 @@ void MainWindow::downloadBonjour() void MainWindow::installBonjour() { +#if defined(Q_OS_WIN) QString tempLocation = QDesktopServices::storageLocation( QDesktopServices::TempLocation); QString filename = tempLocation; @@ -1031,6 +1031,7 @@ void MainWindow::installBonjour() QDesktopServices::openUrl(QUrl("file:///" + filename)); m_DownloadMessageBox->hide(); +#endif } void MainWindow::promptAutoConnect()