Merge changes from V1.14.0 (#7032)

* SYNERGY-1007 Release candidate

* SYNERGY-1014 Update openSSL to 1.1.1k on Windows artefacts

* SYNERGY-1015 Remove SYNERGY_AUTOCONFIG fom cmake files

* SYNERGY-1015 Update ChangeLog.txt

* SYNERGY-1005 Add fedora 33 to 1.14.0

* SYNERGY-1021 Incorrect client place for the first connection

* Update ChangeLog

* Update build_version.py to select correct build number

* SYNERGY-1023 Typo in <displays> on the server configuration page

* SYNERGY-1028 New licenses for Chinese market (#7031)

* SYNERGY-1028 New china licenses

* Update ChangeLog

* SYNERGY-1024 Release 1.14.0

* Update Version.cmake

Co-authored-by: Igor Sikachyna <sikachynairl@gmail.com>
This commit is contained in:
SerhiiGadzhilov 2021-06-09 11:23:09 +03:00 committed by GitHub
parent 413a23d1f2
commit 6ce20f689a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 136 additions and 85 deletions

View file

@ -35,7 +35,6 @@ class VersionPart:
def __str__(self):
return self.prefix + str(self.number) + self.suffix
class Version:
def __init__(self, version):
@ -55,6 +54,11 @@ class Version:
else:
print('ERROR: Wrong version number')
def isSamePatch(self, version):
return (self.major.number == version.major.number and
self.minor.number == version.minor.number and
self.patch.number == version.patch.number)
def __str__(self):
result = str(self.major) + '.'
result += str(self.minor) + '.'
@ -77,14 +81,22 @@ class VersionFile:
fp.write(content)
fp.close()
def findVersion(versions, cmakeVersion):
gitVersion = Version(versions[0])
for version in versions:
ver = Version(version)
if ver.isSamePatch(cmakeVersion):
gitVersion = ver
break
print('INFO: Version '+ str(gitVersion) + ' has been read from git')
return gitVersion
def getVesionFromGit():
def getVesionFromGit(cmakeVersion):
try:
taggedRevision = subprocess.check_output(('git rev-list --tags --max-count=1').split(), universal_newlines=True)
taggedRevision = subprocess.check_output(('git rev-list --tags --max-count=100').split(), universal_newlines=True)
cmd = ('git describe --tags ' + taggedRevision).split()
versions = subprocess.check_output(cmd, universal_newlines=True).split()
print('INFO: Version '+ versions[0] + ' has been read from git')
return versions[0]
return findVersion(versions, cmakeVersion)
except subprocess.CalledProcessError:
print('ERROR: Unable to get version from git')
exit(1)
@ -98,7 +110,28 @@ def updateVersionFile(number):
fp.write(content.replace('set (SYNERGY_VERSION_BUILD 1)', 'set (SYNERGY_VERSION_BUILD ' + str(number) + ')'))
fp.close()
def getOptionValue(source, option):
start = source.find(option)
if (start != -1):
start += len(option) + 1
end = source.find(')', start)
return source[start : end]
else:
print("ERROR: Can't find option <" + option + ">");
def getVersionFromFile():
fp = open('cmake/Version.cmake')
content = fp.read()
fp.close()
major = getOptionValue(content, 'SYNERGY_VERSION_MAJOR')
minor = getOptionValue(content, 'SYNERGY_VERSION_MINOR')
patch = getOptionValue(content, 'SYNERGY_VERSION_PATCH')
return Version(major + '.' + minor + '.' + patch)
if __name__ == '__main__':
version = Version(getVesionFromGit())
updateVersionFile(version.build.number)
print('INFO: Generate build number is: <' + str(version) + '>')
cmakeVersion = getVersionFromFile()
gitVersion = getVesionFromGit(cmakeVersion)
updateVersionFile(gitVersion.build.number)
print('INFO: Build number is: <' + str(gitVersion) + '>')

View file

@ -35,12 +35,6 @@ else()
option (SYNERGY_ENTERPRISE "Build Enterprise" OFF)
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_EXTENSIONS OFF)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
@ -260,14 +254,6 @@ if (UNIX)
list (APPEND libs Xi)
endif()
if (NOT SYNERGY_ENTERPRISE AND SYNERGY_BUILD_LEGACY_GUI AND SYNERGY_AUTOCONFIG)
set (DnsSdlib "dns_sd.h")
set (CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};${DnsSdlib}")
check_include_files ("${DnsSdlib}" HAVE_DNS_SD)
if (NOT HAVE_DNS_SD)
message (FATAL_ERROR "Missing header: " ${DnsSdlib})
endif()
endif()
endif()
# For config.h, set some static values; it may be a good idea to make

View file

@ -7,13 +7,14 @@ Bug fixes:
- #6997 Allow Windows to go to sleep depending on system preferences
- #7001 Add option to prevent computer from going to sleep
- #7029 Wrong encoding for text copied between linux and windows
- #7015 Fix Windows service not starting up after sleep
Enhancements:
- #6998 Remove functionality related to the screen saver synchronisation
- #7026 Update the way we package OpenSSL for Windows build
===========
v1.14.0-rc1
v1.14.0-stable
===========
Bug fixes:
- #6953 | #6961 The system does not update server name in Server configuration
@ -36,7 +37,7 @@ Bug fixes:
- #7011 Fix language synchronisation checkbox spelling
- #7013 Wrong connection pop up appears if the user connects using a domain name which is assigned to list of IP's
- #7014 Temporary disable language sync logic
- #7015 Fix Windows service not starting up after sleep
- #7020 Remove cmake option for autoconfig
Enhancements:
- #6954 Move language selection to advanced section
@ -50,10 +51,11 @@ Enhancements:
- #6962 | #6965 Add macOS 10.13 builder
- #6990 Change VersionChecker URL and include system language in the header
- #6999 Detect if Linux is running with Wayland, and display a warning message
- #7003 Prioritization rules server config
- #7003 | #7024 Prioritization rules server config
- #7004 Add openssl dependency for rpm
- #7008 Add logging when hostname have several IP
- #7022 Add Fedora 33 to build and release pipeline
- #7031 New licenses for Chinese market
===========
v1.13.1-stable

View file

@ -77,7 +77,3 @@ endif()
if (SYNERGY_ENTERPRISE)
add_definitions (-DSYNERGY_ENTERPRISE=1)
endif()
if (SYNERGY_AUTOCONFIG)
add_definitions (-DSYNERGY_AUTOCONFIG=1)
endif()

View file

@ -40,12 +40,10 @@ find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
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 (NOT SYNERGY_AUTOCONFIG)
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
endif ()
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
if (WIN32)
set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
@ -63,35 +61,11 @@ add_executable (synergy WIN32
include_directories (./src)
target_link_libraries (synergy shared)
if (NOT SYNERGY_ENTERPRISE AND SYNERGY_AUTOCONFIG)
if (WIN32)
include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
find_library (
DNSSD_LIB dnssd.lib
HINTS ENV BONJOUR_SDK_HOME
PATH_SUFFIXES "Lib/x64"
)
else()
find_library (
DNSSD_LIB dnssd.lib
HINTS ENV BONJOUR_SDK_HOME
PATH_SUFFIXES "Lib/Win32"
)
endif()
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 AND SYNERGY_AUTOCONFIG)
target_link_libraries (synergy ${DNSSD_LIB})
endif ()
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
endif()

View file

@ -92,7 +92,7 @@ void ActivationDialog::accept()
arg ((daysLeft == 1) ? "" : "s").
arg ((daysLeft == 1) ? "s" : "");
if (edition == kPro || edition == kBusiness) {
if (edition == kPro || edition == kPro_China || edition == kBusiness) {
m_appConfig->generateCertificate();
thanksMessage = thanksMessage.arg("If you're using SSL, "
"remember to activate all of your devices.");

View file

@ -431,7 +431,7 @@ bool AppConfig::isCryptoAvailable() const {
bool result {true};
#ifndef SYNERGY_ENTERPRISE
result = (edition() == kPro || edition() == kBusiness);
result = (edition() == kPro || edition() == kPro_China || edition() == kBusiness);
#endif
return result;

View file

@ -428,6 +428,17 @@ bool ServerConfig::isScreenExists(const QString& screenName) const
void ServerConfig::addClient(const QString& clientName)
{
int serverIndex = -1;
if (findScreenName(m_pAppConfig->screenName(), serverIndex))
{
m_Screens[serverIndex].markAsServer();
}
else
{
fixNoServer(m_pAppConfig->screenName(), serverIndex);
}
m_Screens.addScreenByPriority(clientName);
}
@ -460,6 +471,7 @@ bool ServerConfig::fixNoServer(const QString& name, int& index)
bool fixed = false;
if (screens()[serverDefaultIndex].isNull()) {
m_Screens[serverDefaultIndex].setName(name);
m_Screens[serverDefaultIndex].markAsServer();
index = serverDefaultIndex;
fixed = true;
}

View file

@ -103,7 +103,7 @@
</size>
</property>
<property name="text">
<string>Configure the layout of your computer dispalys by dragging to where you want.</string>
<string>Configure the layout of your computer displays by dragging to where you want.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>

View file

@ -25,7 +25,9 @@ enum Edition {
kPro,
Trial_DO_NOT_USE_OR_THERE_WILL_BE_PAIN,
kUnregistered,
kBusiness
kBusiness,
kBasic_China,
kPro_China
};
#endif // EDITIONTYPE_H

View file

@ -1,8 +1,12 @@
#include <algorithm>
#include <map>
#include "SerialKeyEdition.h"
const std::string SerialKeyEdition::PRO = "pro";
const std::string SerialKeyEdition::PRO_CHINA = "pro_china";
const std::string SerialKeyEdition::BASIC = "basic";
const std::string SerialKeyEdition::BASIC_CHINA = "basic_china";
const std::string SerialKeyEdition::BUSINESS = "business";
const std::string SerialKeyEdition::UNREGISTERED = "unregistered";
@ -46,6 +50,12 @@ SerialKeyEdition::getName() const
case kUnregistered:
Name = UNREGISTERED;
break;
case kBasic_China:
Name = BASIC_CHINA;
break;
case kPro_China:
Name = PRO_CHINA;
break;
default:
break;
}
@ -56,20 +66,32 @@ SerialKeyEdition::getName() const
std::string
SerialKeyEdition::getDisplayName() const
{
const std::string ApplicationName = "Synergy 1 ";
std::string EditionName = getName();
const std::string ApplicationName = "Synergy 1 ";
std::string DisplayName(ApplicationName);
if (!EditionName.empty()){
if (EditionName == UNREGISTERED){
std::transform(EditionName.begin(), EditionName.end(), EditionName.begin(), ::toupper);
EditionName = "(" + EditionName +")";
}
else{
EditionName[0] = static_cast<char>(::toupper(EditionName[0]));
}
}
switch (getType())
{
case kBasic_China:
DisplayName = "Synergy 中文版";
break;
case kPro_China:
DisplayName = "Synergy Pro 中文版";
break;
default:
std::string EditionName = getName();
if (!EditionName.empty()){
if (EditionName == UNREGISTERED){
std::transform(EditionName.begin(), EditionName.end(), EditionName.begin(), ::toupper);
EditionName = "(" + EditionName +")";
}
else{
EditionName[0] = static_cast<char>(::toupper(EditionName[0]));
}
DisplayName = ApplicationName + EditionName;
}
}
return (ApplicationName + EditionName);
return DisplayName;
}
void
@ -81,16 +103,20 @@ SerialKeyEdition::setType(Edition type)
void
SerialKeyEdition::setType(const std::string& type)
{
if (type == BASIC){
m_Type = kBasic;
}
else if (type == PRO){
m_Type = kPro;
}
else if (type == BUSINESS){
m_Type = kBusiness;
}
else{
m_Type = kUnregistered;
}
static const std::map<std::string, Edition> types = {
{BASIC, kBasic},
{PRO, kPro},
{BUSINESS, kBusiness},
{BASIC_CHINA, kBasic_China},
{PRO_CHINA, kPro_China}
};
const auto& pType = types.find(type);
if (pType != types.end()) {
m_Type = pType->second;
}
else {
m_Type = kUnregistered;
}
}

View file

@ -35,7 +35,9 @@ public:
void setType(const std::string& type);
static const std::string PRO;
static const std::string PRO_CHINA;
static const std::string BASIC;
static const std::string BASIC_CHINA;
static const std::string BUSINESS;
static const std::string UNREGISTERED;

View file

@ -56,6 +56,24 @@ TEST(SerialKeyEditionTests, SetEditionBusiness)
EXPECT_EQ("Synergy 1 Business", edition.getDisplayName());
}
TEST(SerialKeyEditionTests, SetEditionBasicChina)
{
SerialKeyEdition edition;
edition.setType(kBasic_China);
EXPECT_EQ(kBasic_China, edition.getType());
EXPECT_EQ(SerialKeyEdition::BASIC_CHINA, edition.getName());
EXPECT_EQ("Synergy 中文版", edition.getDisplayName());
}
TEST(SerialKeyEditionTests, SetEditionProChina)
{
SerialKeyEdition edition;
edition.setType(kPro_China);
EXPECT_EQ(kPro_China, edition.getType());
EXPECT_EQ(SerialKeyEdition::PRO_CHINA, edition.getName());
EXPECT_EQ("Synergy Pro 中文版", edition.getDisplayName());
}