SYNERGY-826 Add a new option SYNERGY_AUTOCONFIG (#6949)
* SYNERGY-826 Add a new option SYNERGY_AUTOCONFIG * Update ChangeLog * Update Version.cmake * SYNERGY-826 Return stage back
This commit is contained in:
parent
03f5344b93
commit
05ce7f37bc
7 changed files with 36 additions and 18 deletions
|
|
@ -35,6 +35,12 @@ else()
|
||||||
option (SYNERGY_ENTERPRISE "Build Enterprise" OFF)
|
option (SYNERGY_ENTERPRISE "Build Enterprise" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (DEFINED ENV{SYNERGY_AUTOCONFIG})
|
||||||
|
option (SYNERGY_AUTOCONFIG "Build with Autoconfig" ON)
|
||||||
|
else()
|
||||||
|
option (SYNERGY_AUTOCONFIG "Build without Autoconfig" OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
set (CMAKE_CXX_STANDARD 14)
|
set (CMAKE_CXX_STANDARD 14)
|
||||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
@ -254,7 +260,7 @@ if (UNIX)
|
||||||
list (APPEND libs Xi)
|
list (APPEND libs Xi)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT SYNERGY_ENTERPRISE AND SYNERGY_BUILD_LEGACY_GUI)
|
if (NOT SYNERGY_ENTERPRISE AND SYNERGY_BUILD_LEGACY_GUI AND SYNERGY_AUTOCONFIG)
|
||||||
set (DnsSdlib "dns_sd.h")
|
set (DnsSdlib "dns_sd.h")
|
||||||
set (CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};${DnsSdlib}")
|
set (CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};${DnsSdlib}")
|
||||||
check_include_files ("${DnsSdlib}" HAVE_DNS_SD)
|
check_include_files ("${DnsSdlib}" HAVE_DNS_SD)
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ Enhancements:
|
||||||
- #6937 Modern C++ compiler for centOS7
|
- #6937 Modern C++ compiler for centOS7
|
||||||
- #6938 Remove auto config message from the main window
|
- #6938 Remove auto config message from the main window
|
||||||
- #6941 Add Raspberry Pi Builds
|
- #6941 Add Raspberry Pi Builds
|
||||||
|
- #6949 Add a new option SYNERGY_AUTOCONFIG to exclude autoconfig from the standard version
|
||||||
|
|
||||||
v1.13.0-stable
|
v1.13.0-stable
|
||||||
===========
|
===========
|
||||||
|
|
|
||||||
|
|
@ -77,3 +77,7 @@ endif()
|
||||||
if (SYNERGY_ENTERPRISE)
|
if (SYNERGY_ENTERPRISE)
|
||||||
add_definitions (-DSYNERGY_ENTERPRISE=1)
|
add_definitions (-DSYNERGY_ENTERPRISE=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (SYNERGY_AUTOCONFIG)
|
||||||
|
add_definitions (-DSYNERGY_AUTOCONFIG=1)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ if (SYNERGY_ENTERPRISE)
|
||||||
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
|
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT SYNERGY_AUTOCONFIG)
|
||||||
|
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
|
set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -54,7 +58,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 (NOT SYNERGY_ENTERPRISE AND SYNERGY_AUTOCONFIG)
|
||||||
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)
|
||||||
|
|
@ -80,7 +84,7 @@ target_compile_definitions (synergy PRIVATE -DSYNERGY_VERSION_STAGE="${SYNERGY_V
|
||||||
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)
|
if (NOT SYNERGY_ENTERPRISE AND SYNERGY_AUTOCONFIG)
|
||||||
target_link_libraries (synergy ${DNSSD_LIB})
|
target_link_libraries (synergy ${DNSSD_LIB})
|
||||||
endif ()
|
endif ()
|
||||||
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ const QString &AppConfig::language() const { return m_Language; }
|
||||||
bool AppConfig::startedBefore() const { return m_StartedBefore; }
|
bool AppConfig::startedBefore() const { return m_StartedBefore; }
|
||||||
|
|
||||||
bool AppConfig::autoConfig() const {
|
bool AppConfig::autoConfig() const {
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
return m_AutoConfig;
|
return m_AutoConfig;
|
||||||
#else
|
#else
|
||||||
// always disable auto config for enterprise edition.
|
// always disable auto config for enterprise edition.
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
|
||||||
m_ExpectedRunningState(kStopped),
|
m_ExpectedRunningState(kStopped),
|
||||||
m_SecureSocket(false)
|
m_SecureSocket(false)
|
||||||
{
|
{
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
m_pZeroconf = new Zeroconf(this);
|
m_pZeroconf = new Zeroconf(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -202,7 +202,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
|
||||||
m_pActivate->setVisible(false);
|
m_pActivate->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
updateZeroconfService();
|
updateZeroconfService();
|
||||||
|
|
||||||
addZeroconfServer(m_AppConfig->autoConfigServer());
|
addZeroconfServer(m_AppConfig->autoConfigServer());
|
||||||
|
|
@ -218,7 +218,7 @@ MainWindow::~MainWindow()
|
||||||
stopDesktop();
|
stopDesktop();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
delete m_pZeroconf;
|
delete m_pZeroconf;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -346,7 +346,7 @@ void MainWindow::saveSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::zeroConfToggled() {
|
void MainWindow::zeroConfToggled() {
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
updateZeroconfService();
|
updateZeroconfService();
|
||||||
|
|
||||||
addZeroconfServer(m_AppConfig->autoConfigServer());
|
addZeroconfServer(m_AppConfig->autoConfigServer());
|
||||||
|
|
@ -754,7 +754,7 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
args << "--log" << appConfig().logFilenameCmd();
|
args << "--log" << appConfig().logFilenameCmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
// 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 (appConfig().autoConfig()) {
|
if (appConfig().autoConfig()) {
|
||||||
|
|
@ -775,7 +775,7 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
|
|
||||||
if (m_pLineEditHostname->text().isEmpty())
|
if (m_pLineEditHostname->text().isEmpty())
|
||||||
{
|
{
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
//check if autoconfig mode is enabled
|
//check if autoconfig mode is enabled
|
||||||
if (!appConfig().autoConfig())
|
if (!appConfig().autoConfig())
|
||||||
{
|
{
|
||||||
|
|
@ -786,7 +786,7 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
tr("Please fill in a hostname for the synergy client to connect to."));
|
tr("Please fill in a hostname for the synergy client to connect to."));
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1223,7 +1223,7 @@ void MainWindow::on_m_pActionHelp_triggered()
|
||||||
|
|
||||||
void MainWindow::updateZeroconfService()
|
void MainWindow::updateZeroconfService()
|
||||||
{
|
{
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
|
|
||||||
// reset the server list in case one has gone away.
|
// reset the server list in case one has gone away.
|
||||||
// it'll be re-added after the zeroconf service restarts.
|
// it'll be re-added after the zeroconf service restarts.
|
||||||
|
|
|
||||||
|
|
@ -177,17 +177,20 @@ void SettingsDialog::loadFromConfig() {
|
||||||
m_pCheckBoxEnableCrypto->setEnabled(true);
|
m_pCheckBoxEnableCrypto->setEnabled(true);
|
||||||
m_pLabelProUpgrade->hide();
|
m_pLabelProUpgrade->hide();
|
||||||
|
|
||||||
m_pCheckBoxAutoConfig->hide();
|
|
||||||
m_pLabelInstallBonjour->hide();
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
m_pCheckBoxEnableCrypto->setEnabled(m_appConfig.isCryptoAvailable());
|
m_pCheckBoxEnableCrypto->setEnabled(m_appConfig.isCryptoAvailable());
|
||||||
m_pLabelProUpgrade->setVisible(!m_appConfig.isCryptoAvailable());
|
m_pLabelProUpgrade->setVisible(!m_appConfig.isCryptoAvailable());
|
||||||
|
|
||||||
m_pCheckBoxAutoConfig->setChecked(appConfig().autoConfig());
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
|
||||||
|
m_pCheckBoxAutoConfig->setChecked(appConfig().autoConfig());
|
||||||
|
#else
|
||||||
|
m_pCheckBoxAutoConfig->hide();
|
||||||
|
m_pLabelInstallBonjour->hide();
|
||||||
|
#endif
|
||||||
|
|
||||||
adjustSize();
|
adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue