#6301 Disable zeroconf for Enterprise builds
This commit is contained in:
parent
b396b1092d
commit
458d8e4778
|
@ -9,10 +9,12 @@ set (CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
file (GLOB LEGACY_GUI_SOURCE_FILES src/*.cpp src/*.h)
|
file (GLOB LEGACY_GUI_SOURCE_FILES src/*.cpp src/*.h)
|
||||||
file (GLOB LEGACY_GUI_UI_FILES src/*.ui)
|
file (GLOB LEGACY_GUI_UI_FILES src/*.ui)
|
||||||
file (GLOB LEGACY_ACTIVATION_FILES src/*Activation* src/*License*)
|
file (GLOB LEGACY_ACTIVATION_FILES src/*Activation* src/*License*)
|
||||||
|
file (GLOB LEGACY_ZEROCONF_FILES src/Zeroconf*)
|
||||||
|
|
||||||
if (SYNERGY_ENTERPRISE)
|
if (SYNERGY_ENTERPRISE)
|
||||||
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ACTIVATION_FILES})
|
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ACTIVATION_FILES})
|
||||||
list (REMOVE_ITEM LEGACY_GUI_UI_FILES ${LEGACY_ACTIVATION_FILES})
|
list (REMOVE_ITEM LEGACY_GUI_UI_FILES ${LEGACY_ACTIVATION_FILES})
|
||||||
|
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -29,6 +31,7 @@ add_executable (synergy WIN32
|
||||||
include_directories (./src)
|
include_directories (./src)
|
||||||
target_link_libraries (synergy shared)
|
target_link_libraries (synergy shared)
|
||||||
|
|
||||||
|
if (NOT SYNERGY_ENTERPRISE)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
|
include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
|
||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
@ -44,13 +47,16 @@ if (WIN32)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
target_link_libraries (synergy dns_sd)
|
target_link_libraries (synergy dns_sd)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
qt5_use_modules (synergy Core Widgets Network)
|
qt5_use_modules (synergy Core Widgets Network)
|
||||||
target_compile_definitions (synergy PRIVATE -DSYNERGY_VERSION_STAGE="${SYNERGY_VERSION_STAGE}")
|
target_compile_definitions (synergy PRIVATE -DSYNERGY_VERSION_STAGE="${SYNERGY_VERSION_STAGE}")
|
||||||
target_compile_definitions (synergy PRIVATE -DSYNERGY_REVISION="${SYNERGY_REVISION}")
|
target_compile_definitions (synergy PRIVATE -DSYNERGY_REVISION="${SYNERGY_REVISION}")
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
if (NOT SYNERGY_ENTERPRISE)
|
||||||
target_link_libraries (synergy ${DNSSD_LIB})
|
target_link_libraries (synergy ${DNSSD_LIB})
|
||||||
|
endif ()
|
||||||
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,9 @@ MainWindow::MainWindow (QSettings& settings, AppConfig& appConfig,
|
||||||
m_pMenuEdit(NULL),
|
m_pMenuEdit(NULL),
|
||||||
m_pMenuWindow(NULL),
|
m_pMenuWindow(NULL),
|
||||||
m_pMenuHelp(NULL),
|
m_pMenuHelp(NULL),
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
m_pZeroconfService(NULL),
|
m_pZeroconfService(NULL),
|
||||||
|
#endif
|
||||||
m_pDataDownloader(NULL),
|
m_pDataDownloader(NULL),
|
||||||
m_DownloadMessageBox(NULL),
|
m_DownloadMessageBox(NULL),
|
||||||
m_pCancelButton(NULL),
|
m_pCancelButton(NULL),
|
||||||
|
@ -183,6 +185,7 @@ MainWindow::MainWindow (QSettings& settings, AppConfig& appConfig,
|
||||||
|
|
||||||
#ifdef SYNERGY_ENTERPRISE
|
#ifdef SYNERGY_ENTERPRISE
|
||||||
m_pActivate->setVisible(false);
|
m_pActivate->setVisible(false);
|
||||||
|
m_pCheckBoxAutoConfig->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +198,9 @@ MainWindow::~MainWindow()
|
||||||
|
|
||||||
saveSettings();
|
saveSettings();
|
||||||
|
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
delete m_pZeroconfService;
|
delete m_pZeroconfService;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_DownloadMessageBox != NULL) {
|
if (m_DownloadMessageBox != NULL) {
|
||||||
delete m_DownloadMessageBox;
|
delete m_DownloadMessageBox;
|
||||||
|
@ -218,9 +223,11 @@ void MainWindow::open()
|
||||||
|
|
||||||
m_VersionChecker.checkLatest();
|
m_VersionChecker.checkLatest();
|
||||||
|
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
if (!appConfig().autoConfigPrompted()) {
|
if (!appConfig().autoConfigPrompted()) {
|
||||||
promptAutoConfig();
|
promptAutoConfig();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// only start if user has previously started. this stops the gui from
|
// only start if user has previously started. this stops the gui from
|
||||||
// auto hiding before the user has configured synergy (which of course
|
// auto hiding before the user has configured synergy (which of course
|
||||||
|
@ -729,6 +736,7 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
args << "--log" << appConfig().logFilenameCmd();
|
args << "--log" << appConfig().logFilenameCmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
// check auto config first, if it is disabled or no server detected,
|
// check auto config first, if it is disabled or no server detected,
|
||||||
// use line edit host name if it is not empty
|
// use line edit host name if it is not empty
|
||||||
if (m_pCheckBoxAutoConfig->isChecked()) {
|
if (m_pCheckBoxAutoConfig->isChecked()) {
|
||||||
|
@ -738,6 +746,7 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_pLineEditHostname->text().isEmpty()) {
|
if (m_pLineEditHostname->text().isEmpty()) {
|
||||||
show();
|
show();
|
||||||
|
@ -1051,6 +1060,7 @@ void MainWindow::changeEvent(QEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
void MainWindow::updateZeroconfService()
|
void MainWindow::updateZeroconfService()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&m_UpdateZeroconfMutex);
|
QMutexLocker locker(&m_UpdateZeroconfMutex);
|
||||||
|
@ -1068,6 +1078,7 @@ void MainWindow::updateZeroconfService()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void MainWindow::serverDetected(const QString name)
|
void MainWindow::serverDetected(const QString name)
|
||||||
{
|
{
|
||||||
|
@ -1171,17 +1182,21 @@ MainWindow::licenseManager() const
|
||||||
void MainWindow::on_m_pGroupClient_toggled(bool on)
|
void MainWindow::on_m_pGroupClient_toggled(bool on)
|
||||||
{
|
{
|
||||||
m_pGroupServer->setChecked(!on);
|
m_pGroupServer->setChecked(!on);
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
if (on) {
|
if (on) {
|
||||||
updateZeroconfService();
|
updateZeroconfService();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_m_pGroupServer_toggled(bool on)
|
void MainWindow::on_m_pGroupServer_toggled(bool on)
|
||||||
{
|
{
|
||||||
m_pGroupClient->setChecked(!on);
|
m_pGroupClient->setChecked(!on);
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
if (on) {
|
if (on) {
|
||||||
updateZeroconfService();
|
updateZeroconfService();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::on_m_pButtonBrowseConfigFile_clicked()
|
bool MainWindow::on_m_pButtonBrowseConfigFile_clicked()
|
||||||
|
@ -1321,6 +1336,7 @@ bool MainWindow::isServiceRunning()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
bool MainWindow::isBonjourRunning()
|
bool MainWindow::isBonjourRunning()
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
@ -1493,7 +1509,6 @@ void MainWindow::bonjourInstallFinished()
|
||||||
m_pCheckBoxAutoConfig->setChecked(true);
|
m_pCheckBoxAutoConfig->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
|
||||||
int MainWindow::raiseActivationDialog()
|
int MainWindow::raiseActivationDialog()
|
||||||
{
|
{
|
||||||
if (m_ActivationDialogRunning) {
|
if (m_ActivationDialogRunning) {
|
||||||
|
|
|
@ -119,10 +119,10 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||||
void showConfigureServer(const QString& message);
|
void showConfigureServer(const QString& message);
|
||||||
void showConfigureServer() { showConfigureServer(""); }
|
void showConfigureServer() { showConfigureServer(""); }
|
||||||
void autoAddScreen(const QString name);
|
void autoAddScreen(const QString name);
|
||||||
void updateZeroconfService();
|
|
||||||
void serverDetected(const QString name);
|
void serverDetected(const QString name);
|
||||||
void updateLocalFingerprint();
|
void updateLocalFingerprint();
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
|
void updateZeroconfService();
|
||||||
LicenseManager& licenseManager() const;
|
LicenseManager& licenseManager() const;
|
||||||
int raiseActivationDialog();
|
int raiseActivationDialog();
|
||||||
#endif
|
#endif
|
||||||
|
@ -155,7 +155,9 @@ public slots:
|
||||||
void logOutput();
|
void logOutput();
|
||||||
void logError();
|
void logError();
|
||||||
void updateFound(const QString& version);
|
void updateFound(const QString& version);
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
void bonjourInstallFinished();
|
void bonjourInstallFinished();
|
||||||
|
#endif
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -187,9 +189,12 @@ public slots:
|
||||||
#else
|
#else
|
||||||
bool isServiceRunning();
|
bool isServiceRunning();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
bool isBonjourRunning();
|
bool isBonjourRunning();
|
||||||
void downloadBonjour();
|
void downloadBonjour();
|
||||||
void promptAutoConfig();
|
void promptAutoConfig();
|
||||||
|
#endif
|
||||||
QString getProfileRootForArg();
|
QString getProfileRootForArg();
|
||||||
void checkConnected(const QString& line);
|
void checkConnected(const QString& line);
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
|
@ -221,7 +226,9 @@ public slots:
|
||||||
QMenu* m_pMenuEdit;
|
QMenu* m_pMenuEdit;
|
||||||
QMenu* m_pMenuWindow;
|
QMenu* m_pMenuWindow;
|
||||||
QMenu* m_pMenuHelp;
|
QMenu* m_pMenuHelp;
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
ZeroconfService* m_pZeroconfService;
|
ZeroconfService* m_pZeroconfService;
|
||||||
|
#endif
|
||||||
DataDownloader* m_pDataDownloader;
|
DataDownloader* m_pDataDownloader;
|
||||||
QMessageBox* m_DownloadMessageBox;
|
QMessageBox* m_DownloadMessageBox;
|
||||||
QAbstractButton* m_pCancelButton;
|
QAbstractButton* m_pCancelButton;
|
||||||
|
@ -238,10 +245,12 @@ public slots:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void on_m_pButtonApply_clicked();
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
void on_m_pCheckBoxAutoConfig_toggled(bool checked);
|
void on_m_pCheckBoxAutoConfig_toggled(bool checked);
|
||||||
void on_m_pComboServerList_currentIndexChanged(QString );
|
void on_m_pComboServerList_currentIndexChanged(QString );
|
||||||
void on_m_pButtonApply_clicked();
|
|
||||||
void installBonjour();
|
void installBonjour();
|
||||||
|
#endif
|
||||||
void on_windowShown();
|
void on_windowShown();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -127,7 +127,9 @@ void SetupWizard::accept()
|
||||||
|
|
||||||
if (m_StartMain)
|
if (m_StartMain)
|
||||||
{
|
{
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
m_MainWindow.updateZeroconfService();
|
m_MainWindow.updateZeroconfService();
|
||||||
|
#endif
|
||||||
m_MainWindow.open();
|
m_MainWindow.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue