Compare commits
147 Commits
master
...
v1.10.2-rc
Author | SHA1 | Date |
---|---|---|
|
2d9b2c29e6 | |
|
79fb9e2c59 | |
|
70ba53caf4 | |
|
667d79263d | |
|
8dcb63d3c0 | |
|
baa913b1ac | |
|
27404ff2b9 | |
|
55dd155e56 | |
|
751fcffc87 | |
|
7fb4805521 | |
|
0ef70ac2b2 | |
|
6c6e2b6bd3 | |
|
207247b7ef | |
|
7f4ca77444 | |
|
fe6cc4b849 | |
|
e29ee68ff9 | |
|
6f17cb9a31 | |
|
eb620097c0 | |
|
8b9722df25 | |
|
de7c5ce6b7 | |
|
a56abf68dd | |
|
9bccfb89cc | |
|
6870af8eb7 | |
|
2713b95af7 | |
|
b3cb57243a | |
|
82d5733c09 | |
|
2bbfe450ae | |
|
e3633d8a7b | |
|
85c359693a | |
|
2118c6647c | |
|
0e7fef7ceb | |
|
9373bdaf01 | |
|
e0e8651490 | |
|
4cf1ab8a25 | |
|
934824433d | |
|
aad0ac25d1 | |
|
87d8fc1e14 | |
|
3bae5f3cc6 | |
|
8d2ca0b36f | |
|
aae43304c3 | |
|
53d5c89851 | |
|
c0452f0e61 | |
|
d2d2a5e1d9 | |
|
918571b6e2 | |
|
21655a1c7a | |
|
acecfef949 | |
|
80efcfa495 | |
|
566e2db202 | |
|
25c2e360d3 | |
|
8ef2e7edbc | |
|
aca2605cb8 | |
|
026b1f0de1 | |
|
568a008037 | |
|
3523d6e254 | |
|
d9ec2f3ed3 | |
|
b5c0f5c47e | |
|
fc6cc78738 | |
|
65e9045981 | |
|
8dc868a206 | |
|
e555d5d651 | |
|
7aa0553b57 | |
|
6d57630746 | |
|
0ae87852e5 | |
|
85a8080339 | |
|
2b79608c44 | |
|
683039c9cc | |
|
fd0cb228ee | |
|
2cde78ff54 | |
|
5f3dce8379 | |
|
555090c7d2 | |
|
0e0c701b61 | |
|
60c0df5984 | |
|
89cc8a8daa | |
|
46a5166fba | |
|
183403ceb7 | |
|
f9b83f9516 | |
|
a830861522 | |
|
420718101d | |
|
0f2306c9ac | |
|
1b0ab12c91 | |
|
9b4d14e085 | |
|
21edf3e7f4 | |
|
e4b5a21616 | |
|
491bb2de00 | |
|
57a9a0fe27 | |
|
1c4eb74204 | |
|
d95af84528 | |
|
11be6ef3d4 | |
|
8e56fbce1f | |
|
eebd9b1eb2 | |
|
71953b5af8 | |
|
458d8e4778 | |
|
b396b1092d | |
|
4e59954d94 | |
|
6e77d9c42a | |
|
6c5c55a564 | |
|
c3a4fe7f2b | |
|
14343fa7e1 | |
|
953e829562 | |
|
7c29d8e704 | |
|
3cb7a5c101 | |
|
88bf4b2e47 | |
|
8054bc51a5 | |
|
3c133380f8 | |
|
36c81480d7 | |
|
dfcac4e90b | |
|
358641e58e | |
|
828ad24820 | |
|
8af215364f | |
|
01109e0499 | |
|
7e7760668a | |
|
682fe1cfa3 | |
|
1c90f858ea | |
|
284fd80c5f | |
|
1852f7477c | |
|
6ccd4d71b8 | |
|
84dfeec2ed | |
|
535627c871 | |
|
46a5b7f9ae | |
|
7da1d4f9cc | |
|
c9082e0cf2 | |
|
ea8d24c908 | |
|
a155ca951c | |
|
5015f9da11 | |
|
f07b765a24 | |
|
87e1912842 | |
|
e170bd87a8 | |
|
f0852871b1 | |
|
2a0225c105 | |
|
ccea7624e5 | |
|
5da6d3fb47 | |
|
fb3de294ec | |
|
b46714957f | |
|
67c7d0993f | |
|
eb4047b9fb | |
|
35fb8c3389 | |
|
5697da164b | |
|
0ef8838e88 | |
|
fa82f5cdf3 | |
|
e01acb30b6 | |
|
8446fe5395 | |
|
1e8e48d65b | |
|
82edfe087c | |
|
5bd12f2376 | |
|
1d3e86dd55 | |
|
4a3a5d5b0f | |
|
a2929a7920 |
|
@ -0,0 +1,62 @@
|
|||
gcp_credentials: ENCRYPTED[d3110e2399b82e1d2adb6f9294917064a448a4d102c42c5023815723841db4ff7aa1d0df64a44281ed25b3adbeb08eff]
|
||||
|
||||
windows_task:
|
||||
gce_instance:
|
||||
image_project: buildcluster-237411
|
||||
image_name: windows2019-vs2017-ramdisk
|
||||
platform: windows
|
||||
zone: us-central1-a
|
||||
type: n1-highcpu-16
|
||||
disk: 32
|
||||
use_ssd: true
|
||||
|
||||
env:
|
||||
BONJOUR_SDK_HOME: C:\Program Files\Bonjour SDK\
|
||||
CMAKE_PREFIX_PATH: C:\Qt\5.9.5\msvc2017_64
|
||||
CIRRUS_WORKING_DIR: D:\
|
||||
|
||||
build_script:
|
||||
- .\CI\Windows\build.bat
|
||||
|
||||
ubuntu1604_task:
|
||||
use_compute_credits: true
|
||||
container:
|
||||
dockerfile: CI/ubuntu1604.Dockerfile
|
||||
build_script:
|
||||
- pwd; ls -la
|
||||
- chmod +x ./CI/build.sh
|
||||
- ./CI/build.sh
|
||||
|
||||
ubuntu1804_task:
|
||||
use_compute_credits: true
|
||||
container:
|
||||
dockerfile: CI/ubuntu1804.Dockerfile
|
||||
build_script:
|
||||
- pwd; ls -la
|
||||
- chmod +x ./CI/build.sh
|
||||
- ./CI/build.sh
|
||||
|
||||
ubuntu1904_task:
|
||||
use_compute_credits: true
|
||||
container:
|
||||
dockerfile: CI/ubuntu1904.Dockerfile
|
||||
build_script:
|
||||
- pwd; ls -la
|
||||
- chmod +x ./CI/build.sh
|
||||
- ./CI/build.sh
|
||||
|
||||
macos_task:
|
||||
use_compute_credits: true
|
||||
osx_instance:
|
||||
image: mojave-xcode-10.2
|
||||
|
||||
env:
|
||||
PATH: /usr/local/opt/qt/bin:$PATH
|
||||
|
||||
install_script:
|
||||
- brew install qt
|
||||
build_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CONFIGURATION_TYPES=$CMAKE_BUILD_TYPE ..
|
||||
- make
|
|
@ -19,3 +19,6 @@ src/gui/gui.pro.user*
|
|||
src/gui/.qmake.stash
|
||||
src/gui/.rnd
|
||||
src/setup/win32/synergy.suo
|
||||
/.idea
|
||||
/cmake-build-debug
|
||||
/CMakeLists.txt.user
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# Synergy build parameters
|
||||
#
|
||||
SYNERGY_VERSION_MAJOR = 1
|
||||
SYNERGY_VERSION_MINOR = 9
|
||||
SYNERGY_VERSION_PATCH = 0
|
||||
SYNERGY_VERSION_MINOR = 10
|
||||
SYNERGY_VERSION_PATCH = 2
|
||||
SYNERGY_VERSION_STAGE = snapshot
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
function Controller() {
|
||||
installer.autoRejectMessageBoxes();
|
||||
installer.installationFinished.connect(function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
})
|
||||
}
|
||||
|
||||
Controller.prototype.WelcomePageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton, 3000);
|
||||
}
|
||||
|
||||
Controller.prototype.CredentialsPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.IntroductionPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.TargetDirectoryPageCallback = function()
|
||||
{
|
||||
gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt");
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.ComponentSelectionPageCallback = function() {
|
||||
var widget = gui.currentPageWidget();
|
||||
|
||||
widget.deselectAll();
|
||||
|
||||
widget.selectComponent("qt.595.clang_64")
|
||||
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.LicenseAgreementPageCallback = function() {
|
||||
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.StartMenuDirectoryPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.ReadyForInstallationPageCallback = function()
|
||||
{
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.FinishedPageCallback = function() {
|
||||
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
|
||||
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
|
||||
checkBoxForm.launchQtCreatorCheckBox.checked = false;
|
||||
}
|
||||
gui.clickButton(buttons.FinishButton);
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
SET VS_INSTALL_PATH=C:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\
|
||||
call %VS_INSTALL_PATH%Common7\Tools\VsDevCmd.bat
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
msbuild synergy-core.sln /p:Platform="x64" /p:Configuration=Debug /m
|
|
@ -0,0 +1,54 @@
|
|||
function Controller() {
|
||||
installer.autoRejectMessageBoxes();
|
||||
installer.installationFinished.connect(function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
})
|
||||
}
|
||||
|
||||
Controller.prototype.WelcomePageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton, 3000);
|
||||
}
|
||||
|
||||
Controller.prototype.CredentialsPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.IntroductionPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.TargetDirectoryPageCallback = function() {
|
||||
gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.environmentVariable("QT_INSTALL_DIR"));
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.ComponentSelectionPageCallback = function() {
|
||||
var widget = gui.currentPageWidget();
|
||||
widget.deselectAll();
|
||||
widget.selectComponent("qt.595.win32_msvc2015");
|
||||
widget.selectComponent("qt.595.win64_msvc2015_64");
|
||||
widget.selectComponent("qt.595.qtscript");
|
||||
widget.selectComponent("qt.tools.vcredist_msvc2015_x86");
|
||||
widget.selectComponent("qt.tools.vcredist_msvc2015_x64");
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.LicenseAgreementPageCallback = function() {
|
||||
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.StartMenuDirectoryPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.ReadyForInstallationPageCallback = function() {
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
Controller.prototype.FinishedPageCallback = function() {
|
||||
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm;
|
||||
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox)
|
||||
checkBoxForm.launchQtCreatorCheckBox.checked = false;
|
||||
gui.clickButton(buttons.FinishButton);
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
pwd
|
||||
ls -la
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
|
@ -0,0 +1,12 @@
|
|||
cd ${CIRRUS_WORKING_DIR}
|
||||
|
||||
source ./build/version
|
||||
|
||||
SYNERGY_VERSION="$SYNERGY_VERSION_MAJOR.$SYNERGY_VERSION_MINOR.$SYNERGY_VERSION_PATCH"
|
||||
SYNERGY_REVISION=`git rev-parse --short=8 HEAD`
|
||||
SYNERGY_DEB_VERSION="${SYNERGY_VERSION}.${SYNERGY_VERSION_STAGE}~b${BUILD_NUMBER}+${SYNERGY_REVISION}"
|
||||
|
||||
dch --create --package "synergy" --controlmaint --distribution unstable --newversion $SYNERGY_DEB_VERSION "Initial release"
|
||||
|
||||
export DEB_BUILD_OPTIONS="parallel=4"
|
||||
debuild --preserve-envvar SYNERGY_* --preserve-envvar GIT_COMMIT --preserve-envvar BUILD_NUMBER
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Ubuntu Dockerfile
|
||||
#
|
||||
# https://github.com/dockerfile/ubuntu
|
||||
#
|
||||
|
||||
# Pull base image.
|
||||
FROM ubuntu:16.04
|
||||
|
||||
# Install.
|
||||
RUN \
|
||||
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y git cmake qtbase5-dev build-essential libx11-dev libxtst-dev libgl1-mesa-dev libssl-dev libavahi-compat-libdnssd-dev && \
|
||||
apt-get install -y debhelper devscripts
|
||||
|
||||
# Set environment variables.
|
||||
ENV HOME /root
|
||||
|
||||
# Define working directory.
|
||||
WORKDIR /root
|
||||
|
||||
# Define default command.
|
||||
CMD ["bash"]
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Ubuntu Dockerfile
|
||||
#
|
||||
# https://github.com/dockerfile/ubuntu
|
||||
#
|
||||
|
||||
# Pull base image.
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Install.
|
||||
RUN \
|
||||
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y git cmake qtbase5-dev build-essential libx11-dev libxtst-dev libgl1-mesa-dev libssl-dev libavahi-compat-libdnssd-dev && \
|
||||
apt-get install -y debhelper devscripts
|
||||
|
||||
# Set environment variables.
|
||||
ENV HOME /root
|
||||
|
||||
# Define working directory.
|
||||
WORKDIR /root
|
||||
|
||||
# Define default command.
|
||||
CMD ["bash"]
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Ubuntu Dockerfile
|
||||
#
|
||||
# https://github.com/dockerfile/ubuntu
|
||||
#
|
||||
|
||||
# Pull base image.
|
||||
FROM ubuntu:19.04
|
||||
|
||||
# Install.
|
||||
RUN \
|
||||
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y git cmake qtbase5-dev build-essential libx11-dev libxtst-dev libgl1-mesa-dev libssl-dev libavahi-compat-libdnssd-dev && \
|
||||
apt-get install -y debhelper devscripts
|
||||
|
||||
# Set environment variables.
|
||||
ENV HOME /root
|
||||
|
||||
# Define working directory.
|
||||
WORKDIR /root
|
||||
|
||||
# Define default command.
|
||||
CMD ["bash"]
|
|
@ -15,12 +15,18 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
cmake_minimum_required (VERSION 3.4)
|
||||
project (synergy C CXX)
|
||||
project (synergy-core C CXX)
|
||||
|
||||
option (SYNERGY_BUILD_LEGACY_GUI "Build the legacy GUI" ON)
|
||||
option (SYNERGY_BUILD_LEGACY_SERVICE "Build the legacy service (synergyd)" ON)
|
||||
option (SYNERGY_BUILD_LEGACY_INSTALLER "Build the legacy installer" ON)
|
||||
|
||||
if (DEFINED ENV{SYNERGY_ENTERPRISE})
|
||||
option (SYNERGY_ENTERPRISE "Build Enterprise" ON)
|
||||
else()
|
||||
option (SYNERGY_ENTERPRISE "Build Enterprise" OFF)
|
||||
endif()
|
||||
|
||||
set (CMAKE_CXX_STANDARD 14)
|
||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
@ -130,13 +136,6 @@ if (UNIX)
|
|||
message (FATAL_ERROR "Missing library: pthread")
|
||||
endif()
|
||||
|
||||
# curl is used on both Linux and Mac
|
||||
find_package (CURL)
|
||||
if (CURL_FOUND)
|
||||
list (APPEND libs curl)
|
||||
else()
|
||||
message (FATAL_ERROR "Missing library: curl")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
set (CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
|
@ -337,6 +336,23 @@ macro (configure_files srcDir destDir)
|
|||
endforeach (templateFile)
|
||||
endmacro (configure_files)
|
||||
|
||||
macro(generate_versionfile)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
FILE(WRITE ${CMAKE_BINARY_DIR}/version
|
||||
"export SYNERGY_VERSION_MAJOR=\"${SYNERGY_VERSION_MAJOR}\"\n"
|
||||
"export SYNERGY_VERSION_MINOR=\"${SYNERGY_VERSION_MINOR}\"\n"
|
||||
"export SYNERGY_VERSION_PATCH=\"${SYNERGY_VERSION_PATCH}\"\n"
|
||||
"export SYNERGY_VERSION_STAGE=\"${SYNERGY_VERSION_STAGE}\"\n")
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
FILE(WRITE ${CMAKE_BINARY_DIR}/version
|
||||
"$env:SYNERGY_VERSION_MAJOR=\"${SYNERGY_VERSION_MAJOR}\"\n"
|
||||
"$env:SYNERGY_VERSION_MINOR=\"${SYNERGY_VERSION_MINOR}\"\n"
|
||||
"$env:SYNERGY_VERSION_PATCH=\"${SYNERGY_VERSION_PATCH}\"\n"
|
||||
"$env:SYNERGY_VERSION_STAGE=\"${SYNERGY_VERSION_STAGE}\"\n")
|
||||
endif()
|
||||
endmacro(generate_versionfile)
|
||||
|
||||
|
||||
if (${SYNERGY_BUILD_LEGACY_INSTALLER})
|
||||
#
|
||||
# macOS app Bundle
|
||||
|
@ -347,7 +363,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
set (SYNERGY_BUNDLE_DIR ${CMAKE_BINARY_DIR}/bundle)
|
||||
set (SYNERGY_BUNDLE_APP_DIR ${SYNERGY_BUNDLE_DIR}/Synergy.app)
|
||||
set (SYNERGY_BUNDLE_BINARY_DIR ${SYNERGY_BUNDLE_APP_DIR}/Contents/MacOS)
|
||||
|
||||
|
||||
generate_versionfile()
|
||||
configure_files (${SYNERGY_BUNDLE_SOURCE_DIR} ${SYNERGY_BUNDLE_DIR})
|
||||
endif()
|
||||
|
||||
|
@ -357,6 +374,7 @@ endif()
|
|||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
message (STATUS "Configuring the v1 installer")
|
||||
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/wix ${CMAKE_BINARY_DIR}/installer)
|
||||
generate_versionfile()
|
||||
endif()
|
||||
|
||||
#
|
||||
|
@ -370,6 +388,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||
else()
|
||||
install(FILES res/synergy.desktop DESTINATION share/applications)
|
||||
endif()
|
||||
generate_versionfile()
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
|
99
ChangeLog
99
ChangeLog
|
@ -1,21 +1,91 @@
|
|||
v1.9.0-rc3
|
||||
============
|
||||
Bug #4132 - Laggy mouse cursor on macOS clients
|
||||
v1.10.2-rc2
|
||||
==============
|
||||
|
||||
v1.9.0-rc2
|
||||
===========
|
||||
Bug #5901 - Stored serial key corrupted on macOS
|
||||
Bug #5757 - Failure to build against OpenSSL v1.1.0
|
||||
Bug fixes:
|
||||
- #6495 Event queue memory leak in server cleanup
|
||||
- #6471 Unable to stop core retry loop in config app
|
||||
- #6460 TLS memory leak on Linux server when using client
|
||||
- #6407 Enterprise config app shows auto-config elements
|
||||
- #6403 Mouse cursor movement drifts over time
|
||||
- #6392 Hostname alert shows unnecessarily on every open
|
||||
- #6373 Compile fails on BSD Unix with dl error
|
||||
|
||||
v1.9.0-rc1
|
||||
==========
|
||||
Bug #5467 - Failing to automatically download and install Bonjour
|
||||
Enhancement #5389 - Ported GUI to Qt 5
|
||||
Enhancement #4978 - Windows: Added support for Visual Studio 2015
|
||||
Enhancement #5398 - Windows: Updated OpenSSL dependency to 1.0.2k
|
||||
Enhancements:
|
||||
- #6485 Readme for master branch with download help
|
||||
- #6475 Change master branch to current version
|
||||
- #6470 CI solution with on-demand containers
|
||||
- #6397 Remember last server used in Auto Config
|
||||
- #6375 Support for Qt 5.11 framework on Windows
|
||||
|
||||
v1.10.1-stable
|
||||
==============
|
||||
|
||||
Bug fixes:
|
||||
- #6339 Windows validating install step freezes
|
||||
- #6374 Windows background service crashes randomly
|
||||
- #6376 Undeclared identifier compile error in VS2017
|
||||
|
||||
Enhancements:
|
||||
- #6372 Forced use of TLS 1.2 without fallback method
|
||||
- #6338 Auto config checkbox on settings screen
|
||||
- #6384 Removal of GPL screen on Windows installer
|
||||
- #6383 Extend foreground mode for Windows daemon
|
||||
- #6382 Code comment for MSVC debugger logging
|
||||
- #6380 Compile without warnings using VS2017
|
||||
|
||||
v1.10.0-stable
|
||||
==============
|
||||
|
||||
Bug fixes:
|
||||
- #6347 Log to file defaults to unwritable location
|
||||
- #6345 Losing GUI config when restarting the OS
|
||||
- #4991 Oversized Bonjour protocol name could conflict
|
||||
|
||||
Enhancements:
|
||||
- #6348 Use different hard coded Qt path for CI
|
||||
- #6346 CLI argument to control screen lock feature
|
||||
- #6344 Customizable size limit on clipboard sharing
|
||||
- #6332 Decouple version from CI build properties
|
||||
- #6319 Bonjour auto-config disabled by default
|
||||
- #6318 Hide TIS/TSM error on config app log
|
||||
- #6312 Removal of redundant CURL library
|
||||
- #6306 Show version number in config app title
|
||||
- #6305 Support for Raspbian in package config
|
||||
- #6301 Combine enterprise and community codebases
|
||||
|
||||
v1.9.1-stable
|
||||
=============
|
||||
|
||||
Bug fix:
|
||||
- #5964 Can't click after sleep on Mac client
|
||||
|
||||
Enhancements:
|
||||
- #6310 More robust macOS screen shape detection
|
||||
- #6309 Update OpenSSL to v1.0.2o for better security
|
||||
|
||||
v1.9.0-stable
|
||||
=============
|
||||
|
||||
Bug fixes:
|
||||
- #6251 Service hangs after GUI is opened
|
||||
- #5844 Icon causes Linux package manager to fail
|
||||
- #4132 Laggy mouse cursor on macOS clients
|
||||
|
||||
Enhancements:
|
||||
- #6116 Quieter quartz event log entry on Mac
|
||||
- #6037 Solve defects reported by PVS Studio
|
||||
- #6014 Code sign binaries on Windows
|
||||
- #6012 Jenkins integration for Ubuntu
|
||||
- #5836 Jenkins integration for macOS
|
||||
- #5834 Jenkins integration for Fedora
|
||||
- #5390 Allow tests to be skipped during build
|
||||
- #5389 Qt 5 library support for config app
|
||||
- #5019 Raspbian armhf support for Raspberry Pi
|
||||
- #4978 Visual Studio 2015 support on Windows 10
|
||||
- #4154 IPv6 support for Windows and Linux
|
||||
|
||||
v1.8.8-stable
|
||||
==========
|
||||
=============
|
||||
Bug #5196 - Some keys on Korean and Japanese keyboards have the same keycode
|
||||
Bug #5578 - Pressing Hangul key results in alt+'a'
|
||||
Bug #5785 - Can't switch screens when cursor is in a corner
|
||||
|
@ -423,4 +493,3 @@ Feature #3119: Mac OS X secondary screen
|
|||
Task #2905: Unit tests: Clipboard classes
|
||||
Task #3072: Downgrade Linux build machines
|
||||
Task #3090: CXWindowsKeyState integ test args wrong
|
||||
|
||||
|
|
|
@ -3,37 +3,30 @@ cmake_minimum_required (VERSION 3.4)
|
|||
#
|
||||
# Synergy Version
|
||||
#
|
||||
if (NOT DEFINED SYNERGY_VERSION_MAJOR)
|
||||
if (DEFINED ENV{SYNERGY_VERSION_MAJOR})
|
||||
set (SYNERGY_VERSION_MAJOR $ENV{SYNERGY_VERSION_MAJOR})
|
||||
else()
|
||||
set (SYNERGY_VERSION_MAJOR 1)
|
||||
endif()
|
||||
|
||||
set (SYNERGY_VERSION_MAJOR 1)
|
||||
set (SYNERGY_VERSION_MINOR 10)
|
||||
set (SYNERGY_VERSION_PATCH 2)
|
||||
set (SYNERGY_VERSION_STAGE "rc2")
|
||||
|
||||
#
|
||||
# Version from CI
|
||||
#
|
||||
|
||||
if (DEFINED ENV{SYNERGY_VERSION_MAJOR})
|
||||
set (SYNERGY_VERSION_MAJOR $ENV{SYNERGY_VERSION_MAJOR})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED SYNERGY_VERSION_MINOR)
|
||||
if (DEFINED ENV{SYNERGY_VERSION_MINOR})
|
||||
set (SYNERGY_VERSION_MINOR $ENV{SYNERGY_VERSION_MINOR})
|
||||
else()
|
||||
set (SYNERGY_VERSION_MINOR 9)
|
||||
endif()
|
||||
if (DEFINED ENV{SYNERGY_VERSION_MINOR})
|
||||
set (SYNERGY_VERSION_MINOR $ENV{SYNERGY_VERSION_MINOR})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED SYNERGY_VERSION_PATCH)
|
||||
if (DEFINED ENV{SYNERGY_VERSION_PATCH})
|
||||
set (SYNERGY_VERSION_PATCH $ENV{SYNERGY_VERSION_PATCH})
|
||||
else()
|
||||
set (SYNERGY_VERSION_PATCH 0)
|
||||
message (WARNING "Synergy version wasn't set. Set to ${SYNERGY_VERSION_MAJOR}.${SYNERGY_VERSION_MINOR}.${SYNERGY_VERSION_PATCH}")
|
||||
endif()
|
||||
if (DEFINED ENV{SYNERGY_VERSION_PATCH})
|
||||
set (SYNERGY_VERSION_PATCH $ENV{SYNERGY_VERSION_PATCH})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED SYNERGY_VERSION_STAGE)
|
||||
if (DEFINED ENV{SYNERGY_VERSION_STAGE})
|
||||
set (SYNERGY_VERSION_STAGE $ENV{SYNERGY_VERSION_STAGE})
|
||||
else()
|
||||
set (SYNERGY_VERSION_STAGE "snapshot")
|
||||
endif()
|
||||
if (DEFINED ENV{SYNERGY_VERSION_STAGE})
|
||||
set (SYNERGY_VERSION_STAGE $ENV{SYNERGY_VERSION_STAGE})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED SYNERGY_REVISION)
|
||||
|
@ -88,3 +81,6 @@ if (SYNERGY_DEVELOPER_MODE)
|
|||
add_definitions (-DSYNERGY_DEVELOPER_MODE=1)
|
||||
endif()
|
||||
|
||||
if (SYNERGY_ENTERPRISE)
|
||||
add_definitions (-DSYNERGY_ENTERPRISE=1)
|
||||
endif()
|
||||
|
|
|
@ -6,7 +6,7 @@ Homepage: https://www.symless.com/
|
|||
Maintainer: Symless <engineering@symless.com>
|
||||
|
||||
Package: synergy
|
||||
Architecture: amd64
|
||||
Architecture: any
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: ${shlibs:Depends},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Include>
|
||||
<?define Name="Synergy" ?>
|
||||
<?define Version="@SYNERGY_VERSION@" ?>
|
||||
<?define QtVersion="5.9.3" ?> <!-- TODO: Configure this externally //-->
|
||||
<?define QtVersion="5.9.5" ?> <!-- TODO: Configure this externally //-->
|
||||
<?define Author="Symless Ltd" ?>
|
||||
<?define BinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/$(var.Configuration)" ?>
|
||||
<?define ResPath="@CMAKE_CURRENT_SOURCE_DIR@/res" ?>
|
||||
|
@ -11,12 +11,12 @@
|
|||
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
|
||||
<?define PlatformSimpleName="64-bit" ?>
|
||||
<?define UpgradeGuid="E8A4FA54-14B9-4FD1-8E00-7BC46555FDA0" ?>
|
||||
<?define QtPath="C:\Qt\$(var.QtVersion)\msvc2015_64" ?>
|
||||
<?define QtPath="C:\Qt\Qt$(var.QtVersion)\$(var.QtVersion)\msvc2015_64" ?>
|
||||
<?else ?>
|
||||
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
|
||||
<?define PlatformSimpleName="32-bit" ?>
|
||||
<?define UpgradeGuid="BE0B9FD8-45E2-4A8E-A0D8-1F774D074A78" ?>
|
||||
<?define QtPath="C:\Qt\$(var.QtVersion)\msvc2015" ?>
|
||||
<?define QtPath="C:\Qt\Qt$(var.QtVersion)\$(var.QtVersion)\msvc2015" ?>
|
||||
<?endif ?>
|
||||
<?define QtBinPath="$(var.QtPath)\bin" ?>
|
||||
<?define QtPlatformPath="$(var.QtPath)\plugins\platforms" ?>
|
||||
|
|
|
@ -22,20 +22,30 @@
|
|||
</Feature>
|
||||
<DirectoryRef Id="TARGETDIR">
|
||||
<Component Guid="7CF3564D-1F8E-4D3D-9781-E1EE22D5BD67" Id="RegistryEntries">
|
||||
<RegistryKey ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" Root="HKLM">
|
||||
<RegistryKey Id="synergys" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" Root="HKLM">
|
||||
<RegistryValue Name="[INSTALLFOLDER]synergys.exe" Type="string" Value="~ HIGHDPIAWARE WIN7RTM"/>
|
||||
</RegistryKey>
|
||||
|
||||
<RegistryKey Id="synergyc" Root="HKLM"
|
||||
Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
|
||||
Action="createAndRemoveOnUninstall">
|
||||
<RegistryValue Type="string" Name="[INSTALLFOLDER]synergyc.exe" Value="~ HIGHDPIAWARE WIN7RTM"/>
|
||||
</RegistryKey>
|
||||
|
||||
<RegistryKey Id="synergy" Root="HKLM"
|
||||
Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
|
||||
Action="createAndRemoveOnUninstall">
|
||||
<RegistryValue Type="string" Name="[INSTALLFOLDER]synergy.exe" Value="~ HIGHDPIAWARE WIN7RTM"/>
|
||||
</RegistryKey>
|
||||
<!-- Windows 8 and later only -->
|
||||
<Condition><![CDATA[Installed OR (VersionNT >= 602)]]></Condition>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
<Icon Id="synergy.ico" SourceFile="$(var.ResPath)/synergy.ico"/>
|
||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.ResPath)\License.rtf"/>
|
||||
<WixVariable Id="WixUIBannerBmp" Value="$(var.ResPath)\banner.bmp"/>
|
||||
<WixVariable Id="WixUIDialogBmp" Value="$(var.ResPath)\dialog.bmp"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="synergy.ico"/>
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
|
||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
|
||||
<Property Id="LEGACY_UNINSTALL_EXISTS">
|
||||
<RegistrySearch Id="LegacyRegistrySearch" Key="SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Synergy" Name="UninstallString" Root="HKLM" Type="file" Win64="no">
|
||||
<FileSearch Id="LegacyFileSearch" Name="uninstall.exe"/>
|
||||
|
@ -45,6 +55,17 @@
|
|||
</Condition>
|
||||
<CustomAction ExeCommand="" FileKey="GuiProgram" Id="StartGui" Return="asyncNoWait"/>
|
||||
<UI>
|
||||
<UIRef Id="WixUI_InstallDir" />
|
||||
<Publish Dialog="WelcomeDlg"
|
||||
Control="Next"
|
||||
Event="NewDialog"
|
||||
Value="InstallDirDlg"
|
||||
Order="2">1</Publish>
|
||||
<Publish Dialog="InstallDirDlg"
|
||||
Control="Back"
|
||||
Event="NewDialog"
|
||||
Value="WelcomeDlg"
|
||||
Order="2">1</Publish>
|
||||
<Publish Control="Finish" Dialog="ExitDialog" Event="DoAction" Value="StartGui">NOT Installed</Publish>
|
||||
</UI>
|
||||
</Product>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1365,6 +1365,7 @@ void ERR_load_ASN1_strings(void);
|
|||
# define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
||||
# define ASN1_R_MSTRING_WRONG_TAG 140
|
||||
# define ASN1_R_NESTED_ASN1_STRING 197
|
||||
# define ASN1_R_NESTED_TOO_DEEP 219
|
||||
# define ASN1_R_NON_HEX_CHARACTERS 141
|
||||
# define ASN1_R_NOT_ASCII_FORMAT 190
|
||||
# define ASN1_R_NOT_ENOUGH_DATA 142
|
||||
|
|
|
@ -257,11 +257,13 @@ DH *DH_get_1024_160(void);
|
|||
DH *DH_get_2048_224(void);
|
||||
DH *DH_get_2048_256(void);
|
||||
|
||||
# ifndef OPENSSL_NO_CMS
|
||||
/* RFC2631 KDF */
|
||||
int DH_KDF_X9_42(unsigned char *out, size_t outlen,
|
||||
const unsigned char *Z, size_t Zlen,
|
||||
ASN1_OBJECT *key_oid,
|
||||
const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
|
||||
# endif
|
||||
|
||||
# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
|
||||
|
|
|
@ -1363,6 +1363,98 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
|
|||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pinit) (EVP_PKEY_CTX *ctx));
|
||||
|
||||
void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pcopy) (EVP_PKEY_CTX *dst,
|
||||
EVP_PKEY_CTX *src));
|
||||
|
||||
void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
|
||||
void (**pcleanup) (EVP_PKEY_CTX *ctx));
|
||||
|
||||
void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pparamgen) (EVP_PKEY_CTX *ctx,
|
||||
EVP_PKEY *pkey));
|
||||
|
||||
void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pkeygen) (EVP_PKEY_CTX *ctx,
|
||||
EVP_PKEY *pkey));
|
||||
|
||||
void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
|
||||
int (**psign_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**psign) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pverify_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pverify) (EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
size_t siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pverify_recover_init) (EVP_PKEY_CTX
|
||||
*ctx),
|
||||
int (**pverify_recover) (EVP_PKEY_CTX
|
||||
*ctx,
|
||||
unsigned char
|
||||
*sig,
|
||||
size_t *siglen,
|
||||
const unsigned
|
||||
char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
|
||||
int (**psignctx_init) (EVP_PKEY_CTX *ctx,
|
||||
EVP_MD_CTX *mctx),
|
||||
int (**psignctx) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig,
|
||||
size_t *siglen,
|
||||
EVP_MD_CTX *mctx));
|
||||
|
||||
void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
|
||||
EVP_MD_CTX *mctx),
|
||||
int (**pverifyctx) (EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
int siglen,
|
||||
EVP_MD_CTX *mctx));
|
||||
|
||||
void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pencryptfn) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out,
|
||||
size_t *outlen,
|
||||
const unsigned char *in,
|
||||
size_t inlen));
|
||||
|
||||
void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pdecrypt) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out,
|
||||
size_t *outlen,
|
||||
const unsigned char *in,
|
||||
size_t inlen));
|
||||
|
||||
void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pderive_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pderive) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *key,
|
||||
size_t *keylen));
|
||||
|
||||
void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
|
||||
void *p2),
|
||||
int (**pctrl_str) (EVP_PKEY_CTX *ctx,
|
||||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_add_alg_module(void);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
|
|
|
@ -30,11 +30,11 @@ extern "C" {
|
|||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x100020cfL
|
||||
# define OPENSSL_VERSION_NUMBER 0x100020ffL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l-fips 25 May 2017"
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2o-fips 27 Mar 2018"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l 25 May 2017"
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2o 27 Mar 2018"
|
||||
# endif
|
||||
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
|
|
@ -1727,7 +1727,7 @@ extern "C" {
|
|||
# define SSL_ST_BEFORE 0x4000
|
||||
# define SSL_ST_OK 0x03
|
||||
# define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT)
|
||||
# define SSL_ST_ERR 0x05
|
||||
# define SSL_ST_ERR (0x05|SSL_ST_INIT)
|
||||
|
||||
# define SSL_CB_LOOP 0x01
|
||||
# define SSL_CB_EXIT 0x02
|
||||
|
|
|
@ -280,6 +280,8 @@
|
|||
# define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf
|
||||
# undef EVP_PKEY_meth_set_verify_recover
|
||||
# define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover
|
||||
# undef EVP_PKEY_meth_get_verify_recover
|
||||
# define EVP_PKEY_meth_get_verify_recover EVP_PKEY_meth_get_vrfy_recover
|
||||
|
||||
/* Hack some long EC names */
|
||||
# undef EC_GROUP_set_point_conversion_form
|
||||
|
|
|
@ -317,7 +317,7 @@ int SSL_get_servername_type(const SSL *s);
|
|||
*/
|
||||
int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
|
||||
const char *label, size_t llen,
|
||||
const unsigned char *p, size_t plen,
|
||||
const unsigned char *context, size_t contextlen,
|
||||
int use_context);
|
||||
|
||||
int SSL_get_sigalgs(SSL *s, int idx,
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1365,6 +1365,7 @@ void ERR_load_ASN1_strings(void);
|
|||
# define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
||||
# define ASN1_R_MSTRING_WRONG_TAG 140
|
||||
# define ASN1_R_NESTED_ASN1_STRING 197
|
||||
# define ASN1_R_NESTED_TOO_DEEP 219
|
||||
# define ASN1_R_NON_HEX_CHARACTERS 141
|
||||
# define ASN1_R_NOT_ASCII_FORMAT 190
|
||||
# define ASN1_R_NOT_ENOUGH_DATA 142
|
||||
|
|
|
@ -257,11 +257,13 @@ DH *DH_get_1024_160(void);
|
|||
DH *DH_get_2048_224(void);
|
||||
DH *DH_get_2048_256(void);
|
||||
|
||||
# ifndef OPENSSL_NO_CMS
|
||||
/* RFC2631 KDF */
|
||||
int DH_KDF_X9_42(unsigned char *out, size_t outlen,
|
||||
const unsigned char *Z, size_t Zlen,
|
||||
ASN1_OBJECT *key_oid,
|
||||
const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
|
||||
# endif
|
||||
|
||||
# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
|
||||
|
|
|
@ -1363,6 +1363,98 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
|
|||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pinit) (EVP_PKEY_CTX *ctx));
|
||||
|
||||
void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pcopy) (EVP_PKEY_CTX *dst,
|
||||
EVP_PKEY_CTX *src));
|
||||
|
||||
void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
|
||||
void (**pcleanup) (EVP_PKEY_CTX *ctx));
|
||||
|
||||
void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pparamgen) (EVP_PKEY_CTX *ctx,
|
||||
EVP_PKEY *pkey));
|
||||
|
||||
void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pkeygen) (EVP_PKEY_CTX *ctx,
|
||||
EVP_PKEY *pkey));
|
||||
|
||||
void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
|
||||
int (**psign_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**psign) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pverify_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pverify) (EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
size_t siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pverify_recover_init) (EVP_PKEY_CTX
|
||||
*ctx),
|
||||
int (**pverify_recover) (EVP_PKEY_CTX
|
||||
*ctx,
|
||||
unsigned char
|
||||
*sig,
|
||||
size_t *siglen,
|
||||
const unsigned
|
||||
char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
|
||||
int (**psignctx_init) (EVP_PKEY_CTX *ctx,
|
||||
EVP_MD_CTX *mctx),
|
||||
int (**psignctx) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig,
|
||||
size_t *siglen,
|
||||
EVP_MD_CTX *mctx));
|
||||
|
||||
void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
|
||||
EVP_MD_CTX *mctx),
|
||||
int (**pverifyctx) (EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
int siglen,
|
||||
EVP_MD_CTX *mctx));
|
||||
|
||||
void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pencryptfn) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out,
|
||||
size_t *outlen,
|
||||
const unsigned char *in,
|
||||
size_t inlen));
|
||||
|
||||
void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pdecrypt) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out,
|
||||
size_t *outlen,
|
||||
const unsigned char *in,
|
||||
size_t inlen));
|
||||
|
||||
void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pderive_init) (EVP_PKEY_CTX *ctx),
|
||||
int (**pderive) (EVP_PKEY_CTX *ctx,
|
||||
unsigned char *key,
|
||||
size_t *keylen));
|
||||
|
||||
void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
|
||||
int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
|
||||
void *p2),
|
||||
int (**pctrl_str) (EVP_PKEY_CTX *ctx,
|
||||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_add_alg_module(void);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
|
|
|
@ -30,11 +30,11 @@ extern "C" {
|
|||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x100020cfL
|
||||
# define OPENSSL_VERSION_NUMBER 0x100020ffL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l-fips 25 May 2017"
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2o-fips 27 Mar 2018"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2l 25 May 2017"
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2o 27 Mar 2018"
|
||||
# endif
|
||||
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
|
|
@ -1727,7 +1727,7 @@ extern "C" {
|
|||
# define SSL_ST_BEFORE 0x4000
|
||||
# define SSL_ST_OK 0x03
|
||||
# define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT)
|
||||
# define SSL_ST_ERR 0x05
|
||||
# define SSL_ST_ERR (0x05|SSL_ST_INIT)
|
||||
|
||||
# define SSL_CB_LOOP 0x01
|
||||
# define SSL_CB_EXIT 0x02
|
||||
|
|
|
@ -280,6 +280,8 @@
|
|||
# define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf
|
||||
# undef EVP_PKEY_meth_set_verify_recover
|
||||
# define EVP_PKEY_meth_set_verify_recover EVP_PKEY_meth_set_vrfy_recover
|
||||
# undef EVP_PKEY_meth_get_verify_recover
|
||||
# define EVP_PKEY_meth_get_verify_recover EVP_PKEY_meth_get_vrfy_recover
|
||||
|
||||
/* Hack some long EC names */
|
||||
# undef EC_GROUP_set_point_conversion_form
|
||||
|
|
|
@ -317,7 +317,7 @@ int SSL_get_servername_type(const SSL *s);
|
|||
*/
|
||||
int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
|
||||
const char *label, size_t llen,
|
||||
const unsigned char *p, size_t plen,
|
||||
const unsigned char *context, size_t contextlen,
|
||||
int use_context);
|
||||
|
||||
int SSL_get_sigalgs(SSL *s, int idx,
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -8,6 +8,14 @@ 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)
|
||||
set (LEGACY_GUI_RC_FILES res/win/Synergy.rc)
|
||||
|
@ -23,21 +31,32 @@ 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)
|
||||
find_library (DNSSD_LIB dnssd.lib
|
||||
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)
|
||||
target_link_libraries (synergy ${DNSSD_LIB})
|
||||
endif ()
|
||||
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -54,5 +54,6 @@
|
|||
<file>image/spinning-wheel.gif</file>
|
||||
<file>icons/16x16/padlock.png</file>
|
||||
<file>icons/16x16/synergy-transfering.png</file>
|
||||
<file>icons/16x16/auto-config.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 610 B |
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include <QButtonGroup>
|
||||
|
||||
ActionDialog::ActionDialog(QWidget* parent, ServerConfig& config, Hotkey& hotkey, Action& action) :
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include "ui_ActivationDialog.h"
|
||||
#include "CancelActivationDialog.h"
|
||||
#include "AppConfig.h"
|
||||
#include "WebClient.h"
|
||||
#include <shared/EditionType.h>
|
||||
#include "ActivationNotifier.h"
|
||||
#include "MainWindow.h"
|
||||
|
|
|
@ -40,21 +40,10 @@ void ActivationNotifier::setUpdateInfo(QString const& fromVersion,
|
|||
|
||||
void ActivationNotifier::notify()
|
||||
{
|
||||
CoreInterface coreInterface;
|
||||
try {
|
||||
coreInterface.notifyActivation(m_Identity);
|
||||
}
|
||||
catch (...) {
|
||||
// catch all exceptions and fails silently
|
||||
}
|
||||
// TODO: use something other than CURL
|
||||
}
|
||||
|
||||
void ActivationNotifier::notifyUpdate()
|
||||
{
|
||||
try {
|
||||
CoreInterface coreInterface;
|
||||
coreInterface.notifyUpdate(m_fromVersion, m_toVersion,
|
||||
m_serialKey);
|
||||
} catch (...) {
|
||||
}
|
||||
// TODO: use something other than CURL
|
||||
}
|
||||
|
|
|
@ -38,9 +38,6 @@ const ElevateMode defaultElevateMode = ElevateAsNeeded;
|
|||
|
||||
static const char* logLevelNames[] =
|
||||
{
|
||||
"ERROR",
|
||||
"WARNING",
|
||||
"NOTE",
|
||||
"INFO",
|
||||
"DEBUG",
|
||||
"DEBUG1",
|
||||
|
@ -57,10 +54,10 @@ AppConfig::AppConfig(QSettings* settings) :
|
|||
m_ProcessMode(DEFAULT_PROCESS_MODE),
|
||||
m_AutoConfig(true),
|
||||
m_ElevateMode(defaultElevateMode),
|
||||
m_AutoConfigPrompted(false),
|
||||
m_CryptoEnabled(false),
|
||||
m_AutoHide(false),
|
||||
m_LastExpiringWarningTime(0)
|
||||
m_LastExpiringWarningTime(0),
|
||||
m_AutoConfigServer()
|
||||
{
|
||||
Q_ASSERT(m_pSettings);
|
||||
|
||||
|
@ -86,13 +83,8 @@ const QString &AppConfig::logFilename() const { return m_LogFilename; }
|
|||
|
||||
QString AppConfig::synergyLogDir() const
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
// on windows, we want to log to program files
|
||||
return synergyProgramDir() + "log/";
|
||||
#else
|
||||
// on unix, we'll log to the standard log dir
|
||||
return "/var/log/";
|
||||
#endif
|
||||
// by default log to home dir
|
||||
return QDir::home().absolutePath() + "/";
|
||||
}
|
||||
|
||||
QString AppConfig::synergyProgramDir() const
|
||||
|
@ -135,27 +127,36 @@ const QString &AppConfig::language() const { return m_Language; }
|
|||
|
||||
bool AppConfig::startedBefore() const { return m_StartedBefore; }
|
||||
|
||||
bool AppConfig::autoConfig() const { return m_AutoConfig; }
|
||||
bool AppConfig::autoConfig() const {
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
return m_AutoConfig;
|
||||
#else
|
||||
// always disable auto config for enterprise edition.
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
QString AppConfig::autoConfigServer() const { return m_AutoConfigServer; }
|
||||
|
||||
void AppConfig::loadSettings()
|
||||
{
|
||||
m_ScreenName = settings().value("screenName", QHostInfo::localHostName()).toString();
|
||||
m_Port = settings().value("port", 24800).toInt();
|
||||
m_Interface = settings().value("interface").toString();
|
||||
m_LogLevel = settings().value("logLevel", 3).toInt(); // level 3: INFO
|
||||
m_LogLevel = settings().value("logLevel2", 0).toInt(); // level 0: INFO
|
||||
m_LogToFile = settings().value("logToFile", false).toBool();
|
||||
m_LogFilename = settings().value("logFilename", synergyLogDir() + "synergy.log").toString();
|
||||
m_WizardLastRun = settings().value("wizardLastRun", 0).toInt();
|
||||
m_Language = settings().value("language", QLocale::system().name()).toString();
|
||||
m_StartedBefore = settings().value("startedBefore", false).toBool();
|
||||
m_AutoConfig = settings().value("autoConfig", true).toBool();
|
||||
m_AutoConfig = settings().value("autoConfig", false).toBool();
|
||||
m_AutoConfigServer = settings().value("autoConfigServer", "").toString();
|
||||
QVariant elevateMode = settings().value("elevateModeEnum");
|
||||
if (!elevateMode.isValid()) {
|
||||
elevateMode = settings().value ("elevateMode",
|
||||
QVariant(static_cast<int>(defaultElevateMode)));
|
||||
}
|
||||
m_ElevateMode = static_cast<ElevateMode>(elevateMode.toInt());
|
||||
m_AutoConfigPrompted = settings().value("autoConfigPrompted", false).toBool();
|
||||
m_Edition = static_cast<Edition>(settings().value("edition", kUnregistered).toInt());
|
||||
m_ActivateEmail = settings().value("activateEmail", "").toString();
|
||||
m_CryptoEnabled = settings().value("cryptoEnabled", true).toBool();
|
||||
|
@ -171,18 +172,18 @@ void AppConfig::saveSettings()
|
|||
settings().setValue("screenName", m_ScreenName);
|
||||
settings().setValue("port", m_Port);
|
||||
settings().setValue("interface", m_Interface);
|
||||
settings().setValue("logLevel", m_LogLevel);
|
||||
settings().setValue("logLevel2", m_LogLevel);
|
||||
settings().setValue("logToFile", m_LogToFile);
|
||||
settings().setValue("logFilename", m_LogFilename);
|
||||
settings().setValue("wizardLastRun", kWizardVersion);
|
||||
settings().setValue("language", m_Language);
|
||||
settings().setValue("startedBefore", m_StartedBefore);
|
||||
settings().setValue("autoConfig", m_AutoConfig);
|
||||
settings().setValue("autoConfigServer", m_AutoConfigServer);
|
||||
// Refer to enum ElevateMode declaration for insight in to why this
|
||||
// flag is mapped this way
|
||||
settings().setValue("elevateMode", m_ElevateMode == ElevateAlways);
|
||||
settings().setValue("elevateModeEnum", static_cast<int>(m_ElevateMode));
|
||||
settings().setValue("autoConfigPrompted", m_AutoConfigPrompted);
|
||||
settings().setValue("edition", m_Edition);
|
||||
settings().setValue("cryptoEnabled", m_CryptoEnabled);
|
||||
settings().setValue("autoHide", m_AutoHide);
|
||||
|
@ -193,6 +194,7 @@ void AppConfig::saveSettings()
|
|||
settings().sync();
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
bool AppConfig::activationHasRun() const
|
||||
{
|
||||
return m_ActivationHasRun;
|
||||
|
@ -203,6 +205,7 @@ AppConfig& AppConfig::activationHasRun(bool value)
|
|||
m_ActivationHasRun = value;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
QString AppConfig::lastVersion() const
|
||||
{
|
||||
|
@ -240,13 +243,12 @@ void AppConfig::setAutoConfig(bool autoConfig)
|
|||
m_AutoConfig = autoConfig;
|
||||
}
|
||||
|
||||
bool AppConfig::autoConfigPrompted() { return m_AutoConfigPrompted; }
|
||||
|
||||
void AppConfig::setAutoConfigPrompted(bool prompted)
|
||||
void AppConfig::setAutoConfigServer(QString autoConfigServer)
|
||||
{
|
||||
m_AutoConfigPrompted = prompted;
|
||||
m_AutoConfigServer = autoConfigServer;
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
void AppConfig::setEdition(Edition e) {
|
||||
m_Edition = e;
|
||||
}
|
||||
|
@ -269,6 +271,7 @@ QString AppConfig::serialKey() { return m_Serialkey; }
|
|||
int AppConfig::lastExpiringWarningTime() const { return m_LastExpiringWarningTime; }
|
||||
|
||||
void AppConfig::setLastExpiringWarningTime(int t) { m_LastExpiringWarningTime = t; }
|
||||
#endif
|
||||
|
||||
QString AppConfig::synergysName() const { return m_SynergysName; }
|
||||
|
||||
|
@ -285,7 +288,11 @@ void AppConfig::setCryptoEnabled(bool e) {
|
|||
}
|
||||
|
||||
bool AppConfig::getCryptoEnabled() const {
|
||||
return (edition() == kPro) && m_CryptoEnabled;
|
||||
return
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
(edition() == kPro) &&
|
||||
#endif
|
||||
m_CryptoEnabled;
|
||||
}
|
||||
|
||||
void AppConfig::setAutoHide(bool b) { m_AutoHide = b; }
|
||||
|
|
|
@ -77,8 +77,9 @@ class AppConfig: public QObject
|
|||
bool startedBefore() const;
|
||||
bool autoConfig() const;
|
||||
void setAutoConfig(bool autoConfig);
|
||||
bool autoConfigPrompted();
|
||||
void setAutoConfigPrompted(bool prompted);
|
||||
QString autoConfigServer() const;
|
||||
void setAutoConfigServer(QString autoConfigServer);
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
void setEdition(Edition);
|
||||
Edition edition() const;
|
||||
QString setSerialKey(QString serial);
|
||||
|
@ -86,6 +87,7 @@ class AppConfig: public QObject
|
|||
QString serialKey();
|
||||
int lastExpiringWarningTime() const;
|
||||
void setLastExpiringWarningTime(int t);
|
||||
#endif
|
||||
|
||||
QString synergysName() const;
|
||||
QString synergycName() const;
|
||||
|
@ -101,9 +103,10 @@ class AppConfig: public QObject
|
|||
|
||||
void setAutoHide(bool b);
|
||||
bool getAutoHide();
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
bool activationHasRun() const;
|
||||
AppConfig& activationHasRun(bool value);
|
||||
#endif
|
||||
|
||||
QString lastVersion() const;
|
||||
|
||||
|
@ -137,8 +140,8 @@ protected:
|
|||
QString m_Language;
|
||||
bool m_StartedBefore;
|
||||
bool m_AutoConfig;
|
||||
QString m_AutoConfigServer;
|
||||
ElevateMode m_ElevateMode;
|
||||
bool m_AutoConfigPrompted;
|
||||
Edition m_Edition;
|
||||
QString m_ActivateEmail;
|
||||
bool m_CryptoEnabled;
|
||||
|
|
|
@ -0,0 +1,203 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2018 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
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "BonjourWindows.h"
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include "DataDownloader.h"
|
||||
#include "QUtility.h"
|
||||
#include "CommandProcess.h"
|
||||
|
||||
#include <QUrl>
|
||||
#include <QThread>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
#include <QMessageBox>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
BonjourWindows::BonjourWindows(
|
||||
SettingsDialog* settingsDialog,
|
||||
MainWindow* mainWindow,
|
||||
AppConfig& appConfig) :
|
||||
m_pSettingsDialog(settingsDialog),
|
||||
m_pMainWindow(mainWindow),
|
||||
m_pBonjourInstall(nullptr),
|
||||
m_pDownloadMessageBox(nullptr),
|
||||
m_pDataDownloader(nullptr),
|
||||
m_appConfig(appConfig)
|
||||
{
|
||||
}
|
||||
|
||||
BonjourWindows::~BonjourWindows()
|
||||
{
|
||||
if (m_pBonjourInstall != nullptr) {
|
||||
delete m_pBonjourInstall;
|
||||
}
|
||||
|
||||
if (m_pDownloadMessageBox != nullptr) {
|
||||
delete m_pDownloadMessageBox;
|
||||
}
|
||||
|
||||
if (m_pDataDownloader != nullptr) {
|
||||
delete m_pDataDownloader;
|
||||
}
|
||||
}
|
||||
|
||||
void BonjourWindows::downloadAndInstall()
|
||||
{
|
||||
QUrl url;
|
||||
int arch = getProcessorArch();
|
||||
if (arch == kProcessorArchWin32) {
|
||||
url.setUrl(bonjourBaseUrl + bonjourFilename32);
|
||||
m_pMainWindow->appendLogInfo("downloading bonjour (32-bit)");
|
||||
}
|
||||
else if (arch == kProcessorArchWin64) {
|
||||
url.setUrl(bonjourBaseUrl + bonjourFilename64);
|
||||
m_pMainWindow->appendLogInfo("downloading bonjour (64-bit)");
|
||||
}
|
||||
else {
|
||||
QMessageBox::critical(
|
||||
m_pSettingsDialog, tr("Synergy Auto Config"),
|
||||
tr("Failed to detect system architecture."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pDataDownloader == nullptr) {
|
||||
m_pDataDownloader = new DataDownloader(this);
|
||||
connect(m_pDataDownloader, SIGNAL(isComplete()), SLOT(downloadFinished()));
|
||||
}
|
||||
|
||||
m_pDataDownloader->download(url);
|
||||
|
||||
if (m_pDownloadMessageBox != nullptr) {
|
||||
delete m_pDownloadMessageBox;
|
||||
m_pDownloadMessageBox = nullptr;
|
||||
}
|
||||
|
||||
m_pDownloadMessageBox = new QMessageBox(m_pSettingsDialog);
|
||||
m_pDownloadMessageBox->setWindowTitle("Synergy Auto Config");
|
||||
m_pDownloadMessageBox->setIcon(QMessageBox::Information);
|
||||
m_pDownloadMessageBox->setText("Installing Bonjour, please wait...");
|
||||
QAbstractButton* cancel = m_pDownloadMessageBox->addButton(
|
||||
tr("Cancel"), QMessageBox::RejectRole);
|
||||
|
||||
m_pDownloadMessageBox->exec();
|
||||
|
||||
if (cancel == m_pDownloadMessageBox->clickedButton()) {
|
||||
m_pDataDownloader->cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void BonjourWindows::downloadFinished()
|
||||
{
|
||||
m_pMainWindow->appendLogInfo("bonjour downloaded");
|
||||
install();
|
||||
}
|
||||
|
||||
void BonjourWindows::install()
|
||||
{
|
||||
m_pMainWindow->appendLogInfo("installing bonjour");
|
||||
|
||||
QString tempLocation = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||
|
||||
QString filename = tempLocation;
|
||||
filename.append("\\").append(bonjourTargetFilename);
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
m_pDownloadMessageBox->hide();
|
||||
|
||||
QMessageBox::warning(
|
||||
m_pSettingsDialog, "Synergy",
|
||||
tr("Failed to download Bonjour installer to location: %1")
|
||||
.arg(tempLocation));
|
||||
return;
|
||||
}
|
||||
|
||||
file.write(m_pDataDownloader->data());
|
||||
file.close();
|
||||
|
||||
QStringList arguments;
|
||||
arguments.append("/i");
|
||||
QString winFilename = QDir::toNativeSeparators(filename);
|
||||
arguments.append(winFilename);
|
||||
arguments.append("/passive");
|
||||
|
||||
if (m_pBonjourInstall != nullptr) {
|
||||
delete m_pBonjourInstall;
|
||||
m_pBonjourInstall = nullptr;
|
||||
}
|
||||
|
||||
m_pBonjourInstall = new CommandProcess("msiexec", arguments);
|
||||
|
||||
QThread* thread = new QThread;
|
||||
connect(m_pBonjourInstall, SIGNAL(finished()), this, SLOT(installFinished()));
|
||||
connect(m_pBonjourInstall, SIGNAL(finished()), thread, SLOT(quit()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
m_pBonjourInstall->moveToThread(thread);
|
||||
thread->start();
|
||||
|
||||
QMetaObject::invokeMethod(m_pBonjourInstall, "run", Qt::QueuedConnection);
|
||||
|
||||
m_pDownloadMessageBox->hide();
|
||||
}
|
||||
|
||||
bool BonjourWindows::isRunning() const
|
||||
{
|
||||
QString name = "Bonjour Service";
|
||||
|
||||
SC_HANDLE hSCManager;
|
||||
hSCManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT);
|
||||
|
||||
if (hSCManager == nullptr) {
|
||||
m_pMainWindow->appendLogError(
|
||||
QString("failed to open a service controller manager, error: %1").arg(GetLastError()));
|
||||
return false;
|
||||
}
|
||||
|
||||
auto array = name.toLocal8Bit();
|
||||
SC_HANDLE hService = OpenService(hSCManager, array.data(), SERVICE_QUERY_STATUS);
|
||||
|
||||
if (hService == nullptr) {
|
||||
m_pMainWindow->appendLogDebug(
|
||||
QString("failed to open service: %1").arg(name));
|
||||
return false;
|
||||
}
|
||||
|
||||
SERVICE_STATUS status;
|
||||
if (QueryServiceStatus(hService, &status)) {
|
||||
if (status.dwCurrentState == SERVICE_RUNNING) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BonjourWindows::installFinished()
|
||||
{
|
||||
m_pMainWindow->appendLogInfo("bonjour installed");
|
||||
m_appConfig.setAutoConfig(true);
|
||||
m_pSettingsDialog->allowAutoConfig();
|
||||
}
|
||||
|
||||
#endif // Q_OS_WIN
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2018 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
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
static QString bonjourBaseUrl = "http://binaries.symless.com/bonjour/";
|
||||
static const char bonjourFilename32[] = "Bonjour.msi";
|
||||
static const char bonjourFilename64[] = "Bonjour64.msi";
|
||||
static const char bonjourTargetFilename[] = "Bonjour.msi";
|
||||
|
||||
class SettingsDialog;
|
||||
class MainWindow;
|
||||
class CommandProcess;
|
||||
class DataDownloader;
|
||||
class AppConfig;
|
||||
|
||||
class BonjourWindows : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BonjourWindows(SettingsDialog* settingsDialog, MainWindow* mainWindow, AppConfig& appConfig);
|
||||
virtual ~BonjourWindows();
|
||||
|
||||
public:
|
||||
void downloadAndInstall();
|
||||
bool isRunning() const;
|
||||
|
||||
protected slots:
|
||||
void downloadFinished();
|
||||
void installFinished();
|
||||
|
||||
private:
|
||||
void install();
|
||||
|
||||
private:
|
||||
SettingsDialog* m_pSettingsDialog;
|
||||
MainWindow* m_pMainWindow;
|
||||
CommandProcess* m_pBonjourInstall;
|
||||
QMessageBox* m_pDownloadMessageBox;
|
||||
DataDownloader* m_pDataDownloader;
|
||||
AppConfig& m_appConfig;
|
||||
};
|
||||
|
||||
#endif // Q_OS_WIN
|
|
@ -62,29 +62,6 @@ 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)
|
||||
{
|
||||
QStringList args("--notify-activation");
|
||||
|
||||
QString input(identity + ":" + hash(getFirstMacAddress()));
|
||||
QString os= getOSInformation();
|
||||
if (!os.isEmpty()) {
|
||||
input.append(":").append(os);
|
||||
}
|
||||
input.append("\n");
|
||||
|
||||
return run(args, input);
|
||||
}
|
||||
|
||||
QString CoreInterface::run(const QStringList& args, const QString& input)
|
||||
{
|
||||
QString program(
|
||||
|
|
|
@ -28,9 +28,5 @@ public:
|
|||
QString getInstalledDir();
|
||||
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 = "");
|
||||
};
|
||||
|
|
|
@ -34,6 +34,7 @@ void DataDownloader::complete(QNetworkReply* reply)
|
|||
{
|
||||
m_Data = reply->readAll();
|
||||
reply->deleteLater();
|
||||
m_pReply = nullptr;
|
||||
|
||||
if (!m_Data.isEmpty()) {
|
||||
m_IsFinished = true;
|
||||
|
@ -48,7 +49,9 @@ QByteArray DataDownloader::data() const
|
|||
|
||||
void DataDownloader::cancel()
|
||||
{
|
||||
m_pReply->abort();
|
||||
if (m_pReply != nullptr) {
|
||||
m_pReply->abort();
|
||||
}
|
||||
}
|
||||
|
||||
void DataDownloader::download(QUrl url)
|
||||
|
|
|
@ -106,7 +106,7 @@ void IpcClient::sendCommand(const QString& command, ElevateMode const elevate)
|
|||
|
||||
std::string stdStringCommand = command.toStdString();
|
||||
const char* charCommand = stdStringCommand.c_str();
|
||||
int length = strlen(charCommand);
|
||||
int length = static_cast<int>(strlen(charCommand));
|
||||
|
||||
char lenBuf[4];
|
||||
intToBytes(length, lenBuf, 4);
|
||||
|
|
|
@ -134,11 +134,11 @@ void LicenseManager::skipActivation()
|
|||
QString
|
||||
LicenseManager::getEditionName(Edition const edition, bool trial)
|
||||
{
|
||||
std::string name ("Synergy");
|
||||
std::string name ("Synergy 1");
|
||||
switch (edition) {
|
||||
case kUnregistered:
|
||||
name += " (UNREGISTERED)";
|
||||
return QString::fromUtf8 (name.c_str(), name.size());
|
||||
return QString::fromUtf8 (name.c_str(), static_cast<int>(name.size()));
|
||||
case kBasic:
|
||||
name += " Basic";
|
||||
break;
|
||||
|
@ -148,7 +148,7 @@ LicenseManager::getEditionName(Edition const edition, bool trial)
|
|||
if (trial) {
|
||||
name += " (Trial)";
|
||||
}
|
||||
return QString::fromUtf8 (name.c_str(), name.size());
|
||||
return QString::fromUtf8 (name.c_str(), static_cast<int>(name.size()));
|
||||
}
|
||||
|
||||
void LicenseManager::notifyActivation(QString identity)
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "ServerConfigDialog.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include "ActivationDialog.h"
|
||||
#include "ZeroconfService.h"
|
||||
#include "DataDownloader.h"
|
||||
#include "CommandProcess.h"
|
||||
#include "LicenseManager.h"
|
||||
|
@ -35,6 +34,7 @@
|
|||
#include "QUtility.h"
|
||||
#include "ProcessorArch.h"
|
||||
#include "SslCertificate.h"
|
||||
#include "Zeroconf.h"
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
@ -51,36 +51,42 @@
|
|||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
static const char synergyConfigName[] = "synergy.sgc";
|
||||
static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.sgc);;All files (*.*)"));
|
||||
static QString bonjourBaseUrl = "http://binaries.symless.com/bonjour/";
|
||||
static const char bonjourFilename32[] = "Bonjour.msi";
|
||||
static const char bonjourFilename64[] = "Bonjour64.msi";
|
||||
static const char bonjourTargetFilename[] = "Bonjour.msi";
|
||||
#else
|
||||
static const char synergyConfigName[] = "synergy.conf";
|
||||
static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.conf);;All files (*.*)"));
|
||||
#endif
|
||||
|
||||
static const char* tlsVersion = "TLS 1.2";
|
||||
static const char* tlsCheckString = "network encryption protocol: TLSv1.2";
|
||||
|
||||
static const int debugLogLevel = 1;
|
||||
|
||||
static const char* synergyIconFiles[] =
|
||||
{
|
||||
":/res/icons/16x16/synergy-disconnected.png",
|
||||
":/res/icons/16x16/synergy-disconnected.png",
|
||||
":/res/icons/16x16/synergy-connected.png",
|
||||
":/res/icons/16x16/synergy-transfering.png"
|
||||
":/res/icons/16x16/synergy-disconnected.png", //synergyDisconnected
|
||||
":/res/icons/16x16/synergy-disconnected.png", //synergyConnecting
|
||||
":/res/icons/16x16/synergy-connected.png", //synergyConnected
|
||||
":/res/icons/16x16/synergy-transfering.png", //synergyListening
|
||||
":/res/icons/16x16/synergy-disconnected.png" //synergyPendingRetry
|
||||
};
|
||||
|
||||
MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig,
|
||||
LicenseManager& licenseManager) :
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
MainWindow::MainWindow (QSettings& settings, AppConfig& appConfig)
|
||||
#else
|
||||
MainWindow::MainWindow (QSettings& settings, AppConfig& appConfig,
|
||||
LicenseManager& licenseManager)
|
||||
#endif
|
||||
:
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
m_LicenseManager(&licenseManager),
|
||||
m_ActivationDialogRunning(false),
|
||||
#endif
|
||||
m_pZeroconf(nullptr),
|
||||
m_Settings(settings),
|
||||
m_AppConfig(&appConfig),
|
||||
m_LicenseManager(&licenseManager),
|
||||
m_pSynergy(NULL),
|
||||
m_SynergyState(synergyDisconnected),
|
||||
m_ServerConfig(&m_Settings, 5, 3, m_AppConfig->screenName(), this),
|
||||
|
@ -93,17 +99,15 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig,
|
|||
m_pMenuEdit(NULL),
|
||||
m_pMenuWindow(NULL),
|
||||
m_pMenuHelp(NULL),
|
||||
m_pZeroconfService(NULL),
|
||||
m_pDataDownloader(NULL),
|
||||
m_DownloadMessageBox(NULL),
|
||||
m_pCancelButton(NULL),
|
||||
m_SuppressAutoConfigWarning(false),
|
||||
m_BonjourInstall(NULL),
|
||||
m_SuppressEmptyServerWarning(false),
|
||||
m_ExpectedRunningState(kStopped),
|
||||
m_pSslCertificate(NULL),
|
||||
m_ActivationDialogRunning(false)
|
||||
m_SecureSocket(false)
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
m_pZeroconf = new Zeroconf(this);
|
||||
#endif
|
||||
|
||||
setupUi(this);
|
||||
|
||||
createMenuBar();
|
||||
|
@ -132,17 +136,14 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig,
|
|||
setMinimumSize(size());
|
||||
#endif
|
||||
|
||||
m_SuppressAutoConfigWarning = true;
|
||||
m_pCheckBoxAutoConfig->setChecked(appConfig.autoConfig());
|
||||
m_SuppressAutoConfigWarning = false;
|
||||
|
||||
m_pComboServerList->hide();
|
||||
m_pLabelPadlock->hide();
|
||||
m_trialWidget->hide();
|
||||
|
||||
// hide padlock icon
|
||||
secureSocket(false);
|
||||
|
||||
connect (this, SIGNAL(windowShown()),
|
||||
this, SLOT(on_windowShown()), Qt::QueuedConnection);
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
connect (m_LicenseManager, SIGNAL(editionChanged(Edition)),
|
||||
this, SLOT(setEdition(Edition)), Qt::QueuedConnection);
|
||||
|
||||
|
@ -151,20 +152,39 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig,
|
|||
|
||||
connect (m_LicenseManager, SIGNAL(endTrial(bool)),
|
||||
this, SLOT(endTrial(bool)), Qt::QueuedConnection);
|
||||
#endif
|
||||
|
||||
connect (m_AppConfig, SIGNAL(sslToggled(bool)),
|
||||
this, SLOT(sslToggled(bool)), Qt::QueuedConnection);
|
||||
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
setWindowTitle ("Synergy 1 Enterprise");
|
||||
#else
|
||||
setWindowTitle (m_LicenseManager->activeEditionName());
|
||||
m_LicenseManager->refresh();
|
||||
#endif
|
||||
|
||||
QString lastVersion = m_AppConfig->lastVersion();
|
||||
QString currentVersion = m_VersionChecker.getVersion();
|
||||
if (lastVersion != currentVersion) {
|
||||
m_AppConfig->setLastVersion (currentVersion);
|
||||
m_AppConfig->saveSettings();
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
m_LicenseManager->notifyUpdate (lastVersion, currentVersion);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
m_pActivate->setVisible(false);
|
||||
#endif
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
updateZeroconfService();
|
||||
|
||||
addZeroconfServer(m_AppConfig->autoConfigServer());
|
||||
#endif
|
||||
|
||||
updateAutoConfigWidgets();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -174,18 +194,12 @@ MainWindow::~MainWindow()
|
|||
stopDesktop();
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
delete m_pZeroconf;
|
||||
#endif
|
||||
|
||||
saveSettings();
|
||||
|
||||
delete m_pZeroconfService;
|
||||
|
||||
if (m_DownloadMessageBox != NULL) {
|
||||
delete m_DownloadMessageBox;
|
||||
}
|
||||
|
||||
if (m_BonjourInstall != NULL) {
|
||||
delete m_BonjourInstall;
|
||||
}
|
||||
|
||||
delete m_pSslCertificate;
|
||||
}
|
||||
|
||||
|
@ -199,17 +213,11 @@ void MainWindow::open()
|
|||
|
||||
m_VersionChecker.checkLatest();
|
||||
|
||||
if (!appConfig().autoConfigPrompted()) {
|
||||
promptAutoConfig();
|
||||
}
|
||||
|
||||
// only start if user has previously started. this stops the gui from
|
||||
// auto hiding before the user has configured synergy (which of course
|
||||
// confuses first time users, who think synergy has crashed).
|
||||
if (appConfig().startedBefore() && appConfig().processMode() == Desktop) {
|
||||
m_SuppressEmptyServerWarning = true;
|
||||
startSynergy();
|
||||
m_SuppressEmptyServerWarning = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,7 +414,7 @@ void MainWindow::appendLogInfo(const QString& text)
|
|||
}
|
||||
|
||||
void MainWindow::appendLogDebug(const QString& text) {
|
||||
if (appConfig().logLevel() >= 4) {
|
||||
if (appConfig().logLevel() >= debugLogLevel) {
|
||||
appendLogRaw(getTimeStamp() + " DEBUG: " + text);
|
||||
}
|
||||
}
|
||||
|
@ -420,6 +428,13 @@ void MainWindow::appendLogRaw(const QString& text)
|
|||
{
|
||||
foreach(QString line, text.split(QRegExp("\r|\n|\r\n"))) {
|
||||
if (!line.isEmpty()) {
|
||||
|
||||
// HACK: macOS 10.13.4+ spamming error lines in logs making them
|
||||
// impossible to read and debug; giving users a red herring.
|
||||
if (line.contains("calling TIS/TSM in non-main thread environment")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
m_pLogOutput->append(line);
|
||||
updateFromLogLine(line);
|
||||
}
|
||||
|
@ -428,18 +443,21 @@ void MainWindow::appendLogRaw(const QString& text)
|
|||
|
||||
void MainWindow::updateFromLogLine(const QString &line)
|
||||
{
|
||||
// TODO: this code makes Andrew cry
|
||||
// TODO: This shouldn't be updating from log needs a better way of doing this
|
||||
checkConnected(line);
|
||||
checkFingerprint(line);
|
||||
checkSecureSocket(line);
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
checkLicense(line);
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::checkConnected(const QString& line)
|
||||
{
|
||||
// TODO: implement ipc connection state messages to replace this hack.
|
||||
if (line.contains("started server") ||
|
||||
line.contains("connected to server") ||
|
||||
line.contains("watchdog status: ok"))
|
||||
if (line.contains("connected to server") ||
|
||||
line.contains("accepted client connection"))
|
||||
{
|
||||
setSynergyState(synergyConnected);
|
||||
|
||||
|
@ -454,8 +472,21 @@ void MainWindow::checkConnected(const QString& line)
|
|||
appConfig().saveSettings();
|
||||
}
|
||||
}
|
||||
else if (line.contains("started server"))
|
||||
{
|
||||
setSynergyState(synergyListening);
|
||||
}
|
||||
else if (line.contains("disconnected from server") || line.contains("process exited"))
|
||||
{
|
||||
setSynergyState(synergyDisconnected);
|
||||
}
|
||||
else if (line.contains("connecting to"))
|
||||
{
|
||||
setSynergyState(synergyConnecting);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
void MainWindow::checkLicense(const QString &line)
|
||||
{
|
||||
if (line.contains("trial has expired")) {
|
||||
|
@ -463,6 +494,7 @@ void MainWindow::checkLicense(const QString &line)
|
|||
raiseActivationDialog();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::checkFingerprint(const QString& line)
|
||||
{
|
||||
|
@ -485,11 +517,10 @@ void MainWindow::checkFingerprint(const QString& line)
|
|||
QMessageBox::StandardButton fingerprintReply =
|
||||
QMessageBox::information(
|
||||
this, tr("Security question"),
|
||||
tr("Do you trust this fingerprint?\n\n"
|
||||
tr("You are connecting to a server. Here is it's fingerprint:\n\n"
|
||||
"%1\n\n"
|
||||
"This is a server fingerprint. You should compare this "
|
||||
"fingerprint to the one on your server's screen. If the "
|
||||
"two don't match exactly, then it's probably not the server "
|
||||
"Compare this fingerprint to the one on your server's screen."
|
||||
"If the two don't match exactly, then it's probably not the server "
|
||||
"you're expecting (it could be a malicious user).\n\n"
|
||||
"To automatically trust this fingerprint for future "
|
||||
"connections, click Yes. To reject this fingerprint and "
|
||||
|
@ -507,6 +538,15 @@ void MainWindow::checkFingerprint(const QString& line)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::checkSecureSocket(const QString& line)
|
||||
{
|
||||
// obviously not very secure, since this can be tricked by injecting something
|
||||
// into the log. however, since we don't have IPC between core and GUI... patches welcome.
|
||||
if (line.contains(tlsCheckString)) {
|
||||
secureSocket(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool MainWindow::autoHide()
|
||||
{
|
||||
if ((appConfig().processMode() == Desktop) &&
|
||||
|
@ -532,8 +572,9 @@ void MainWindow::restartSynergy()
|
|||
|
||||
void MainWindow::proofreadInfo()
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
setEdition(m_AppConfig->edition()); // Why is this here?
|
||||
|
||||
#endif
|
||||
int oldState = m_SynergyState;
|
||||
m_SynergyState = synergyDisconnected;
|
||||
setSynergyState((qSynergyState)oldState);
|
||||
|
@ -552,6 +593,7 @@ void MainWindow::clearLog()
|
|||
|
||||
void MainWindow::startSynergy()
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
SerialKey serialKey = m_LicenseManager->serialKey();
|
||||
time_t currentTime = ::time(0);
|
||||
if (serialKey.isExpired(currentTime)) {
|
||||
|
@ -559,7 +601,7 @@ void MainWindow::startSynergy()
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
bool desktopMode = appConfig().processMode() == Desktop;
|
||||
bool serviceMode = appConfig().processMode() == Service;
|
||||
|
||||
|
@ -671,6 +713,16 @@ void MainWindow::startSynergy()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::retryStart()
|
||||
{
|
||||
//This function is only called after a failed start
|
||||
//Only start synergy if the current state is pending retry
|
||||
if (m_SynergyState == synergyPendingRetry)
|
||||
{
|
||||
startSynergy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::sslToggled (bool enabled)
|
||||
{
|
||||
|
@ -704,27 +756,47 @@ 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()) {
|
||||
if (appConfig().autoConfig()) {
|
||||
if (m_pComboServerList->count() != 0) {
|
||||
QString serverIp = m_pComboServerList->currentText();
|
||||
args << serverIp + ":" + QString::number(appConfig().port());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pLineEditHostname->text().isEmpty()) {
|
||||
show();
|
||||
if (!m_SuppressEmptyServerWarning) {
|
||||
QMessageBox::warning(this, tr("Hostname is empty"),
|
||||
tr("Please fill in a hostname for the synergy client to connect to."));
|
||||
else {
|
||||
show();
|
||||
QMessageBox::warning(
|
||||
this, tr("No server selected"),
|
||||
tr("No auto config server was selected, try manual mode instead."));
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_pLineEditHostname->text().isEmpty())
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
//check if autoconfig mode is enabled
|
||||
if (!appConfig().autoConfig())
|
||||
{
|
||||
#endif
|
||||
show();
|
||||
QMessageBox::warning(
|
||||
this, tr("Hostname is empty"),
|
||||
tr("Please fill in a hostname for the synergy client to connect to."));
|
||||
return false;
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -804,9 +876,11 @@ bool MainWindow::serverArgs(QStringList& args, QString& app)
|
|||
#endif
|
||||
args << "-c" << configFilename << "--address" << address();
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
if (!appConfig().serialKey().isEmpty()) {
|
||||
args << "--serial-key" << appConfig().serialKey();
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -872,7 +946,9 @@ void MainWindow::synergyFinished(int exitCode, QProcess::ExitStatus)
|
|||
}
|
||||
|
||||
if (m_ExpectedRunningState == kStarted) {
|
||||
QTimer::singleShot(1000, this, SLOT(startSynergy()));
|
||||
|
||||
setSynergyState(synergyPendingRetry);
|
||||
QTimer::singleShot(1000, this, SLOT(retryStart()));
|
||||
appendLogInfo(QString("detected process not running, auto restarting"));
|
||||
}
|
||||
else {
|
||||
|
@ -882,10 +958,17 @@ void MainWindow::synergyFinished(int exitCode, QProcess::ExitStatus)
|
|||
|
||||
void MainWindow::setSynergyState(qSynergyState state)
|
||||
{
|
||||
// always assume connection is not secure when connection changes
|
||||
// to anything except connected. the only way the padlock shows is
|
||||
// when the correct TLS version string is detected.
|
||||
if (state != synergyConnected) {
|
||||
secureSocket(false);
|
||||
}
|
||||
|
||||
if (synergyState() == state)
|
||||
return;
|
||||
|
||||
if (state == synergyConnected || state == synergyConnecting)
|
||||
if ((state == synergyConnected) || (state == synergyConnecting) || (state == synergyListening) || (state == synergyPendingRetry))
|
||||
{
|
||||
disconnect (m_pButtonToggleStart, SIGNAL(clicked()), m_pActionStartSynergy, SLOT(trigger()));
|
||||
connect (m_pButtonToggleStart, SIGNAL(clicked()), m_pActionStopSynergy, SLOT(trigger()));
|
||||
|
@ -900,37 +983,40 @@ void MainWindow::setSynergyState(qSynergyState state)
|
|||
m_pButtonApply->setEnabled(false);
|
||||
}
|
||||
|
||||
bool connected = false;
|
||||
if (state == synergyConnected || state == synergyTransfering) {
|
||||
connected = true;
|
||||
bool running = false;
|
||||
if (state == synergyConnected || state == synergyListening) {
|
||||
running = true;
|
||||
}
|
||||
|
||||
m_pActionStartSynergy->setEnabled(!connected);
|
||||
m_pActionStopSynergy->setEnabled(connected);
|
||||
m_pActionStartSynergy->setEnabled(!running);
|
||||
m_pActionStopSynergy->setEnabled(running);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case synergyConnected: {
|
||||
if (m_AppConfig->getCryptoEnabled()) {
|
||||
m_pLabelPadlock->show();
|
||||
case synergyListening: {
|
||||
if (synergyType() == synergyServer) {
|
||||
setStatus(tr("Synergy is waiting for clients").arg(tlsVersion));
|
||||
}
|
||||
else {
|
||||
m_pLabelPadlock->hide();
|
||||
}
|
||||
|
||||
setStatus(tr("Synergy is running."));
|
||||
|
||||
break;
|
||||
}
|
||||
case synergyConnected: {
|
||||
if (m_SecureSocket) {
|
||||
setStatus(tr("Synergy is connected (with %1)").arg(tlsVersion));
|
||||
}
|
||||
else {
|
||||
setStatus(tr("Synergy is running (without %1)").arg(tlsVersion));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case synergyConnecting:
|
||||
m_pLabelPadlock->hide();
|
||||
setStatus(tr("Synergy is starting."));
|
||||
setStatus(tr("Synergy is starting..."));
|
||||
break;
|
||||
case synergyPendingRetry:
|
||||
setStatus(tr("There was an error, retrying..."));
|
||||
break;
|
||||
case synergyDisconnected:
|
||||
m_pLabelPadlock->hide();
|
||||
setStatus(tr("Synergy is not running."));
|
||||
break;
|
||||
case synergyTransfering:
|
||||
setStatus(tr("Synergy is not running"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1024,39 +1110,23 @@ void MainWindow::changeEvent(QEvent* event)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateZeroconfService()
|
||||
void MainWindow::addZeroconfServer(const QString name)
|
||||
{
|
||||
QMutexLocker locker(&m_UpdateZeroconfMutex);
|
||||
|
||||
if (isBonjourRunning()) {
|
||||
if (!m_AppConfig->wizardShouldRun()) {
|
||||
if (m_pZeroconfService) {
|
||||
delete m_pZeroconfService;
|
||||
m_pZeroconfService = NULL;
|
||||
}
|
||||
|
||||
if (m_AppConfig->autoConfig() || synergyType() == synergyServer) {
|
||||
m_pZeroconfService = new ZeroconfService(this);
|
||||
}
|
||||
}
|
||||
// don't add yourself to the server list.
|
||||
if (getIPAddresses().contains(name)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::serverDetected(const QString name)
|
||||
{
|
||||
if (m_pComboServerList->findText(name) == -1) {
|
||||
// Note: the first added item triggers startSynergy
|
||||
m_pComboServerList->addItem(name);
|
||||
}
|
||||
|
||||
if (m_pComboServerList->count() > 1) {
|
||||
m_pComboServerList->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::setEdition(Edition edition)
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
setWindowTitle(m_LicenseManager->getEditionName (edition));
|
||||
#endif
|
||||
if (m_AppConfig->getCryptoEnabled()) {
|
||||
m_pSslCertificate = new SslCertificate(this);
|
||||
m_pSslCertificate->generateCertificate();
|
||||
|
@ -1065,6 +1135,7 @@ void MainWindow::setEdition(Edition edition)
|
|||
saveSettings();
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
void MainWindow::beginTrial(bool isExpiring)
|
||||
{
|
||||
//Hack
|
||||
|
@ -1115,6 +1186,7 @@ void MainWindow::endTrial(bool isExpired)
|
|||
}
|
||||
setWindowTitle (m_LicenseManager->activeEditionName());
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::updateLocalFingerprint()
|
||||
{
|
||||
|
@ -1129,26 +1201,26 @@ void MainWindow::updateLocalFingerprint()
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
LicenseManager&
|
||||
MainWindow::licenseManager() const
|
||||
{
|
||||
return *m_LicenseManager;
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::on_m_pGroupClient_toggled(bool on)
|
||||
{
|
||||
m_pGroupServer->setChecked(!on);
|
||||
if (on) {
|
||||
updateZeroconfService();
|
||||
}
|
||||
|
||||
// only call in either client or server toggle, but not both
|
||||
// since the toggle functions call eachother indirectly.
|
||||
updateZeroconfService();
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pGroupServer_toggled(bool on)
|
||||
{
|
||||
m_pGroupClient->setChecked(!on);
|
||||
if (on) {
|
||||
updateZeroconfService();
|
||||
}
|
||||
}
|
||||
|
||||
bool MainWindow::on_m_pButtonBrowseConfigFile_clicked()
|
||||
|
@ -1183,9 +1255,55 @@ void MainWindow::on_m_pActionAbout_triggered()
|
|||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::updateZeroconfService()
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
|
||||
// reset the server list in case one has gone away.
|
||||
// it'll be re-added after the zeroconf service restarts.
|
||||
m_pComboServerList->clear();
|
||||
|
||||
if (m_pZeroconf != nullptr) {
|
||||
if (appConfig().autoConfig()) {
|
||||
m_pZeroconf->startService();
|
||||
}
|
||||
else {
|
||||
m_pZeroconf->stopService();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::updateAutoConfigWidgets()
|
||||
{
|
||||
if (appConfig().autoConfig()) {
|
||||
m_pLabelAutoDetected->show();
|
||||
m_pComboServerList->show();
|
||||
|
||||
m_pLabelServerName->hide();
|
||||
m_pLineEditHostname->hide();
|
||||
|
||||
m_pWidgetAutoConfig->hide();
|
||||
}
|
||||
else {
|
||||
m_pLabelServerName->show();
|
||||
m_pLineEditHostname->show();
|
||||
|
||||
m_pLabelAutoDetected->hide();
|
||||
m_pComboServerList->hide();
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
m_pWidgetAutoConfig->show();
|
||||
#else
|
||||
m_pWidgetAutoConfig->hide();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pActionSettings_triggered()
|
||||
{
|
||||
ProcessMode lastProcessMode = appConfig().processMode();
|
||||
bool lastAutoConfig = appConfig().autoConfig();
|
||||
|
||||
SettingsDialog dlg(this, appConfig());
|
||||
dlg.exec();
|
||||
|
@ -1194,38 +1312,45 @@ void MainWindow::on_m_pActionSettings_triggered()
|
|||
{
|
||||
onModeChanged(true, true);
|
||||
}
|
||||
|
||||
if (lastAutoConfig != appConfig().autoConfig()) {
|
||||
updateAutoConfigWidgets();
|
||||
updateZeroconfService();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::autoAddScreen(const QString name)
|
||||
{
|
||||
if (!m_ServerConfig.ignoreAutoConfigClient()) {
|
||||
if (m_ActivationDialogRunning) {
|
||||
// TODO: refactor this code
|
||||
// add this screen to the pending list and check this list until
|
||||
// users finish activation dialog
|
||||
m_PendingClientNames.append(name);
|
||||
return;
|
||||
}
|
||||
if (m_ServerConfig.ignoreAutoConfigClient()) {
|
||||
appendLogDebug(QString("ignoring zeroconf screen: %1").arg(name));
|
||||
return;
|
||||
}
|
||||
|
||||
int r = m_ServerConfig.autoAddScreen(name);
|
||||
if (r != kAutoAddScreenOk) {
|
||||
switch (r) {
|
||||
case kAutoAddScreenManualServer:
|
||||
showConfigureServer(
|
||||
tr("Please add the server (%1) to the grid.")
|
||||
.arg(appConfig().screenName()));
|
||||
break;
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
if (m_ActivationDialogRunning) {
|
||||
// TODO: refactor this code
|
||||
// add this screen to the pending list and check this list until
|
||||
// users finish activation dialog
|
||||
m_PendingClientNames.append(name);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
case kAutoAddScreenManualClient:
|
||||
showConfigureServer(
|
||||
tr("Please drag the new client screen (%1) "
|
||||
"to the desired position on the grid.")
|
||||
.arg(name));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
restartSynergy();
|
||||
int r = m_ServerConfig.autoAddScreen(name);
|
||||
if (r != kAutoAddScreenOk) {
|
||||
switch (r) {
|
||||
case kAutoAddScreenManualServer:
|
||||
showConfigureServer(
|
||||
tr("Please add the server (%1) to the grid.")
|
||||
.arg(appConfig().screenName()));
|
||||
break;
|
||||
|
||||
case kAutoAddScreenManualClient:
|
||||
showConfigureServer(
|
||||
tr("Please drag the new client screen (%1) "
|
||||
"to the desired position on the grid.")
|
||||
.arg(name));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1244,7 +1369,9 @@ void MainWindow::on_m_pButtonConfigureServer_clicked()
|
|||
|
||||
void MainWindow::on_m_pActivate_triggered()
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
raiseActivationDialog();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pButtonApply_clicked()
|
||||
|
@ -1252,210 +1379,7 @@ void MainWindow::on_m_pButtonApply_clicked()
|
|||
restartSynergy();
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
bool MainWindow::isServiceRunning(QString name)
|
||||
{
|
||||
SC_HANDLE hSCManager;
|
||||
hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
|
||||
if (hSCManager == NULL) {
|
||||
appendLogError("failed to open a service controller manager, error: " +
|
||||
GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
auto array = name.toLocal8Bit();
|
||||
SC_HANDLE hService = OpenService(hSCManager, array.data(), SERVICE_QUERY_STATUS);
|
||||
|
||||
if (hService == NULL) {
|
||||
appendLogDebug("failed to open service: " + name);
|
||||
return false;
|
||||
}
|
||||
|
||||
SERVICE_STATUS status;
|
||||
if (QueryServiceStatus(hService, &status)) {
|
||||
if (status.dwCurrentState == SERVICE_RUNNING) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#else
|
||||
bool MainWindow::isServiceRunning()
|
||||
{
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MainWindow::isBonjourRunning()
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
result = isServiceRunning("Bonjour Service");
|
||||
#else
|
||||
result = true;
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void MainWindow::downloadBonjour()
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
QUrl url;
|
||||
int arch = getProcessorArch();
|
||||
if (arch == kProcessorArchWin32) {
|
||||
url.setUrl(bonjourBaseUrl + bonjourFilename32);
|
||||
appendLogInfo("downloading 32-bit Bonjour");
|
||||
}
|
||||
else if (arch == kProcessorArchWin64) {
|
||||
url.setUrl(bonjourBaseUrl + bonjourFilename64);
|
||||
appendLogInfo("downloading 64-bit Bonjour");
|
||||
}
|
||||
else {
|
||||
QMessageBox::critical(
|
||||
this, tr("Synergy"),
|
||||
tr("Failed to detect system architecture."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pDataDownloader == NULL) {
|
||||
m_pDataDownloader = new DataDownloader(this);
|
||||
connect(m_pDataDownloader, SIGNAL(isComplete()), SLOT(installBonjour()));
|
||||
}
|
||||
|
||||
m_pDataDownloader->download(url);
|
||||
|
||||
if (m_DownloadMessageBox == NULL) {
|
||||
m_DownloadMessageBox = new QMessageBox(this);
|
||||
m_DownloadMessageBox->setWindowTitle("Synergy");
|
||||
m_DownloadMessageBox->setIcon(QMessageBox::Information);
|
||||
m_DownloadMessageBox->setText("Installing Bonjour, please wait...");
|
||||
m_DownloadMessageBox->setStandardButtons(0);
|
||||
m_pCancelButton = m_DownloadMessageBox->addButton(
|
||||
tr("Cancel"), QMessageBox::RejectRole);
|
||||
}
|
||||
|
||||
m_DownloadMessageBox->exec();
|
||||
|
||||
if (m_DownloadMessageBox->clickedButton() == m_pCancelButton) {
|
||||
m_pDataDownloader->cancel();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::installBonjour()
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
#if QT_VERSION >= 0x050000
|
||||
QString tempLocation = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||
#else
|
||||
QString tempLocation = QDesktopServices::storageLocation(
|
||||
QDesktopServices::TempLocation);
|
||||
#endif
|
||||
QString filename = tempLocation;
|
||||
filename.append("\\").append(bonjourTargetFilename);
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
m_DownloadMessageBox->hide();
|
||||
|
||||
QMessageBox::warning(
|
||||
this, "Synergy",
|
||||
tr("Failed to download Bonjour installer to location: %1")
|
||||
.arg(tempLocation));
|
||||
return;
|
||||
}
|
||||
|
||||
file.write(m_pDataDownloader->data());
|
||||
file.close();
|
||||
|
||||
QStringList arguments;
|
||||
arguments.append("/i");
|
||||
QString winFilename = QDir::toNativeSeparators(filename);
|
||||
arguments.append(winFilename);
|
||||
arguments.append("/passive");
|
||||
if (m_BonjourInstall == NULL) {
|
||||
m_BonjourInstall = new CommandProcess("msiexec", arguments);
|
||||
}
|
||||
|
||||
QThread* thread = new QThread;
|
||||
connect(m_BonjourInstall, SIGNAL(finished()), this,
|
||||
SLOT(bonjourInstallFinished()));
|
||||
connect(m_BonjourInstall, SIGNAL(finished()), thread, SLOT(quit()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
m_BonjourInstall->moveToThread(thread);
|
||||
thread->start();
|
||||
|
||||
QMetaObject::invokeMethod(m_BonjourInstall, "run", Qt::QueuedConnection);
|
||||
|
||||
m_DownloadMessageBox->hide();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::promptAutoConfig()
|
||||
{
|
||||
if (!isBonjourRunning()) {
|
||||
int r = QMessageBox::question(
|
||||
this, tr("Synergy"),
|
||||
tr("Do you want to enable auto config and install Bonjour?\n\n"
|
||||
"This feature helps you establish the connection."),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if (r == QMessageBox::Yes) {
|
||||
m_AppConfig->setAutoConfig(true);
|
||||
downloadBonjour();
|
||||
}
|
||||
else {
|
||||
m_AppConfig->setAutoConfig(false);
|
||||
m_pCheckBoxAutoConfig->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
m_AppConfig->setAutoConfigPrompted(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pComboServerList_currentIndexChanged(QString )
|
||||
{
|
||||
if (m_pComboServerList->count() != 0) {
|
||||
restartSynergy();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pCheckBoxAutoConfig_toggled(bool checked)
|
||||
{
|
||||
if (!isBonjourRunning() && checked) {
|
||||
if (!m_SuppressAutoConfigWarning) {
|
||||
int r = QMessageBox::information(
|
||||
this, tr("Synergy"),
|
||||
tr("Auto config feature requires Bonjour.\n\n"
|
||||
"Do you want to install Bonjour?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if (r == QMessageBox::Yes) {
|
||||
downloadBonjour();
|
||||
}
|
||||
}
|
||||
|
||||
m_pCheckBoxAutoConfig->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
||||
m_pLineEditHostname->setDisabled(checked);
|
||||
appConfig().setAutoConfig(checked);
|
||||
updateZeroconfService();
|
||||
|
||||
if (!checked) {
|
||||
m_pComboServerList->clear();
|
||||
m_pComboServerList->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::bonjourInstallFinished()
|
||||
{
|
||||
appendLogInfo("Bonjour install finished");
|
||||
|
||||
m_pCheckBoxAutoConfig->setChecked(true);
|
||||
}
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
int MainWindow::raiseActivationDialog()
|
||||
{
|
||||
if (m_ActivationDialogRunning) {
|
||||
|
@ -1474,20 +1398,20 @@ int MainWindow::raiseActivationDialog()
|
|||
|
||||
m_PendingClientNames.clear();
|
||||
}
|
||||
if (result == QDialog::Accepted) {
|
||||
restartSynergy();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::on_windowShown()
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
time_t currentTime = ::time(0);
|
||||
if (!m_AppConfig->activationHasRun()
|
||||
&& ((m_AppConfig->edition() == kUnregistered) ||
|
||||
(m_LicenseManager->serialKey().isExpired(currentTime)))) {
|
||||
raiseActivationDialog();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
QString MainWindow::getProfileRootForArg()
|
||||
|
@ -1504,3 +1428,25 @@ QString MainWindow::getProfileRootForArg()
|
|||
|
||||
return QString("\"%1\"").arg(dir);
|
||||
}
|
||||
|
||||
void MainWindow::secureSocket(bool secureSocket)
|
||||
{
|
||||
m_SecureSocket = secureSocket;
|
||||
if (secureSocket) {
|
||||
m_pLabelPadlock->show();
|
||||
}
|
||||
else {
|
||||
m_pLabelPadlock->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pLabelAutoConfig_linkActivated(const QString &)
|
||||
{
|
||||
m_pActionSettings->trigger();
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pComboServerList_currentIndexChanged(const QString &server)
|
||||
{
|
||||
appConfig().setAutoConfigServer(server);
|
||||
appConfig().saveSettings();
|
||||
}
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined(MAINWINDOW__H)
|
||||
|
||||
#define MAINWINDOW__H
|
||||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QSystemTrayIcon>
|
||||
|
@ -54,11 +52,11 @@ class QAbstractButton;
|
|||
class LogDialog;
|
||||
class QSynergyApplication;
|
||||
class SetupWizard;
|
||||
class ZeroconfService;
|
||||
class DataDownloader;
|
||||
class CommandProcess;
|
||||
class SslCertificate;
|
||||
class LicenseManager;
|
||||
class Zeroconf;
|
||||
|
||||
class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||
{
|
||||
|
@ -75,7 +73,8 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
|||
synergyDisconnected,
|
||||
synergyConnecting,
|
||||
synergyConnected,
|
||||
synergyTransfering
|
||||
synergyListening,
|
||||
synergyPendingRetry
|
||||
};
|
||||
|
||||
enum qSynergyType
|
||||
|
@ -95,8 +94,12 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
|||
};
|
||||
|
||||
public:
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
MainWindow(QSettings& settings, AppConfig& appConfig);
|
||||
#else
|
||||
MainWindow(QSettings& settings, AppConfig& appConfig,
|
||||
LicenseManager& licenseManager);
|
||||
#endif
|
||||
~MainWindow();
|
||||
|
||||
public:
|
||||
|
@ -115,22 +118,28 @@ 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 addZeroconfServer(const QString name);
|
||||
void updateLocalFingerprint();
|
||||
Zeroconf& zeroconf() { return *m_pZeroconf; }
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
LicenseManager& licenseManager() const;
|
||||
|
||||
int raiseActivationDialog();
|
||||
#endif
|
||||
|
||||
void updateZeroconfService();
|
||||
|
||||
public slots:
|
||||
void setEdition(Edition edition);
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
void beginTrial(bool isExpiring);
|
||||
void endTrial(bool isExpired);
|
||||
#endif
|
||||
void appendLogRaw(const QString& text);
|
||||
void appendLogInfo(const QString& text);
|
||||
void appendLogDebug(const QString& text);
|
||||
void appendLogError(const QString& text);
|
||||
void startSynergy();
|
||||
void retryStart(); // If the connection failed this will retry a startSynergy
|
||||
|
||||
protected slots:
|
||||
void sslToggled(bool enabled);
|
||||
|
@ -148,7 +157,7 @@ public slots:
|
|||
void logOutput();
|
||||
void logError();
|
||||
void updateFound(const QString& version);
|
||||
void bonjourInstallFinished();
|
||||
void saveSettings();
|
||||
|
||||
protected:
|
||||
QSettings& settings() { return m_Settings; }
|
||||
|
@ -160,7 +169,6 @@ public slots:
|
|||
void createStatusBar();
|
||||
void createTrayIcon();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void setIcon(qSynergyState state);
|
||||
void setSynergyState(qSynergyState state);
|
||||
bool checkForApp(int which, QString& app);
|
||||
|
@ -180,24 +188,31 @@ public slots:
|
|||
#else
|
||||
bool isServiceRunning();
|
||||
#endif
|
||||
bool isBonjourRunning();
|
||||
void downloadBonjour();
|
||||
void promptAutoConfig();
|
||||
|
||||
QString getProfileRootForArg();
|
||||
void checkConnected(const QString& line);
|
||||
void checkLicense(const QString& line);
|
||||
void checkFingerprint(const QString& line);
|
||||
void checkSecureSocket(const QString& line);
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
void checkLicense(const QString& line);
|
||||
#endif
|
||||
bool autoHide();
|
||||
QString getTimeStamp();
|
||||
void restartSynergy();
|
||||
void proofreadInfo();
|
||||
|
||||
void showEvent (QShowEvent*);
|
||||
void secureSocket(bool secureSocket);
|
||||
|
||||
private:
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
LicenseManager* m_LicenseManager;
|
||||
bool m_ActivationDialogRunning;
|
||||
QStringList m_PendingClientNames;
|
||||
#endif
|
||||
Zeroconf* m_pZeroconf;
|
||||
QSettings& m_Settings;
|
||||
AppConfig* m_AppConfig;
|
||||
LicenseManager* m_LicenseManager;
|
||||
QProcess* m_pSynergy;
|
||||
int m_SynergyState;
|
||||
ServerConfig m_ServerConfig;
|
||||
|
@ -212,30 +227,22 @@ public slots:
|
|||
QMenu* m_pMenuEdit;
|
||||
QMenu* m_pMenuWindow;
|
||||
QMenu* m_pMenuHelp;
|
||||
ZeroconfService* m_pZeroconfService;
|
||||
DataDownloader* m_pDataDownloader;
|
||||
QMessageBox* m_DownloadMessageBox;
|
||||
QAbstractButton* m_pCancelButton;
|
||||
QMutex m_UpdateZeroconfMutex;
|
||||
bool m_SuppressAutoConfigWarning;
|
||||
CommandProcess* m_BonjourInstall;
|
||||
bool m_SuppressEmptyServerWarning;
|
||||
qRuningState m_ExpectedRunningState;
|
||||
QMutex m_StopDesktopMutex;
|
||||
SslCertificate* m_pSslCertificate;
|
||||
bool m_ActivationDialogRunning;
|
||||
QStringList m_PendingClientNames;
|
||||
bool m_SecureSocket;
|
||||
|
||||
void updateAutoConfigWidgets();
|
||||
|
||||
private slots:
|
||||
void on_m_pCheckBoxAutoConfig_toggled(bool checked);
|
||||
void on_m_pComboServerList_currentIndexChanged(QString );
|
||||
void on_m_pButtonApply_clicked();
|
||||
void installBonjour();
|
||||
void on_windowShown();
|
||||
|
||||
void on_m_pLabelAutoConfig_linkActivated(const QString &link);
|
||||
|
||||
void on_m_pComboServerList_currentIndexChanged(const QString &arg1);
|
||||
|
||||
signals:
|
||||
void windowShown();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="Synergy.qrc">:/res/icons/16x16/warning.png</pixmap>
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/16x16/warning.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="Synergy.qrc">:/res/icons/16x16/warning.png</pixmap>
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/16x16/warning.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -129,6 +129,81 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="m_pWidgetAutoConfig" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_pIconAutoConfig">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>244</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/16x16/auto-config.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_pLabelAutoConfig">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Manual Config mode active, consider using Auto Config instead (<a href="#"><span style=" text-decoration: underline; color:#007af4;">Settings</span></a>)</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="m_pSpacerAutoConfig">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_pGroupServer">
|
||||
<property name="sizePolicy">
|
||||
|
@ -289,9 +364,9 @@
|
|||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="m_pLabelComputerName">
|
||||
<property name="text">
|
||||
<string>Screen name:</string>
|
||||
<string>Client name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -305,7 +380,7 @@
|
|||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="m_pLabelServerName">
|
||||
<property name="text">
|
||||
<string>&Server IP:</string>
|
||||
<string>&Server:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>m_pLineEditHostname</cstring>
|
||||
|
@ -313,16 +388,25 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="m_pLineEditHostname"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxAutoConfig">
|
||||
<property name="text">
|
||||
<string>Auto config</string>
|
||||
<widget class="QLineEdit" name="m_pLineEditHostname">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Hostname or IP address of the server computer.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="m_pComboServerList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
|
@ -332,12 +416,19 @@
|
|||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="m_pLabelAutoDetected">
|
||||
<property name="text">
|
||||
<string>Server:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -391,7 +482,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="Synergy.qrc">:/res/icons/16x16/padlock.png</pixmap>
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/16x16/padlock.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -542,7 +633,7 @@
|
|||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="Synergy.qrc"/>
|
||||
<include location="../res/Synergy.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include <QHeaderView>
|
||||
|
||||
ScreenSetupView::ScreenSetupView(QWidget* parent) :
|
||||
QTableView(parent)
|
||||
|
|
|
@ -51,7 +51,9 @@ ServerConfig::ServerConfig(QSettings* settings, int numColumns, int numRows ,
|
|||
m_ServerName(serverName),
|
||||
m_IgnoreAutoConfigClient(false),
|
||||
m_EnableDragAndDrop(false),
|
||||
m_DisableLockToScreen(false),
|
||||
m_ClipboardSharing(true),
|
||||
m_ClipboardSharingSize(defaultClipboardSharingSize()),
|
||||
m_pMainWindow(mainWindow)
|
||||
{
|
||||
Q_ASSERT(m_pSettings);
|
||||
|
@ -116,7 +118,10 @@ void ServerConfig::saveSettings()
|
|||
settings().setValue("switchDoubleTap", switchDoubleTap());
|
||||
settings().setValue("switchCornerSize", switchCornerSize());
|
||||
settings().setValue("ignoreAutoConfigClient", ignoreAutoConfigClient());
|
||||
settings().setValue("disableLockToScreen", disableLockToScreen());
|
||||
settings().setValue("enableDragAndDrop", enableDragAndDrop());
|
||||
settings().setValue("clipboardSharing", clipboardSharing());
|
||||
settings().setValue("clipboardSharingSize", QVariant::fromValue(clipboardSharingSize()));
|
||||
|
||||
writeSettings(settings(), switchCorners(), "switchCorner");
|
||||
|
||||
|
@ -160,7 +165,11 @@ void ServerConfig::loadSettings()
|
|||
setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt());
|
||||
setSwitchCornerSize(settings().value("switchCornerSize").toInt());
|
||||
setIgnoreAutoConfigClient(settings().value("ignoreAutoConfigClient").toBool());
|
||||
setDisableLockToScreen(settings().value("disableLockToScreen", false).toBool());
|
||||
setEnableDragAndDrop(settings().value("enableDragAndDrop", true).toBool());
|
||||
setClipboardSharing(settings().value("clipboardSharing", true).toBool());
|
||||
setClipboardSharingSize(settings().value("clipboardSharingSize",
|
||||
(int) ServerConfig::defaultClipboardSharingSize()).toULongLong());
|
||||
|
||||
readSettings(settings(), switchCorners(), "switchCorner", false, NumSwitchCorners);
|
||||
|
||||
|
@ -247,7 +256,9 @@ QTextStream& operator<<(QTextStream& outStream, const ServerConfig& config)
|
|||
outStream << "\t" << "relativeMouseMoves = " << (config.relativeMouseMoves() ? "true" : "false") << endl;
|
||||
outStream << "\t" << "screenSaverSync = " << (config.screenSaverSync() ? "true" : "false") << endl;
|
||||
outStream << "\t" << "win32KeepForeground = " << (config.win32KeepForeground() ? "true" : "false") << endl;
|
||||
outStream << "\t" << "disableLockToScreen = " << (config.disableLockToScreen() ? "true" : "false") << endl;
|
||||
outStream << "\t" << "clipboardSharing = " << (config.clipboardSharing() ? "true" : "false") << endl;
|
||||
outStream << "\t" << "clipboardSharingSize = " << config.clipboardSharingSize() << endl;
|
||||
|
||||
if (config.hasSwitchDelay())
|
||||
outStream << "\t" << "switchDelay = " << config.switchDelay() << endl;
|
||||
|
@ -292,7 +303,7 @@ int ServerConfig::autoAddScreen(const QString name)
|
|||
}
|
||||
}
|
||||
if (findScreenName(name, targetIndex)) {
|
||||
// already exists.
|
||||
m_pMainWindow->appendLogDebug(QString("ignoring screen already in config: %1").arg(name));
|
||||
return kAutoAddScreenIgnore;
|
||||
}
|
||||
|
||||
|
@ -401,3 +412,21 @@ void::ServerConfig::addToFirstEmptyGrid(const QString &clientName)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t ServerConfig::defaultClipboardSharingSize() {
|
||||
return 3 * 1024; // 3 MiB
|
||||
}
|
||||
|
||||
size_t ServerConfig::setClipboardSharingSize(size_t size) {
|
||||
if (size) {
|
||||
size += 512; // Round up to the nearest megabyte
|
||||
size /= 1024;
|
||||
size *= 1024;
|
||||
setClipboardSharing(true);
|
||||
} else {
|
||||
setClipboardSharing(false);
|
||||
}
|
||||
using std::swap;
|
||||
swap (size, m_ClipboardSharingSize);
|
||||
return size;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,10 @@ class ServerConfig : public BaseConfig
|
|||
const HotkeyList& hotkeys() const { return m_Hotkeys; }
|
||||
bool ignoreAutoConfigClient() const { return m_IgnoreAutoConfigClient; }
|
||||
bool enableDragAndDrop() const { return m_EnableDragAndDrop; }
|
||||
bool disableLockToScreen() const { return m_DisableLockToScreen; }
|
||||
bool clipboardSharing() const { return m_ClipboardSharing; }
|
||||
size_t clipboardSharingSize() const { return m_ClipboardSharingSize; }
|
||||
static size_t defaultClipboardSharingSize();
|
||||
|
||||
void saveSettings();
|
||||
void loadSettings();
|
||||
|
@ -91,7 +94,9 @@ class ServerConfig : public BaseConfig
|
|||
void setSwitchCornerSize(int val) { m_SwitchCornerSize = val; }
|
||||
void setIgnoreAutoConfigClient(bool on) { m_IgnoreAutoConfigClient = on; }
|
||||
void setEnableDragAndDrop(bool on) { m_EnableDragAndDrop = on; }
|
||||
void setDisableLockToScreen(bool on) { m_DisableLockToScreen = on; }
|
||||
void setClipboardSharing(bool on) { m_ClipboardSharing = on; }
|
||||
size_t setClipboardSharingSize(size_t size);
|
||||
QList<bool>& switchCorners() { return m_SwitchCorners; }
|
||||
HotkeyList& hotkeys() { return m_Hotkeys; }
|
||||
|
||||
|
@ -124,7 +129,9 @@ class ServerConfig : public BaseConfig
|
|||
QString m_ServerName;
|
||||
bool m_IgnoreAutoConfigClient;
|
||||
bool m_EnableDragAndDrop;
|
||||
bool m_DisableLockToScreen;
|
||||
bool m_ClipboardSharing;
|
||||
size_t m_ClipboardSharingSize;
|
||||
MainWindow* m_pMainWindow;
|
||||
};
|
||||
|
||||
|
|
|
@ -53,12 +53,16 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config, co
|
|||
m_pCheckBoxCornerBottomLeft->setChecked(serverConfig().switchCorner(BaseConfig::BottomLeft));
|
||||
m_pCheckBoxCornerBottomRight->setChecked(serverConfig().switchCorner(BaseConfig::BottomRight));
|
||||
m_pSpinBoxSwitchCornerSize->setValue(serverConfig().switchCornerSize());
|
||||
m_pCheckBoxDisableLockToScreen->setChecked(serverConfig().disableLockToScreen());
|
||||
|
||||
m_pCheckBoxIgnoreAutoConfigClient->setChecked(serverConfig().ignoreAutoConfigClient());
|
||||
|
||||
m_pCheckBoxEnableDragAndDrop->setChecked(serverConfig().enableDragAndDrop());
|
||||
|
||||
m_pCheckBoxEnableClipboard->setChecked(serverConfig().clipboardSharing());
|
||||
int clipboardSharingSizeM = static_cast<int>(serverConfig().clipboardSharingSize() / 1024);
|
||||
m_pSpinBoxClipboardSizeLimit->setValue(clipboardSharingSizeM);
|
||||
m_pSpinBoxClipboardSizeLimit->setEnabled(serverConfig().clipboardSharing());
|
||||
|
||||
foreach(const Hotkey& hotkey, serverConfig().hotkeys())
|
||||
m_pListHotkeys->addItem(hotkey.text());
|
||||
|
@ -102,7 +106,10 @@ void ServerConfigDialog::accept()
|
|||
serverConfig().setSwitchCornerSize(m_pSpinBoxSwitchCornerSize->value());
|
||||
serverConfig().setIgnoreAutoConfigClient(m_pCheckBoxIgnoreAutoConfigClient->isChecked());
|
||||
serverConfig().setEnableDragAndDrop(m_pCheckBoxEnableDragAndDrop->isChecked());
|
||||
serverConfig().setClipboardSharing(m_pCheckBoxEnableClipboard->isChecked());
|
||||
serverConfig().setDisableLockToScreen(m_pCheckBoxDisableLockToScreen->isChecked());
|
||||
serverConfig().setClipboardSharingSize(m_pSpinBoxClipboardSizeLimit->value() * 1024);
|
||||
serverConfig().setClipboardSharing(m_pCheckBoxEnableClipboard->isChecked()
|
||||
&& m_pSpinBoxClipboardSizeLimit->value());
|
||||
|
||||
// now that the dialog has been accepted, copy the new server config to the original one,
|
||||
// which is a reference to the one in MainWindow.
|
||||
|
@ -212,6 +219,15 @@ void ServerConfigDialog::on_m_pButtonRemoveAction_clicked()
|
|||
delete m_pListActions->currentItem();
|
||||
}
|
||||
|
||||
void ServerConfigDialog::on_m_pCheckBoxEnableClipboard_stateChanged(int const state)
|
||||
{
|
||||
m_pSpinBoxClipboardSizeLimit->setEnabled (state == Qt::Checked);
|
||||
if ((state == Qt::Checked) && (!m_pSpinBoxClipboardSizeLimit->value())) {
|
||||
int size = static_cast<int>((serverConfig().defaultClipboardSharingSize() + 512) / 1024);
|
||||
m_pSpinBoxClipboardSizeLimit->setValue (size ? size : 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ServerConfigDialog::on_m_pListActions_itemSelectionChanged()
|
||||
{
|
||||
m_pButtonEditAction->setEnabled(!m_pListActions->selectedItems().isEmpty());
|
||||
|
|
|
@ -50,6 +50,8 @@ class ServerConfigDialog : public QDialog, public Ui::ServerConfigDialogBase
|
|||
void on_m_pButtonEditAction_clicked();
|
||||
void on_m_pButtonRemoveAction_clicked();
|
||||
|
||||
void on_m_pCheckBoxEnableClipboard_stateChanged(int state);
|
||||
|
||||
protected:
|
||||
ServerConfig& serverConfig() { return m_ServerConfig; }
|
||||
void setOrigServerConfig(const ServerConfig& s) { m_OrigServerConfig = s; }
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="Synergy.qrc">:/res/icons/64x64/user-trash.png</pixmap>
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/64x64/user-trash.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="Synergy.qrc">:/res/icons/64x64/video-display.png</pixmap>
|
||||
<pixmap resource="../res/Synergy.qrc">:/res/icons/64x64/video-display.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -408,6 +408,60 @@ Double click on a screen to edit its settings.</string>
|
|||
<string>&Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<item row="8" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_pCheckBoxEnableClipboard">
|
||||
<property name="text">
|
||||
<string>Enable clipboard sharing</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="m_pSpinBoxClipboardSizeLimit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>3</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>MB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxEnableDragAndDrop">
|
||||
<property name="text">
|
||||
<string>Enable drag and drop file transfers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxWin32KeepForeground">
|
||||
<property name="enabled">
|
||||
|
@ -428,13 +482,23 @@ Double click on a screen to edit its settings.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxScreenSaverSync">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
<item row="12" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxIgnoreAutoConfigClient">
|
||||
<property name="text">
|
||||
<string>S&ynchronize screen savers</string>
|
||||
<string>Ignore auto config clients</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -491,40 +555,20 @@ Double click on a screen to edit its settings.</string>
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxScreenSaverSync">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxEnableDragAndDrop">
|
||||
<property name="text">
|
||||
<string>Enable drag and drop file transfers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxIgnoreAutoConfigClient">
|
||||
<property name="text">
|
||||
<string>Ignore auto config clients</string>
|
||||
<string>S&ynchronize screen savers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxEnableClipboard">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxDisableLockToScreen">
|
||||
<property name="text">
|
||||
<string>Enable clipboard sharing</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<string>Disable lock to screen</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -662,7 +706,7 @@ Double click on a screen to edit its settings.</string>
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="Synergy.qrc"/>
|
||||
<include location="../res/Synergy.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -25,6 +25,8 @@
|
|||
#include "AppConfig.h"
|
||||
#include "SslCertificate.h"
|
||||
#include "MainWindow.h"
|
||||
#include "BonjourWindows.h"
|
||||
#include "Zeroconf.h"
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
@ -37,10 +39,14 @@ static const char networkSecurity[] = "ns";
|
|||
SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
Ui::SettingsDialogBase(),
|
||||
m_appConfig(config)
|
||||
m_appConfig(config),
|
||||
m_pBonjourWindows(nullptr)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
// TODO: maybe just accept MainWindow type in ctor?
|
||||
m_pMainWindow = dynamic_cast<MainWindow*>(parent);
|
||||
|
||||
m_Locale.fillLanguageComboBox(m_pComboLanguage);
|
||||
|
||||
m_pLineEditScreenName->setText(appConfig().screenName());
|
||||
|
@ -53,17 +59,42 @@ SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
|
|||
m_pCheckBoxAutoHide->setChecked(appConfig().getAutoHide());
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
m_pComboElevate->setCurrentIndex(static_cast<int>(appConfig().elevateMode()));
|
||||
m_pBonjourWindows = new BonjourWindows(this, m_pMainWindow, m_appConfig);
|
||||
if (m_pBonjourWindows->isRunning()) {
|
||||
allowAutoConfig();
|
||||
}
|
||||
|
||||
m_pComboElevate->setCurrentIndex(static_cast<int>(appConfig().elevateMode()));
|
||||
|
||||
m_pCheckBoxAutoHide->hide();
|
||||
#else
|
||||
// elevate checkbox is only useful on ms windows.
|
||||
m_pLabelElevate->hide();
|
||||
m_pComboElevate->hide();
|
||||
|
||||
// for linux and mac, allow auto config by default
|
||||
allowAutoConfig();
|
||||
#endif
|
||||
|
||||
m_pCheckBoxEnableCrypto->setChecked(m_appConfig.getCryptoEnabled());
|
||||
m_pCheckBoxEnableCrypto->setEnabled(m_appConfig.edition() == kPro);
|
||||
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
|
||||
m_pCheckBoxEnableCrypto->setEnabled(true);
|
||||
m_pLabelProUpgrade->hide();
|
||||
|
||||
m_pCheckBoxAutoConfig->hide();
|
||||
m_pLabelInstallBonjour->hide();
|
||||
|
||||
#else
|
||||
|
||||
bool isPro = m_appConfig.edition() == kPro;
|
||||
m_pCheckBoxEnableCrypto->setEnabled(isPro);
|
||||
m_pLabelProUpgrade->setVisible(!isPro);
|
||||
|
||||
m_pCheckBoxAutoConfig->setChecked(appConfig().autoConfig());
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void SettingsDialog::accept()
|
||||
|
@ -77,6 +108,7 @@ void SettingsDialog::accept()
|
|||
appConfig().setLanguage(m_pComboLanguage->itemData(m_pComboLanguage->currentIndex()).toString());
|
||||
appConfig().setElevateMode(static_cast<ElevateMode>(m_pComboElevate->currentIndex()));
|
||||
appConfig().setAutoHide(m_pCheckBoxAutoHide->isChecked());
|
||||
appConfig().setAutoConfig(m_pCheckBoxAutoConfig->isChecked());
|
||||
appConfig().saveSettings();
|
||||
QDialog::accept();
|
||||
}
|
||||
|
@ -92,7 +124,7 @@ void SettingsDialog::reject()
|
|||
|
||||
void SettingsDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
if (event != 0)
|
||||
if (event != nullptr)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
|
@ -114,6 +146,13 @@ void SettingsDialog::changeEvent(QEvent* event)
|
|||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::allowAutoConfig()
|
||||
{
|
||||
m_pLabelInstallBonjour->hide();
|
||||
m_pCheckBoxAutoConfig->setEnabled(true);
|
||||
m_pCheckBoxAutoConfig->setChecked(m_appConfig.autoConfig());
|
||||
}
|
||||
|
||||
void SettingsDialog::on_m_pCheckBoxLogToFile_stateChanged(int i)
|
||||
{
|
||||
bool checked = i == 2;
|
||||
|
@ -148,7 +187,13 @@ void SettingsDialog::on_m_pCheckBoxEnableCrypto_toggled(bool checked)
|
|||
if (checked) {
|
||||
SslCertificate sslCertificate;
|
||||
sslCertificate.generateCertificate();
|
||||
MainWindow& mainWindow = dynamic_cast<MainWindow&> (*this->parent());
|
||||
mainWindow.updateLocalFingerprint();
|
||||
m_pMainWindow->updateLocalFingerprint();
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_m_pLabelInstallBonjour_linkActivated(const QString&)
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
m_pBonjourWindows->downloadAndInstall();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
#include "SynergyLocale.h"
|
||||
#include "CoreInterface.h"
|
||||
|
||||
class MainWindow;
|
||||
class AppConfig;
|
||||
class BonjourWindows;
|
||||
|
||||
class SettingsDialog : public QDialog, public Ui::SettingsDialogBase
|
||||
{
|
||||
|
@ -35,6 +37,7 @@ class SettingsDialog : public QDialog, public Ui::SettingsDialogBase
|
|||
SettingsDialog(QWidget* parent, AppConfig& config);
|
||||
static QString browseForSynergyc(QWidget* parent, const QString& programDir, const QString& synergycName);
|
||||
static QString browseForSynergys(QWidget* parent, const QString& programDir, const QString& synergysName);
|
||||
void allowAutoConfig();
|
||||
|
||||
protected:
|
||||
void accept();
|
||||
|
@ -43,15 +46,18 @@ class SettingsDialog : public QDialog, public Ui::SettingsDialogBase
|
|||
AppConfig& appConfig() { return m_appConfig; }
|
||||
|
||||
private:
|
||||
MainWindow* m_pMainWindow;
|
||||
AppConfig& m_appConfig;
|
||||
SynergyLocale m_Locale;
|
||||
CoreInterface m_CoreInterface;
|
||||
BonjourWindows* m_pBonjourWindows;
|
||||
|
||||
private slots:
|
||||
void on_m_pCheckBoxEnableCrypto_toggled(bool checked);
|
||||
void on_m_pComboLanguage_currentIndexChanged(int index);
|
||||
void on_m_pCheckBoxLogToFile_stateChanged(int );
|
||||
void on_m_pButtonBrowseLog_clicked();
|
||||
void on_m_pLabelInstallBonjour_linkActivated(const QString &link);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>368</width>
|
||||
<height>380</height>
|
||||
<width>357</width>
|
||||
<height>496</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -157,7 +157,23 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_pGroupNetworkSecurity">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_pGroupNetwork">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -168,38 +184,96 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&Network Security</string>
|
||||
<string>&Network</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxEnableCrypto">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use &SSL encryption</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<layout class="QGridLayout" name="m_pGridLayoutNetwork">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="verticalSpacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
</spacer>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxEnableCrypto">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable &TLS Encryption</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxAutoConfig">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable Auto Config</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="m_pLabelInstallBonjour">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><a href="#"><span style=" text-decoration: underline; color:#007af4;">Install Bonjour</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="m_pLabelProUpgrade">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><a href="https://symless.com/account?source=gui&amp;intent=upgrade"><span style=" text-decoration: underline; color:#007af4;">Upgrade to Pro</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_pGroupLog">
|
||||
<property name="sizePolicy">
|
||||
|
@ -236,21 +310,6 @@
|
|||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="m_pComboLogLevel">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Error</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Warning</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Note</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Info</string>
|
||||
|
@ -305,10 +364,13 @@
|
|||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -332,7 +394,6 @@
|
|||
<tabstop>m_pLineEditInterface</tabstop>
|
||||
<tabstop>m_pComboElevate</tabstop>
|
||||
<tabstop>m_pCheckBoxAutoHide</tabstop>
|
||||
<tabstop>m_pCheckBoxEnableCrypto</tabstop>
|
||||
<tabstop>m_pComboLogLevel</tabstop>
|
||||
<tabstop>m_pCheckBoxLogToFile</tabstop>
|
||||
<tabstop>m_pLineEditLogFilename</tabstop>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-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
|
||||
|
@ -14,10 +14,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "SetupWizard.h"
|
||||
#include "MainWindow.h"
|
||||
#include "WebClient.h"
|
||||
#include "ActivationNotifier.h"
|
||||
#include "LicenseManager.h"
|
||||
#include "QSynergyApplication.h"
|
||||
|
@ -61,7 +60,7 @@ SetupWizard::~SetupWizard()
|
|||
}
|
||||
|
||||
bool SetupWizard::validateCurrentPage()
|
||||
{
|
||||
{
|
||||
QMessageBox message;
|
||||
message.setWindowTitle(tr("Setup Synergy"));
|
||||
message.setIcon(QMessageBox::Information);
|
||||
|
@ -127,7 +126,6 @@ void SetupWizard::accept()
|
|||
|
||||
if (m_StartMain)
|
||||
{
|
||||
m_MainWindow.updateZeroconfService();
|
||||
m_MainWindow.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2015-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
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "WebClient.h"
|
||||
|
||||
#include "QUtility.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <QCoreApplication>
|
||||
#include <stdexcept>
|
||||
|
||||
bool
|
||||
WebClient::getEdition (int& edition, QString& errorOut) {
|
||||
QString responseJson = request();
|
||||
|
||||
/* TODO: This is horrible and should be ripped out as soon as we move
|
||||
* to Qt 5. See issue #5630
|
||||
*/
|
||||
|
||||
QRegExp resultRegex(".*\"result\".*:.*(true|false).*");
|
||||
if (resultRegex.exactMatch (responseJson)) {
|
||||
QString boolString = resultRegex.cap(1);
|
||||
if (boolString == "true") {
|
||||
QRegExp editionRegex(".*\"edition\".*:.*\"([^\"]+)\".*");
|
||||
if (editionRegex.exactMatch(responseJson)) {
|
||||
QString e = editionRegex.cap(1);
|
||||
edition = e.toInt();
|
||||
return true;
|
||||
} else {
|
||||
throw std::runtime_error ("Unrecognised server response.");
|
||||
}
|
||||
} else {
|
||||
errorOut = tr("Login failed. Invalid email address or password.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
QRegExp errorRegex(".*\"error\".*:.*\"([^\"]+)\".*");
|
||||
if (errorRegex.exactMatch (responseJson)) {
|
||||
errorOut = errorRegex.cap(1).replace("\\n", "\n");
|
||||
return false;
|
||||
} else {
|
||||
throw std::runtime_error ("Unrecognised server response.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
WebClient::setEmail (QString email, QString& errorOut) {
|
||||
if (email.isEmpty()) {
|
||||
errorOut = tr("Your email address cannot be left blank.");
|
||||
return false;
|
||||
}
|
||||
m_Email = email;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
WebClient::setPassword (QString password, QString&) {
|
||||
m_Password = password;
|
||||
return true;
|
||||
}
|
||||
|
||||
QString
|
||||
WebClient::request() {
|
||||
QStringList args("--login-auth");
|
||||
QString credentials (m_Email + ":" + hash(m_Password) + "\n");
|
||||
return m_CoreInterface.run (args, credentials);
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2015-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
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WEBCLIENT_H
|
||||
#define WEBCLIENT_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
|
||||
#include "CoreInterface.h"
|
||||
|
||||
class QMessageBox;
|
||||
class QWidget;
|
||||
class QStringList;
|
||||
|
||||
class WebClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
bool getEdition (int& edition, QString& errorOut);
|
||||
bool setEmail (QString email, QString& errorOut);
|
||||
bool setPassword (QString password, QString& errorOut);
|
||||
signals:
|
||||
void error(QString e);
|
||||
|
||||
private:
|
||||
QString request();
|
||||
|
||||
QString m_Email;
|
||||
QString m_Password;
|
||||
CoreInterface m_CoreInterface;
|
||||
};
|
||||
|
||||
#endif // WEBCLIENT_H
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2018 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
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Zeroconf.h"
|
||||
|
||||
#include "ZeroconfService.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
Zeroconf::Zeroconf(MainWindow* mainWindow) :
|
||||
m_pMainWindow(mainWindow),
|
||||
m_pZeroconfService(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
Zeroconf::~Zeroconf()
|
||||
{
|
||||
stopService();
|
||||
}
|
||||
|
||||
void Zeroconf::startService()
|
||||
{
|
||||
if (m_pZeroconfService != nullptr) {
|
||||
m_pMainWindow->appendLogInfo("restarting zeroconf service");
|
||||
delete m_pZeroconfService;
|
||||
m_pZeroconfService = nullptr;
|
||||
}
|
||||
else {
|
||||
m_pMainWindow->appendLogInfo("starting zeroconf service");
|
||||
}
|
||||
|
||||
m_pZeroconfService = new ZeroconfService(m_pMainWindow);
|
||||
|
||||
m_pMainWindow->appendLogInfo("started zeroconf service");
|
||||
}
|
||||
|
||||
void Zeroconf::stopService()
|
||||
{
|
||||
if (m_pZeroconfService != nullptr) {
|
||||
m_pMainWindow->appendLogInfo("stopping zeroconf service");
|
||||
delete m_pZeroconfService;
|
||||
m_pZeroconfService = nullptr;
|
||||
m_pMainWindow->appendLogInfo("stopped zeroconf service");
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
* Copyright (C) 2012-2018 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -17,12 +17,22 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_INTERNET ArchInternetWindows
|
||||
#include <QObject>
|
||||
|
||||
#include "base/String.h"
|
||||
class MainWindow;
|
||||
class ZeroconfService;
|
||||
|
||||
class Zeroconf : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
class ArchInternetWindows {
|
||||
public:
|
||||
String get(const String& url);
|
||||
String urlEncode(const String& url);
|
||||
Zeroconf(MainWindow* mainWindow);
|
||||
virtual ~Zeroconf();
|
||||
void startService();
|
||||
void stopService();
|
||||
|
||||
private:
|
||||
MainWindow* m_pMainWindow;
|
||||
ZeroconfService* m_pZeroconfService;
|
||||
};
|
|
@ -33,13 +33,13 @@ static const QStringList preferedIPAddress(
|
|||
"10." <<
|
||||
"172.");
|
||||
|
||||
const char* ZeroconfService:: m_ServerServiceName = "_synergyServerZeroconf._tcp";
|
||||
const char* ZeroconfService:: m_ClientServiceName = "_synergyClientZeroconf._tcp";
|
||||
const char* ZeroconfService:: m_ServerServiceName = "_synergyServer._tcp";
|
||||
const char* ZeroconfService:: m_ClientServiceName = "_synergyClient._tcp";
|
||||
|
||||
ZeroconfService::ZeroconfService(MainWindow* mainWindow) :
|
||||
m_pMainWindow(mainWindow),
|
||||
m_pZeroconfBrowser(0),
|
||||
m_pZeroconfRegister(0),
|
||||
m_pZeroconfBrowser(nullptr),
|
||||
m_pZeroconfRegister(nullptr),
|
||||
m_ServiceRegistered(false)
|
||||
{
|
||||
if (m_pMainWindow->synergyType() == MainWindow::synergyServer) {
|
||||
|
@ -81,7 +81,7 @@ void ZeroconfService::serverDetected(const QList<ZeroconfRecord>& list)
|
|||
registerService(false);
|
||||
m_pMainWindow->appendLogInfo(tr("zeroconf server detected: %1").arg(
|
||||
record.serviceName));
|
||||
m_pMainWindow->serverDetected(record.serviceName);
|
||||
m_pMainWindow->addZeroconfServer(record.serviceName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,8 @@ void ZeroconfService::clientDetected(const QList<ZeroconfRecord>& list)
|
|||
|
||||
void ZeroconfService::errorHandle(DNSServiceErrorType errorCode)
|
||||
{
|
||||
QMessageBox::critical(0, tr("Zero configuration service"),
|
||||
QMessageBox::critical(
|
||||
m_pMainWindow, tr("Synergy Auto Config"),
|
||||
tr("Error code: %1.").arg(errorCode));
|
||||
}
|
||||
|
||||
|
@ -127,8 +128,9 @@ bool ZeroconfService::registerService(bool server)
|
|||
|
||||
if (!m_ServiceRegistered) {
|
||||
if (!m_zeroconfServer.listen()) {
|
||||
QMessageBox::critical(0, tr("Zero configuration service"),
|
||||
tr("Unable to start the zeroconf: %1.")
|
||||
QMessageBox::critical(
|
||||
m_pMainWindow, tr("Synergy Auto Config"),
|
||||
tr("Unable to start zeroconf: %1.")
|
||||
.arg(m_zeroconfServer.errorString()));
|
||||
result = false;
|
||||
}
|
||||
|
@ -137,7 +139,8 @@ bool ZeroconfService::registerService(bool server)
|
|||
if (server) {
|
||||
QString localIP = getLocalIPAddresses();
|
||||
if (localIP.isEmpty()) {
|
||||
QMessageBox::warning(m_pMainWindow, tr("Synergy"),
|
||||
QMessageBox::warning(
|
||||
m_pMainWindow, tr("Synergy Auto Config"),
|
||||
tr("Failed to get local IP address. "
|
||||
"Please manually type in server address "
|
||||
"on your clients"));
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
class QThreadImpl : public QThread
|
||||
{
|
||||
public:
|
||||
static void msleep(unsigned long msecs)
|
||||
{
|
||||
QThread::msleep(msecs);
|
||||
}
|
||||
static void msleep(unsigned long msecs)
|
||||
{
|
||||
QThread::msleep(msecs);
|
||||
}
|
||||
};
|
||||
|
||||
int waitForTray();
|
||||
|
@ -59,80 +59,90 @@ int main(int argc, char* argv[])
|
|||
/* Workaround for QTBUG-40332 - "High ping when QNetworkAccessManager is instantiated" */
|
||||
::setenv ("QT_BEARER_POLL_TIMEOUT", "-1", 1);
|
||||
#endif
|
||||
QCoreApplication::setOrganizationName("Synergy");
|
||||
QCoreApplication::setOrganizationDomain("http://symless.com/");
|
||||
QCoreApplication::setApplicationName("Synergy");
|
||||
QCoreApplication::setOrganizationName("Synergy");
|
||||
QCoreApplication::setOrganizationDomain("http://symless.com/");
|
||||
QCoreApplication::setApplicationName("Synergy");
|
||||
|
||||
QSynergyApplication app(argc, argv);
|
||||
QSynergyApplication app(argc, argv);
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
|
||||
if (app.applicationDirPath().startsWith("/Volumes/")) {
|
||||
QMessageBox::information(
|
||||
NULL, "Synergy",
|
||||
"Please drag Synergy to the Applications folder, and open it from there.");
|
||||
return 1;
|
||||
}
|
||||
if (app.applicationDirPath().startsWith("/Volumes/")) {
|
||||
QMessageBox::information(
|
||||
NULL, "Synergy",
|
||||
"Please drag Synergy to the Applications folder, and open it from there.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!checkMacAssistiveDevices())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (!checkMacAssistiveDevices())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!waitForTray())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (!waitForTray())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
#endif
|
||||
|
||||
QSettings settings;
|
||||
AppConfig appConfig (&settings);
|
||||
qRegisterMetaType<Edition>("Edition");
|
||||
LicenseManager licenseManager (&appConfig);
|
||||
QSettings settings;
|
||||
AppConfig appConfig (&settings);
|
||||
qRegisterMetaType<Edition>("Edition");
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
LicenseManager licenseManager (&appConfig);
|
||||
#endif
|
||||
|
||||
app.switchTranslator(appConfig.language());
|
||||
app.switchTranslator(appConfig.language());
|
||||
|
||||
MainWindow mainWindow(settings, appConfig, licenseManager);
|
||||
SetupWizard setupWizard(mainWindow, true);
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
MainWindow mainWindow(settings, appConfig);
|
||||
#else
|
||||
MainWindow mainWindow(settings, appConfig, licenseManager);
|
||||
#endif
|
||||
|
||||
if (appConfig.wizardShouldRun())
|
||||
{
|
||||
setupWizard.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
mainWindow.open();
|
||||
}
|
||||
QObject::connect(dynamic_cast<QObject*>(&app), SIGNAL(aboutToQuit()),
|
||||
&mainWindow, SLOT(saveSettings()));
|
||||
|
||||
return app.exec();
|
||||
SetupWizard setupWizard(mainWindow, true);
|
||||
|
||||
if (appConfig.wizardShouldRun())
|
||||
{
|
||||
setupWizard.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
mainWindow.open();
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
int waitForTray()
|
||||
{
|
||||
// on linux, the system tray may not be available immediately after logging in,
|
||||
// so keep retrying but give up after a short time.
|
||||
int trayAttempts = 0;
|
||||
while (true)
|
||||
{
|
||||
if (QSystemTrayIcon::isSystemTrayAvailable())
|
||||
{
|
||||
break;
|
||||
}
|
||||
// on linux, the system tray may not be available immediately after logging in,
|
||||
// so keep retrying but give up after a short time.
|
||||
int trayAttempts = 0;
|
||||
while (true)
|
||||
{
|
||||
if (QSystemTrayIcon::isSystemTrayAvailable())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (++trayAttempts > TRAY_RETRY_COUNT)
|
||||
{
|
||||
QMessageBox::critical(NULL, "Synergy",
|
||||
QObject::tr("System tray is unavailable, don't close your window."));
|
||||
return true;
|
||||
}
|
||||
if (++trayAttempts > TRAY_RETRY_COUNT)
|
||||
{
|
||||
QMessageBox::critical(NULL, "Synergy",
|
||||
QObject::tr("System tray is unavailable, don't close your window."));
|
||||
return true;
|
||||
}
|
||||
|
||||
QThreadImpl::msleep(TRAY_RETRY_WAIT);
|
||||
}
|
||||
return true;
|
||||
QThreadImpl::msleep(TRAY_RETRY_WAIT);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
|
@ -140,36 +150,36 @@ bool checkMacAssistiveDevices()
|
|||
{
|
||||
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 // mavericks
|
||||
|
||||
// new in mavericks, applications are trusted individually
|
||||
// with use of the accessibility api. this call will show a
|
||||
// prompt which can show the security/privacy/accessibility
|
||||
// tab, with a list of allowed applications. synergy should
|
||||
// show up there automatically, but will be unchecked.
|
||||
// new in mavericks, applications are trusted individually
|
||||
// with use of the accessibility api. this call will show a
|
||||
// prompt which can show the security/privacy/accessibility
|
||||
// tab, with a list of allowed applications. synergy should
|
||||
// show up there automatically, but will be unchecked.
|
||||
|
||||
if (AXIsProcessTrusted()) {
|
||||
return true;
|
||||
}
|
||||
if (AXIsProcessTrusted()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const void* keys[] = { kAXTrustedCheckOptionPrompt };
|
||||
const void* trueValue[] = { kCFBooleanTrue };
|
||||
CFDictionaryRef options = CFDictionaryCreate(NULL, keys, trueValue, 1, NULL, NULL);
|
||||
const void* keys[] = { kAXTrustedCheckOptionPrompt };
|
||||
const void* trueValue[] = { kCFBooleanTrue };
|
||||
CFDictionaryRef options = CFDictionaryCreate(NULL, keys, trueValue, 1, NULL, NULL);
|
||||
|
||||
bool result = AXIsProcessTrustedWithOptions(options);
|
||||
CFRelease(options);
|
||||
return result;
|
||||
bool result = AXIsProcessTrustedWithOptions(options);
|
||||
CFRelease(options);
|
||||
return result;
|
||||
|
||||
#else
|
||||
|
||||
// now deprecated in mavericks.
|
||||
bool result = AXAPIEnabled();
|
||||
if (!result) {
|
||||
QMessageBox::information(
|
||||
NULL, "Synergy",
|
||||
"Please enable access to assistive devices "
|
||||
"System Preferences -> Security & Privacy -> "
|
||||
"Privacy -> Accessibility, then re-open Synergy.");
|
||||
}
|
||||
return result;
|
||||
// now deprecated in mavericks.
|
||||
bool result = AXAPIEnabled();
|
||||
if (!result) {
|
||||
QMessageBox::information(
|
||||
NULL, "Synergy",
|
||||
"Please enable access to assistive devices "
|
||||
"System Preferences -> Security & Privacy -> "
|
||||
"Privacy -> Accessibility, then re-open Synergy.");
|
||||
}
|
||||
return result;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
# include "arch/win32/ArchSystemWindows.h"
|
||||
# include "arch/win32/ArchTaskBarWindows.h"
|
||||
# include "arch/win32/ArchTimeWindows.h"
|
||||
# include "arch/win32/ArchInternetWindows.h"
|
||||
#elif SYSAPI_UNIX
|
||||
# include "arch/unix/ArchConsoleUnix.h"
|
||||
# include "arch/unix/ArchDaemonUnix.h"
|
||||
|
@ -65,7 +64,6 @@
|
|||
# include "arch/unix/ArchSystemUnix.h"
|
||||
# include "arch/unix/ArchTaskBarXWindows.h"
|
||||
# include "arch/unix/ArchTimeUnix.h"
|
||||
# include "arch/unix/ArchInternetUnix.h"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
|
@ -120,11 +118,8 @@ public:
|
|||
|
||||
static void setInstance(Arch* s) { s_instance = s; }
|
||||
|
||||
ARCH_INTERNET& internet() const { return (ARCH_INTERNET&)m_internet; }
|
||||
|
||||
private:
|
||||
static Arch* s_instance;
|
||||
ARCH_INTERNET m_internet;
|
||||
};
|
||||
|
||||
//! Convenience object to lock/unlock an arch mutex
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue