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