This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge branch 'v1.8.6' into issue5186-different-dpi

  • Loading branch information...
Jerry (Xinyu Hou)
Jerry (Xinyu Hou) committed Oct 31, 2016
2 parents 8d193c7 + 6a7703f commit 514e2475c3df96fe5fb4a194b01be181500fc5ce
@@ -1,8 +1,7 @@
### Operating Systems ###
-Client: Applesoft Windy OS 10
-
Server: microOS Tiara
+Client: Applesoft Windy OS 10
**READ ME, DELETE ME**: On Windows, hold the Windows key and press 'r', type 'winver' and hit return to get your OS version. On Mac, hit the Apple menu (top left of the screen) and check 'About this Mac'. Linux users... you know what you're using ;)
View
@@ -18,7 +18,7 @@
set(VERSION_MAJOR 1)
set(VERSION_MINOR 8)
set(VERSION_REV 5)
-set(VERSION_STAGE rc1)
+set(VERSION_STAGE stable)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
cmake_minimum_required(VERSION 2.6)
View
@@ -1,16 +1,22 @@
-v1.8.4-stable
+v1.8.5-stable
=============
+Bug #5680 - Server crashes when disconnecting SSL clients
+Bug #5626 - Build fails using Xcode 8 and macOS SDK 10.12
+Feature #5657 - Trial version support
+Feature #5707 - User upgrade statistics
-Bug #4041 UHD/4K DPI scaling broken on Windows servers
-Bug #4420 When XRandR adds a screen, it is inaccessible
-Bug #5603 Activation notification depends on existence of /etc/os-release
-Bug #5624 Update notification sometimes requests a downgrade
-Bug #5329 Current date is shown for build date in the about dialog
-Bug #5640 Synergy branding is inconsistent across platforms
-Enhancement #5617 Remove redundant plugin infrastructure
-Enhancement #5627 Move SSL certificate generation to main window
-Enhancement #5628 Move SSL implementation into core binary
-Enhancement #5629 Move activation from wizard into new dialog window
+v1.8.4-stable
+=============
+Bug #5183 - Slowly moving the cursor has no effect on high DPI clients
+Bug #4041 - UHD/4K DPI scaling broken on Windows servers
+Bug #4420 - When XRandR adds a screen, it is inaccessible
+Bug #5603 - Activation notification depends on existence of /etc/os-release
+Bug #5624 - Update notification sometimes requests a downgrade
+Bug #5329 - Current date is shown for build date in the about dialog
+Enhancement #5617 - Remove redundant plugin infrastructure
+Enhancement #5627 - Move SSL certificate generation to main window
+Enhancement #5628 - Move SSL implementation into core binary
+Enhancement #5629 - Move activation from wizard into new dialog window
v1.8.3-stable
=============
@@ -90,6 +90,7 @@ void ActivationDialog::accept()
return;
}
+ m_LicenseManager->notifyActivation("serial:" + m_appConfig->serialKey());
Edition edition = m_LicenseManager->activeEdition();
time_t daysLeft = m_LicenseManager->serialKey().daysLeft(::time(0));
if (edition != kUnregistered) {
@@ -20,7 +20,7 @@
#include "CoreInterface.h"
ActivationNotifier::ActivationNotifier(QObject *parent) :
- QObject(parent)
+ QObject(parent)
{
}
@@ -29,6 +29,15 @@ void ActivationNotifier::setIdentity(QString identity)
m_Identity = identity;
}
+void ActivationNotifier::setUpdateInfo(QString const& fromVersion,
+ QString const& toVersion,
+ QString const& serialKey)
+{
+ m_fromVersion = fromVersion;
+ m_toVersion = toVersion;
+ m_serialKey = serialKey;
+}
+
void ActivationNotifier::notify()
{
CoreInterface coreInterface;
@@ -39,3 +48,13 @@ void ActivationNotifier::notify()
// catch all exceptions and fails silently
}
}
+
+void ActivationNotifier::notifyUpdate()
+{
+ try {
+ CoreInterface coreInterface;
+ coreInterface.notifyUpdate(m_fromVersion, m_toVersion,
+ m_serialKey);
+ } catch (...) {
+ }
+}
@@ -24,18 +24,24 @@ class ActivationNotifier : public QObject
{
Q_OBJECT
public:
- explicit ActivationNotifier(QObject *parent = 0);
+ explicit ActivationNotifier(QObject *parent = 0);
void setIdentity(QString identity);
+ void setUpdateInfo(QString const& fromVersion,
+ QString const& toVersion, QString const& serialKey);
public slots:
void notify();
+ void notifyUpdate();
signals:
void finished();
private:
QString m_Identity;
+ QString m_fromVersion;
+ QString m_toVersion;
+ QString m_serialKey;
};
#endif // ACTIVATIONNOTIFIER_H
View
@@ -162,6 +162,7 @@ void AppConfig::loadSettings()
m_CryptoEnabled = settings().value("cryptoEnabled", true).toBool();
m_AutoHide = settings().value("autoHide", false).toBool();
m_Serialkey = settings().value("serialKey", "").toString();
+ m_lastVersion = settings().value("lastVersion", "Unknown").toString();
m_LastExpiringWarningTime = settings().value("lastExpiringWarningTime", 0).toInt();
m_ActivationHasRun = settings().value("activationHasRun", false).toBool();
}
@@ -187,6 +188,7 @@ void AppConfig::saveSettings()
settings().setValue("cryptoEnabled", m_CryptoEnabled);
settings().setValue("autoHide", m_AutoHide);
settings().setValue("serialKey", m_Serialkey);
+ settings().setValue("lastVersion", m_lastVersion);
settings().setValue("lastExpiringWarningTime", m_LastExpiringWarningTime);
settings().setValue("activationHasRun", m_ActivationHasRun);
settings().sync();
@@ -203,6 +205,15 @@ AppConfig& AppConfig::activationHasRun(bool value)
return *this;
}
+QString AppConfig::lastVersion() const
+{
+ return m_lastVersion;
+}
+
+void AppConfig::setLastVersion(QString version) {
+ m_lastVersion = version;
+}
+
QSettings &AppConfig::settings() { return *m_pSettings; }
void AppConfig::setScreenName(const QString &s) { m_ScreenName = s; }
View
@@ -104,7 +104,11 @@ class AppConfig: public QObject
bool activationHasRun() const;
AppConfig& activationHasRun(bool value);
- void saveSettings();;
+ QString lastVersion() const;
+
+ void saveSettings();
+ void setLastVersion(QString version);
+
protected:
QSettings& settings();
void setScreenName(const QString& s);
@@ -139,6 +143,7 @@ class AppConfig: public QObject
bool m_CryptoEnabled;
bool m_AutoHide;
QString m_Serialkey;
+ QString m_lastVersion;
int m_LastExpiringWarningTime;
bool m_ActivationHasRun;
@@ -62,6 +62,14 @@ QString CoreInterface::getSerialKeyFilePath()
return filename;
}
+QString CoreInterface::notifyUpdate (QString const& fromVersion,
+ QString const& toVersion,
+ QString const& serialKey) {
+ QStringList args("--notify-update");
+ QString input(fromVersion + ":" + toVersion + ":" + serialKey);
+ input.append("\n");
+ return run(args, input);
+}
QString CoreInterface::notifyActivation(const QString& identity)
{
@@ -29,5 +29,8 @@ class CoreInterface
QString getArch();
QString getSerialKeyFilePath();
QString notifyActivation(const QString& identity);
+ QString notifyUpdate (QString const& fromVersion,
+ QString const& toVersion,
+ QString const& serialKey);
QString run(const QStringList& args, const QString& input = "");
};
@@ -45,7 +45,6 @@ LicenseManager::setSerialKey(QString serialKeyString, bool acceptExpired)
using std::swap;
swap (serialKey, m_serialKey);
m_AppConfig->setSerialKey(serialKeyString);
- notifyActivation("serial:" + serialKeyString);
emit serialKeyChanged(m_serialKey);
if (serialKey.isTrial()) {
@@ -71,6 +70,29 @@ LicenseManager::setSerialKey(QString serialKeyString, bool acceptExpired)
return ret;
}
+void
+LicenseManager::notifyUpdate(QString fromVersion, QString toVersion) {
+ if ((fromVersion == "Unknown")
+ && (m_serialKey == SerialKey(kUnregistered))) {
+ return;
+ }
+
+ ActivationNotifier* notifier = new ActivationNotifier();
+ notifier->setUpdateInfo (fromVersion, toVersion,
+ QString::fromStdString(m_serialKey.toString()));
+
+ QThread* thread = new QThread();
+ connect(notifier, SIGNAL(finished()), thread, SLOT(quit()));
+ connect(notifier, SIGNAL(finished()), notifier, SLOT(deleteLater()));
+ connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
+
+ notifier->moveToThread(thread);
+ thread->start();
+
+ QMetaObject::invokeMethod(notifier, "notifyUpdate",
+ Qt::QueuedConnection);
+}
+
Edition
LicenseManager::activeEdition() const
{
@@ -36,9 +36,8 @@ class LicenseManager: public QObject
QString activeEditionName() const;
SerialKey serialKey() const;
void skipActivation();
+ void notifyUpdate(QString fromVersion, QString toVersion);
static QString getEditionName(Edition edition, bool trial = false);
-
-private:
void notifyActivation(QString identity);
private:
@@ -157,6 +157,14 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig,
setWindowTitle (m_LicenseManager->activeEditionName());
m_LicenseManager->refresh();
+
+ QString lastVersion = m_AppConfig->lastVersion();
+ QString currentVersion = m_VersionChecker.getVersion();
+ if (lastVersion != currentVersion) {
+ m_AppConfig->setLastVersion (currentVersion);
+ m_AppConfig->saveSettings();
+ m_LicenseManager->notifyUpdate (lastVersion, currentVersion);
+ }
}
MainWindow::~MainWindow()
@@ -116,7 +116,6 @@ CurlFacade::urlEncode(const String& url)
char* resultCStr = curl_easy_escape(m_curl, url.c_str(), 0);
if (resultCStr == NULL) {
- curl_free(resultCStr);
throw XArch("CURL escape failed.");
}
@@ -195,6 +195,10 @@ ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
args.m_notifyActivation = true;
return true;
}
+ else if (isArg(i, argc, argv, NULL, "--notify-update", 0)) {
+ args.m_notifyUpdate = true;
+ return true;
+ }
else {
return false;
}
@@ -1,11 +1,11 @@
/*
* synergy -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -80,6 +80,9 @@ ToolApp::run(int argc, char** argv)
else if (m_args.m_getArch) {
std::cout << ARCH->getPlatformName() << std::endl;
}
+ else if (m_args.m_notifyUpdate) {
+ notifyUpdate();
+ }
else if (m_args.m_notifyActivation) {
notifyActivation();
}
@@ -134,7 +137,30 @@ ToolApp::loginAuth()
}
}
-void
+void
+ToolApp::notifyUpdate()
+{
+ String data;
+ std::cin >> data;
+
+ std::vector<String> parts = synergy::string::splitString(data, ':');
+ size_t count = parts.size();
+
+ if (count == 3) {
+ std::stringstream ss;
+ ss << JSON_URL << "notify/update";
+ ss << "?from=" << parts[0];
+ ss << "&to=" << parts[1];
+ ss << "&serial=" << parts[2];
+
+ std::cout << ARCH->internet().get(ss.str()) << std::endl;
+ }
+ else {
+ throw XSynergy("Invalid update data.");
+ }
+}
+
+void
ToolApp::notifyActivation()
{
String info;
@@ -30,6 +30,7 @@ class ToolApp : public MinimalApp
private:
void loginAuth();
void notifyActivation();
+ void notifyUpdate();
private:
ToolArgs m_args;
@@ -23,6 +23,7 @@ ToolArgs::ToolArgs() :
m_getInstalledDir(false),
m_getProfileDir(false),
m_getArch(false),
- m_notifyActivation(false)
+ m_notifyActivation(false),
+ m_notifyUpdate(false)
{
}
@@ -30,4 +30,5 @@ class ToolArgs {
bool m_getProfileDir;
bool m_getArch;
bool m_notifyActivation;
+ bool m_notifyUpdate;
};

0 comments on commit 514e247

Please sign in to comment.