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:
parent
413a23d1f2
commit
6ce20f689a
13 changed files with 136 additions and 85 deletions
|
|
@ -35,7 +35,6 @@ class VersionPart:
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.prefix + str(self.number) + self.suffix
|
return self.prefix + str(self.number) + self.suffix
|
||||||
|
|
||||||
class Version:
|
class Version:
|
||||||
|
|
||||||
def __init__(self, version):
|
def __init__(self, version):
|
||||||
|
|
@ -55,6 +54,11 @@ class Version:
|
||||||
else:
|
else:
|
||||||
print('ERROR: Wrong version number')
|
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):
|
def __str__(self):
|
||||||
result = str(self.major) + '.'
|
result = str(self.major) + '.'
|
||||||
result += str(self.minor) + '.'
|
result += str(self.minor) + '.'
|
||||||
|
|
@ -77,14 +81,22 @@ class VersionFile:
|
||||||
fp.write(content)
|
fp.write(content)
|
||||||
fp.close()
|
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:
|
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()
|
cmd = ('git describe --tags ' + taggedRevision).split()
|
||||||
versions = subprocess.check_output(cmd, universal_newlines=True).split()
|
versions = subprocess.check_output(cmd, universal_newlines=True).split()
|
||||||
print('INFO: Version '+ versions[0] + ' has been read from git')
|
return findVersion(versions, cmakeVersion)
|
||||||
return versions[0]
|
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print('ERROR: Unable to get version from git')
|
print('ERROR: Unable to get version from git')
|
||||||
exit(1)
|
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.write(content.replace('set (SYNERGY_VERSION_BUILD 1)', 'set (SYNERGY_VERSION_BUILD ' + str(number) + ')'))
|
||||||
fp.close()
|
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__':
|
if __name__ == '__main__':
|
||||||
version = Version(getVesionFromGit())
|
cmakeVersion = getVersionFromFile()
|
||||||
updateVersionFile(version.build.number)
|
gitVersion = getVesionFromGit(cmakeVersion)
|
||||||
print('INFO: Generate build number is: <' + str(version) + '>')
|
updateVersionFile(gitVersion.build.number)
|
||||||
|
print('INFO: Build number is: <' + str(gitVersion) + '>')
|
||||||
|
|
@ -35,12 +35,6 @@ 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)
|
||||||
|
|
@ -260,14 +254,6 @@ if (UNIX)
|
||||||
list (APPEND libs Xi)
|
list (APPEND libs Xi)
|
||||||
endif()
|
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()
|
endif()
|
||||||
|
|
||||||
# For config.h, set some static values; it may be a good idea to make
|
# For config.h, set some static values; it may be a good idea to make
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,14 @@ Bug fixes:
|
||||||
- #6997 Allow Windows to go to sleep depending on system preferences
|
- #6997 Allow Windows to go to sleep depending on system preferences
|
||||||
- #7001 Add option to prevent computer from going to sleep
|
- #7001 Add option to prevent computer from going to sleep
|
||||||
- #7029 Wrong encoding for text copied between linux and windows
|
- #7029 Wrong encoding for text copied between linux and windows
|
||||||
|
- #7015 Fix Windows service not starting up after sleep
|
||||||
|
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- #6998 Remove functionality related to the screen saver synchronisation
|
- #6998 Remove functionality related to the screen saver synchronisation
|
||||||
- #7026 Update the way we package OpenSSL for Windows build
|
- #7026 Update the way we package OpenSSL for Windows build
|
||||||
===========
|
===========
|
||||||
|
|
||||||
v1.14.0-rc1
|
v1.14.0-stable
|
||||||
===========
|
===========
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
- #6953 | #6961 The system does not update server name in Server configuration
|
- #6953 | #6961 The system does not update server name in Server configuration
|
||||||
|
|
@ -36,7 +37,7 @@ Bug fixes:
|
||||||
- #7011 Fix language synchronisation checkbox spelling
|
- #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
|
- #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
|
- #7014 Temporary disable language sync logic
|
||||||
- #7015 Fix Windows service not starting up after sleep
|
- #7020 Remove cmake option for autoconfig
|
||||||
|
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- #6954 Move language selection to advanced section
|
- #6954 Move language selection to advanced section
|
||||||
|
|
@ -50,10 +51,11 @@ Enhancements:
|
||||||
- #6962 | #6965 Add macOS 10.13 builder
|
- #6962 | #6965 Add macOS 10.13 builder
|
||||||
- #6990 Change VersionChecker URL and include system language in the header
|
- #6990 Change VersionChecker URL and include system language in the header
|
||||||
- #6999 Detect if Linux is running with Wayland, and display a warning message
|
- #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
|
- #7004 Add openssl dependency for rpm
|
||||||
- #7008 Add logging when hostname have several IP
|
- #7008 Add logging when hostname have several IP
|
||||||
- #7022 Add Fedora 33 to build and release pipeline
|
- #7022 Add Fedora 33 to build and release pipeline
|
||||||
|
- #7031 New licenses for Chinese market
|
||||||
===========
|
===========
|
||||||
|
|
||||||
v1.13.1-stable
|
v1.13.1-stable
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,3 @@ 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()
|
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,10 @@ find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
|
||||||
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 (NOT SYNERGY_AUTOCONFIG)
|
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ZEROCONF_FILES})
|
||||||
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)
|
||||||
|
|
@ -63,35 +61,11 @@ add_executable (synergy WIN32
|
||||||
include_directories (./src)
|
include_directories (./src)
|
||||||
target_link_libraries (synergy shared)
|
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)
|
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 AND SYNERGY_AUTOCONFIG)
|
|
||||||
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()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ void ActivationDialog::accept()
|
||||||
arg ((daysLeft == 1) ? "" : "s").
|
arg ((daysLeft == 1) ? "" : "s").
|
||||||
arg ((daysLeft == 1) ? "s" : "");
|
arg ((daysLeft == 1) ? "s" : "");
|
||||||
|
|
||||||
if (edition == kPro || edition == kBusiness) {
|
if (edition == kPro || edition == kPro_China || edition == kBusiness) {
|
||||||
m_appConfig->generateCertificate();
|
m_appConfig->generateCertificate();
|
||||||
thanksMessage = thanksMessage.arg("If you're using SSL, "
|
thanksMessage = thanksMessage.arg("If you're using SSL, "
|
||||||
"remember to activate all of your devices.");
|
"remember to activate all of your devices.");
|
||||||
|
|
|
||||||
|
|
@ -431,7 +431,7 @@ bool AppConfig::isCryptoAvailable() const {
|
||||||
bool result {true};
|
bool result {true};
|
||||||
|
|
||||||
#ifndef SYNERGY_ENTERPRISE
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
result = (edition() == kPro || edition() == kBusiness);
|
result = (edition() == kPro || edition() == kPro_China || edition() == kBusiness);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -428,6 +428,17 @@ bool ServerConfig::isScreenExists(const QString& screenName) const
|
||||||
|
|
||||||
void ServerConfig::addClient(const QString& clientName)
|
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);
|
m_Screens.addScreenByPriority(clientName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -460,6 +471,7 @@ bool ServerConfig::fixNoServer(const QString& name, int& index)
|
||||||
bool fixed = false;
|
bool fixed = false;
|
||||||
if (screens()[serverDefaultIndex].isNull()) {
|
if (screens()[serverDefaultIndex].isNull()) {
|
||||||
m_Screens[serverDefaultIndex].setName(name);
|
m_Screens[serverDefaultIndex].setName(name);
|
||||||
|
m_Screens[serverDefaultIndex].markAsServer();
|
||||||
index = serverDefaultIndex;
|
index = serverDefaultIndex;
|
||||||
fixed = true;
|
fixed = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@ enum Edition {
|
||||||
kPro,
|
kPro,
|
||||||
Trial_DO_NOT_USE_OR_THERE_WILL_BE_PAIN,
|
Trial_DO_NOT_USE_OR_THERE_WILL_BE_PAIN,
|
||||||
kUnregistered,
|
kUnregistered,
|
||||||
kBusiness
|
kBusiness,
|
||||||
|
kBasic_China,
|
||||||
|
kPro_China
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EDITIONTYPE_H
|
#endif // EDITIONTYPE_H
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
#include "SerialKeyEdition.h"
|
#include "SerialKeyEdition.h"
|
||||||
|
|
||||||
const std::string SerialKeyEdition::PRO = "pro";
|
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 = "basic";
|
||||||
|
const std::string SerialKeyEdition::BASIC_CHINA = "basic_china";
|
||||||
const std::string SerialKeyEdition::BUSINESS = "business";
|
const std::string SerialKeyEdition::BUSINESS = "business";
|
||||||
const std::string SerialKeyEdition::UNREGISTERED = "unregistered";
|
const std::string SerialKeyEdition::UNREGISTERED = "unregistered";
|
||||||
|
|
||||||
|
|
@ -46,6 +50,12 @@ SerialKeyEdition::getName() const
|
||||||
case kUnregistered:
|
case kUnregistered:
|
||||||
Name = UNREGISTERED;
|
Name = UNREGISTERED;
|
||||||
break;
|
break;
|
||||||
|
case kBasic_China:
|
||||||
|
Name = BASIC_CHINA;
|
||||||
|
break;
|
||||||
|
case kPro_China:
|
||||||
|
Name = PRO_CHINA;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -56,20 +66,32 @@ SerialKeyEdition::getName() const
|
||||||
std::string
|
std::string
|
||||||
SerialKeyEdition::getDisplayName() const
|
SerialKeyEdition::getDisplayName() const
|
||||||
{
|
{
|
||||||
const std::string ApplicationName = "Synergy 1 ";
|
const std::string ApplicationName = "Synergy 1 ";
|
||||||
std::string EditionName = getName();
|
std::string DisplayName(ApplicationName);
|
||||||
|
|
||||||
if (!EditionName.empty()){
|
switch (getType())
|
||||||
if (EditionName == UNREGISTERED){
|
{
|
||||||
std::transform(EditionName.begin(), EditionName.end(), EditionName.begin(), ::toupper);
|
case kBasic_China:
|
||||||
EditionName = "(" + EditionName +")";
|
DisplayName = "Synergy 中文版";
|
||||||
}
|
break;
|
||||||
else{
|
case kPro_China:
|
||||||
EditionName[0] = static_cast<char>(::toupper(EditionName[0]));
|
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
|
void
|
||||||
|
|
@ -81,16 +103,20 @@ SerialKeyEdition::setType(Edition type)
|
||||||
void
|
void
|
||||||
SerialKeyEdition::setType(const std::string& type)
|
SerialKeyEdition::setType(const std::string& type)
|
||||||
{
|
{
|
||||||
if (type == BASIC){
|
static const std::map<std::string, Edition> types = {
|
||||||
m_Type = kBasic;
|
{BASIC, kBasic},
|
||||||
}
|
{PRO, kPro},
|
||||||
else if (type == PRO){
|
{BUSINESS, kBusiness},
|
||||||
m_Type = kPro;
|
{BASIC_CHINA, kBasic_China},
|
||||||
}
|
{PRO_CHINA, kPro_China}
|
||||||
else if (type == BUSINESS){
|
};
|
||||||
m_Type = kBusiness;
|
|
||||||
}
|
const auto& pType = types.find(type);
|
||||||
else{
|
|
||||||
m_Type = kUnregistered;
|
if (pType != types.end()) {
|
||||||
}
|
m_Type = pType->second;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_Type = kUnregistered;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,9 @@ public:
|
||||||
void setType(const std::string& type);
|
void setType(const std::string& type);
|
||||||
|
|
||||||
static const std::string PRO;
|
static const std::string PRO;
|
||||||
|
static const std::string PRO_CHINA;
|
||||||
static const std::string BASIC;
|
static const std::string BASIC;
|
||||||
|
static const std::string BASIC_CHINA;
|
||||||
static const std::string BUSINESS;
|
static const std::string BUSINESS;
|
||||||
static const std::string UNREGISTERED;
|
static const std::string UNREGISTERED;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,24 @@ TEST(SerialKeyEditionTests, SetEditionBusiness)
|
||||||
EXPECT_EQ("Synergy 1 Business", edition.getDisplayName());
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue