mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-12 22:55:53 +08:00
Compare commits
157 Commits
v2.0.0-sta
...
v1.10.2-st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c0101405a | ||
|
|
e412cd2189 | ||
|
|
78be330320 | ||
|
|
2d9b2c29e6 | ||
|
|
79fb9e2c59 | ||
|
|
70ba53caf4 | ||
|
|
6f053590f9 | ||
|
|
667d79263d | ||
|
|
8dcb63d3c0 | ||
|
|
baa913b1ac | ||
|
|
27404ff2b9 | ||
|
|
55dd155e56 | ||
|
|
2d76a4c5f5 | ||
|
|
faf9e48993 | ||
|
|
751fcffc87 | ||
|
|
7fb4805521 | ||
|
|
0ef70ac2b2 | ||
|
|
6c6e2b6bd3 | ||
|
|
207247b7ef | ||
|
|
7f4ca77444 | ||
|
|
fe6cc4b849 | ||
|
|
e29ee68ff9 | ||
|
|
6f17cb9a31 | ||
|
|
eb620097c0 | ||
|
|
8b9722df25 | ||
|
|
de7c5ce6b7 | ||
|
|
a56abf68dd | ||
|
|
9bccfb89cc | ||
|
|
409150ec4f | ||
|
|
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 | ||
|
|
f51ec97b3b | ||
|
|
2600cb303d | ||
|
|
d61d2c0d6c |
62
.cirrus.yml
Normal file
62
.cirrus.yml
Normal file
@@ -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
|
||||
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -27,6 +27,6 @@ Client: Applesoft Windy OS 10
|
||||
* Is there a way to work around it? No/Yes, you can...
|
||||
* Does this bug prevent you from using Synergy entirely? Yes/No
|
||||
|
||||
Please follow the link below to send us logs from both your server and client sides if it's appropriate. https://github.com/symless/synergy-core/wiki/Sending-logs
|
||||
Please follow the link below to send us logs from both your server and client sides if it's appropriate. https://github.com/symless/synergy/wiki/Sending-logs
|
||||
|
||||
Put anything else you can think of here.
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -19,5 +19,8 @@ src/gui/gui.pro.user*
|
||||
src/gui/.qmake.stash
|
||||
src/gui/.rnd
|
||||
src/setup/win32/synergy.suo
|
||||
CMakeCache.txt
|
||||
CMakeLists.txt.user
|
||||
/.idea
|
||||
/cmake-build-debug
|
||||
/CMakeLists.txt.user
|
||||
/.vs
|
||||
/CMakeLists.txt.*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Synergy build parameters
|
||||
#
|
||||
SYNERGY_VERSION_MAJOR = 2
|
||||
SYNERGY_VERSION_MINOR = 0
|
||||
SYNERGY_VERSION_PATCH = 0
|
||||
SYNERGY_VERSION_MAJOR = 1
|
||||
SYNERGY_VERSION_MINOR = 10
|
||||
SYNERGY_VERSION_PATCH = 2
|
||||
SYNERGY_VERSION_STAGE = snapshot
|
||||
|
||||
56
CI/MacOS/qtifwsilent.qs
Normal file
56
CI/MacOS/qtifwsilent.qs
Normal file
@@ -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);
|
||||
}
|
||||
6
CI/Windows/build.bat
Normal file
6
CI/Windows/build.bat
Normal file
@@ -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
|
||||
54
CI/Windows/qtifwsilent.qs
Normal file
54
CI/Windows/qtifwsilent.qs
Normal file
@@ -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);
|
||||
}
|
||||
6
CI/build.sh
Normal file
6
CI/build.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
pwd
|
||||
ls -la
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
12
CI/package.sh
Normal file
12
CI/package.sh
Normal file
@@ -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
|
||||
24
CI/ubuntu1604.Dockerfile
Normal file
24
CI/ubuntu1604.Dockerfile
Normal file
@@ -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"]
|
||||
24
CI/ubuntu1804.Dockerfile
Normal file
24
CI/ubuntu1804.Dockerfile
Normal file
@@ -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"]
|
||||
24
CI/ubuntu1904.Dockerfile
Normal file
24
CI/ubuntu1904.Dockerfile
Normal file
@@ -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"]
|
||||
@@ -17,7 +17,15 @@
|
||||
cmake_minimum_required (VERSION 3.4)
|
||||
project (synergy-core C CXX)
|
||||
|
||||
option (SYNERGY_CORE_INSTALL "Enable Synergy Core install (Mac and Linux)" OFF)
|
||||
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)
|
||||
@@ -128,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")
|
||||
@@ -335,4 +336,62 @@ 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.bat
|
||||
"SET SYNERGY_VERSION_MAJOR=\"${SYNERGY_VERSION_MAJOR}\"\n"
|
||||
"SET SYNERGY_VERSION_MINOR=\"${SYNERGY_VERSION_MINOR}\"\n"
|
||||
"SET SYNERGY_VERSION_PATCH=\"${SYNERGY_VERSION_PATCH}\"\n"
|
||||
"SET SYNERGY_VERSION_STAGE=\"${SYNERGY_VERSION_STAGE}\"\n")
|
||||
endif()
|
||||
endmacro(generate_versionfile)
|
||||
|
||||
|
||||
if (${SYNERGY_BUILD_LEGACY_INSTALLER})
|
||||
#
|
||||
# macOS app Bundle
|
||||
#
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (CMAKE_INSTALL_RPATH "@loader_path/../Libraries;@loader_path/../Frameworks")
|
||||
set (SYNERGY_BUNDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dist/macos/bundle)
|
||||
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()
|
||||
|
||||
#
|
||||
# Windows installer
|
||||
#
|
||||
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()
|
||||
|
||||
#
|
||||
# Linux installation
|
||||
#
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
configure_files (${CMAKE_CURRENT_SOURCE_DIR}/dist/rpm ${CMAKE_BINARY_DIR}/rpm)
|
||||
install(FILES res/synergy.svg DESTINATION share/icons/hicolor/scalable/apps)
|
||||
if("${VERSION_MAJOR}" STREQUAL "2")
|
||||
install(FILES res/synergy2.desktop DESTINATION share/applications)
|
||||
else()
|
||||
install(FILES res/synergy.desktop DESTINATION share/applications)
|
||||
endif()
|
||||
generate_versionfile()
|
||||
endif()
|
||||
|
||||
else()
|
||||
message (STATUS "NOT configuring the v1 installer")
|
||||
endif()
|
||||
add_subdirectory (src)
|
||||
|
||||
99
ChangeLog
99
ChangeLog
@@ -1,21 +1,91 @@
|
||||
v1.9.0-rc3
|
||||
============
|
||||
Bug #4132 - Laggy mouse cursor on macOS clients
|
||||
v1.10.2-stable
|
||||
==============
|
||||
|
||||
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
|
||||
|
||||
|
||||
22
README.md
Normal file
22
README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Synergy Core
|
||||
|
||||
This is the open source core component of Synergy, a keyboard and mouse sharing tool.
|
||||
|
||||
## Recommended
|
||||
|
||||
Things most people will need.
|
||||
|
||||
* [Download](https://symless.com/synergy/downloads) - Get the compiled version of Synergy 1 or Synergy 2.
|
||||
* [Contact Support](https://symless.com/contact/customer-support) - Open a support ticket and talk directly to the Synergy team.
|
||||
* [Help Guides](https://symless.com/synergy-help) - Self-help guides and information for when you don't want to talk to people.
|
||||
* [Join us on Slack](http://bitly.com/synergy-slack) - Talk to other Synergy users in real time using instant messaging.
|
||||
* [Symless Forums](https://symless.com/forums/forum/11-synergy/) - Discuss Synergy issues on the Symless Forums.
|
||||
|
||||
## Advanced Users
|
||||
|
||||
Not for the faint hearted. Only use these if you know what you're doing.
|
||||
|
||||
* [Getting Started](https://github.com/symless/synergy-core/wiki/Getting-Started) - How to checkout the code from git and use the right branch.
|
||||
* [Compiling](https://github.com/symless/synergy-core/wiki/Compiling) - Instructions on how to compile Synergy Core from source.
|
||||
* [Text Config](https://github.com/symless/synergy-core/wiki/Text-Config) - Write a text config file when running Synergy Core manually.
|
||||
* [Command Line](https://github.com/symless/synergy-core/wiki/Command-Line) - Go full manual and run Synergy Core from the command line.
|
||||
@@ -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 2)
|
||||
endif()
|
||||
|
||||
set (SYNERGY_VERSION_MAJOR 1)
|
||||
set (SYNERGY_VERSION_MINOR 10)
|
||||
set (SYNERGY_VERSION_PATCH 2)
|
||||
set (SYNERGY_VERSION_STAGE "stable")
|
||||
|
||||
#
|
||||
# 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 0)
|
||||
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()
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -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},
|
||||
|
||||
8
dist/wix/Include.wxi.in
vendored
8
dist/wix/Include.wxi.in
vendored
@@ -2,8 +2,8 @@
|
||||
<Include>
|
||||
<?define Name="Synergy" ?>
|
||||
<?define Version="@SYNERGY_VERSION@" ?>
|
||||
<?define QtVersion="5.9.1" ?> <!-- TODO: Configure this externally //-->
|
||||
<?define Author="Symless" ?>
|
||||
<?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" ?>
|
||||
<?define ExtPath="@CMAKE_CURRENT_SOURCE_DIR@/ext" ?>
|
||||
@@ -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" ?>
|
||||
|
||||
27
dist/wix/Product.wxs
vendored
27
dist/wix/Product.wxs
vendored
@@ -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.
@@ -3,8 +3,8 @@ http://symless.com/
|
||||
|
||||
Synergy allows you to share your keyboard and mouse between computers over a network.
|
||||
|
||||
For FAQ, setup, and usage instructions, please visit our wiki:
|
||||
https://github.com/symless/synergy-core/wiki
|
||||
For FAQ, setup, and usage instructions, please visit our online Readme:
|
||||
http://symless.com/pm/projects/synergy/wiki/Readme
|
||||
|
||||
Have fun!
|
||||
|
||||
|
||||
12
res/synergy.desktop
Normal file
12
res/synergy.desktop
Normal file
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Synergy
|
||||
Comment=Keyboard and mouse sharing solution
|
||||
Path=/usr/bin
|
||||
Exec=/usr/bin/synergy
|
||||
Icon=synergy
|
||||
Terminal=false
|
||||
Categories=Utility;
|
||||
Keywords=keyboard;mouse;sharing;network;share;
|
||||
|
||||
11
res/synergy2.desktop
Normal file
11
res/synergy2.desktop
Normal file
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Synergy
|
||||
Comment=Keyboard and mouse sharing solution
|
||||
Path=/usr/bin
|
||||
Exec=/usr/bin/synergy2
|
||||
Icon=synergy
|
||||
Terminal=false
|
||||
Categories=Utility;
|
||||
Keywords=keyboard;mouse;sharing;network;share;
|
||||
@@ -19,3 +19,6 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(cmd)
|
||||
if (SYNERGY_BUILD_LEGACY_GUI)
|
||||
add_subdirectory(gui)
|
||||
endif (SYNERGY_BUILD_LEGACY_GUI)
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(synergyc)
|
||||
add_subdirectory(synergys)
|
||||
add_subdirectory(syntool)
|
||||
|
||||
if (SYNERGY_BUILD_LEGACY_SERVICE)
|
||||
add_subdirectory(synergyd)
|
||||
endif (SYNERGY_BUILD_LEGACY_SERVICE)
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2002 Chris Schoeneman
|
||||
*
|
||||
* 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 "core/ClientApp.h"
|
||||
#include "core/ServerApp.h"
|
||||
#include "arch/Arch.h"
|
||||
#include "base/Log.h"
|
||||
#include "base/EventQueue.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
// TODO: use existing arg parse code
|
||||
bool server, client;
|
||||
if (argc > 1) {
|
||||
server = std::string(argv[1]) == "--server";
|
||||
client = std::string(argv[1]) == "--client";
|
||||
}
|
||||
|
||||
#if SYSAPI_WIN32
|
||||
// record window instance for tray icon, etc
|
||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
||||
#endif
|
||||
|
||||
Arch arch;
|
||||
arch.init();
|
||||
|
||||
Log log;
|
||||
EventQueue events;
|
||||
|
||||
if (server) {
|
||||
ServerApp app(&events);
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
else if (client) {
|
||||
ClientApp app(&events);
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
else {
|
||||
// TODO: use common error code
|
||||
std::cerr << "error: use --client or --server args" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,8 @@ set(sources
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
file(GLOB arch_headers "MSWindows*.h")
|
||||
file(GLOB arch_sources "MSWindows*.cpp")
|
||||
list(APPEND sources
|
||||
resource.h
|
||||
synergyc.ico
|
||||
@@ -28,6 +30,12 @@ if (WIN32)
|
||||
tb_run.ico
|
||||
tb_wait.ico
|
||||
)
|
||||
elseif (APPLE)
|
||||
file(GLOB arch_headers "OSX*.h")
|
||||
file(GLOB arch_sources "OSX*.cpp")
|
||||
elseif (UNIX)
|
||||
file(GLOB arch_headers "XWindows*.h")
|
||||
file(GLOB arch_sources "XWindows*.cpp")
|
||||
endif()
|
||||
|
||||
list(APPEND sources ${arch_sources})
|
||||
@@ -39,4 +47,11 @@ endif()
|
||||
|
||||
add_executable(synergyc ${sources})
|
||||
target_link_libraries(synergyc
|
||||
arch base client common io mt net ipc platform server core ${libs} ${OPENSSL_LIBS})
|
||||
arch base client common io mt net ipc platform server synlib ${libs} ${OPENSSL_LIBS})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
install (TARGETS synergyc DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install (TARGETS synergyc DESTINATION bin)
|
||||
endif()
|
||||
|
||||
|
||||
376
src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp
Normal file
376
src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp
Normal file
@@ -0,0 +1,376 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "MSWindowsClientTaskBarReceiver.h"
|
||||
|
||||
#include "resource.h"
|
||||
#include "client/Client.h"
|
||||
#include "platform/MSWindowsClipboard.h"
|
||||
#include "platform/MSWindowsScreen.h"
|
||||
#include "arch/win32/ArchTaskBarWindows.h"
|
||||
#include "arch/win32/ArchMiscWindows.h"
|
||||
#include "arch/Arch.h"
|
||||
#include "base/EventQueue.h"
|
||||
#include "base/log_outputters.h"
|
||||
#include "base/EventTypes.h"
|
||||
|
||||
//
|
||||
// MSWindowsClientTaskBarReceiver
|
||||
//
|
||||
|
||||
const UINT MSWindowsClientTaskBarReceiver::s_stateToIconID[kMaxState] =
|
||||
{
|
||||
IDI_TASKBAR_NOT_RUNNING,
|
||||
IDI_TASKBAR_NOT_WORKING,
|
||||
IDI_TASKBAR_NOT_CONNECTED,
|
||||
IDI_TASKBAR_NOT_CONNECTED,
|
||||
IDI_TASKBAR_CONNECTED
|
||||
};
|
||||
|
||||
MSWindowsClientTaskBarReceiver::MSWindowsClientTaskBarReceiver(
|
||||
HINSTANCE appInstance, const BufferedLogOutputter* logBuffer, IEventQueue* events) :
|
||||
ClientTaskBarReceiver(events),
|
||||
m_appInstance(appInstance),
|
||||
m_window(NULL),
|
||||
m_logBuffer(logBuffer)
|
||||
{
|
||||
for (UInt32 i = 0; i < kMaxState; ++i) {
|
||||
m_icon[i] = loadIcon(s_stateToIconID[i]);
|
||||
}
|
||||
m_menu = LoadMenu(m_appInstance, MAKEINTRESOURCE(IDR_TASKBAR));
|
||||
|
||||
// don't create the window yet. we'll create it on demand. this
|
||||
// has the side benefit of being created in the thread used for
|
||||
// the task bar. that's good because it means the existence of
|
||||
// the window won't prevent changing the main thread's desktop.
|
||||
|
||||
// add ourself to the task bar
|
||||
ARCH->addReceiver(this);
|
||||
}
|
||||
|
||||
MSWindowsClientTaskBarReceiver::~MSWindowsClientTaskBarReceiver()
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::cleanup()
|
||||
{
|
||||
ARCH->removeReceiver(this);
|
||||
for (UInt32 i = 0; i < kMaxState; ++i) {
|
||||
deleteIcon(m_icon[i]);
|
||||
}
|
||||
DestroyMenu(m_menu);
|
||||
destroyWindow();
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::showStatus()
|
||||
{
|
||||
// create the window
|
||||
createWindow();
|
||||
|
||||
// lock self while getting status
|
||||
lock();
|
||||
|
||||
// get the current status
|
||||
std::string status = getToolTip();
|
||||
|
||||
// done getting status
|
||||
unlock();
|
||||
|
||||
// update dialog
|
||||
HWND child = GetDlgItem(m_window, IDC_TASKBAR_STATUS_STATUS);
|
||||
SendMessage(child, WM_SETTEXT, 0, (LPARAM)status.c_str());
|
||||
|
||||
if (!IsWindowVisible(m_window)) {
|
||||
// position it by the mouse
|
||||
POINT cursorPos;
|
||||
GetCursorPos(&cursorPos);
|
||||
RECT windowRect;
|
||||
GetWindowRect(m_window, &windowRect);
|
||||
int x = cursorPos.x;
|
||||
int y = cursorPos.y;
|
||||
int fw = GetSystemMetrics(SM_CXDLGFRAME);
|
||||
int fh = GetSystemMetrics(SM_CYDLGFRAME);
|
||||
int ww = windowRect.right - windowRect.left;
|
||||
int wh = windowRect.bottom - windowRect.top;
|
||||
int sw = GetSystemMetrics(SM_CXFULLSCREEN);
|
||||
int sh = GetSystemMetrics(SM_CYFULLSCREEN);
|
||||
if (fw < 1) {
|
||||
fw = 1;
|
||||
}
|
||||
if (fh < 1) {
|
||||
fh = 1;
|
||||
}
|
||||
if (x + ww - fw > sw) {
|
||||
x -= ww - fw;
|
||||
}
|
||||
else {
|
||||
x -= fw;
|
||||
}
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
}
|
||||
if (y + wh - fh > sh) {
|
||||
y -= wh - fh;
|
||||
}
|
||||
else {
|
||||
y -= fh;
|
||||
}
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
}
|
||||
SetWindowPos(m_window, HWND_TOPMOST, x, y, ww, wh,
|
||||
SWP_SHOWWINDOW);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::runMenu(int x, int y)
|
||||
{
|
||||
// do popup menu. we need a window to pass to TrackPopupMenu().
|
||||
// the SetForegroundWindow() and SendMessage() calls around
|
||||
// TrackPopupMenu() are to get the menu to be dismissed when
|
||||
// another window gets activated and are just one of those
|
||||
// win32 weirdnesses.
|
||||
createWindow();
|
||||
SetForegroundWindow(m_window);
|
||||
HMENU menu = GetSubMenu(m_menu, 0);
|
||||
SetMenuDefaultItem(menu, IDC_TASKBAR_STATUS, FALSE);
|
||||
HMENU logLevelMenu = GetSubMenu(menu, 3);
|
||||
CheckMenuRadioItem(logLevelMenu, 0, 6,
|
||||
CLOG->getFilter() - kERROR, MF_BYPOSITION);
|
||||
int n = TrackPopupMenu(menu,
|
||||
TPM_NONOTIFY |
|
||||
TPM_RETURNCMD |
|
||||
TPM_LEFTBUTTON |
|
||||
TPM_RIGHTBUTTON,
|
||||
x, y, 0, m_window, NULL);
|
||||
SendMessage(m_window, WM_NULL, 0, 0);
|
||||
|
||||
// perform the requested operation
|
||||
switch (n) {
|
||||
case IDC_TASKBAR_STATUS:
|
||||
showStatus();
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG:
|
||||
copyLog();
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_SHOW_LOG:
|
||||
ARCH->showConsole(true);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_ERROR:
|
||||
CLOG->setFilter(kERROR);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_WARNING:
|
||||
CLOG->setFilter(kWARNING);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_NOTE:
|
||||
CLOG->setFilter(kNOTE);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_INFO:
|
||||
CLOG->setFilter(kINFO);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_DEBUG:
|
||||
CLOG->setFilter(kDEBUG);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_DEBUG1:
|
||||
CLOG->setFilter(kDEBUG1);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_DEBUG2:
|
||||
CLOG->setFilter(kDEBUG2);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_QUIT:
|
||||
quit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::primaryAction()
|
||||
{
|
||||
showStatus();
|
||||
}
|
||||
|
||||
const IArchTaskBarReceiver::Icon
|
||||
MSWindowsClientTaskBarReceiver::getIcon() const
|
||||
{
|
||||
return static_cast<Icon>(m_icon[getStatus()]);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::copyLog() const
|
||||
{
|
||||
if (m_logBuffer != NULL) {
|
||||
// collect log buffer
|
||||
String data;
|
||||
for (BufferedLogOutputter::const_iterator index = m_logBuffer->begin();
|
||||
index != m_logBuffer->end(); ++index) {
|
||||
data += *index;
|
||||
data += "\n";
|
||||
}
|
||||
|
||||
// copy log to clipboard
|
||||
if (!data.empty()) {
|
||||
MSWindowsClipboard clipboard(m_window);
|
||||
clipboard.open(0);
|
||||
clipboard.emptyUnowned();
|
||||
clipboard.add(IClipboard::kText, data);
|
||||
clipboard.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::onStatusChanged()
|
||||
{
|
||||
if (IsWindowVisible(m_window)) {
|
||||
showStatus();
|
||||
}
|
||||
}
|
||||
|
||||
HICON
|
||||
MSWindowsClientTaskBarReceiver::loadIcon(UINT id)
|
||||
{
|
||||
HANDLE icon = LoadImage(m_appInstance,
|
||||
MAKEINTRESOURCE(id),
|
||||
IMAGE_ICON,
|
||||
0, 0,
|
||||
LR_DEFAULTCOLOR);
|
||||
return static_cast<HICON>(icon);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::deleteIcon(HICON icon)
|
||||
{
|
||||
if (icon != NULL) {
|
||||
DestroyIcon(icon);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::createWindow()
|
||||
{
|
||||
// ignore if already created
|
||||
if (m_window != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get the status dialog
|
||||
m_window = CreateDialogParam(m_appInstance,
|
||||
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
|
||||
NULL,
|
||||
(DLGPROC)&MSWindowsClientTaskBarReceiver::staticDlgProc,
|
||||
reinterpret_cast<LPARAM>(
|
||||
static_cast<void*>(this)));
|
||||
|
||||
// window should appear on top of everything, including (especially)
|
||||
// the task bar.
|
||||
LONG_PTR style = GetWindowLongPtr(m_window, GWL_EXSTYLE);
|
||||
style |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
|
||||
SetWindowLongPtr(m_window, GWL_EXSTYLE, style);
|
||||
|
||||
// tell the task bar about this dialog
|
||||
ArchTaskBarWindows::addDialog(m_window);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsClientTaskBarReceiver::destroyWindow()
|
||||
{
|
||||
if (m_window != NULL) {
|
||||
ArchTaskBarWindows::removeDialog(m_window);
|
||||
DestroyWindow(m_window);
|
||||
m_window = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL
|
||||
MSWindowsClientTaskBarReceiver::dlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
// use default focus
|
||||
return TRUE;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
// hide when another window is activated
|
||||
if (LOWORD(wParam) == WA_INACTIVE) {
|
||||
ShowWindow(hwnd, SW_HIDE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
MSWindowsClientTaskBarReceiver::staticDlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// if msg is WM_INITDIALOG, extract the MSWindowsClientTaskBarReceiver*
|
||||
// and put it in the extra window data then forward the call.
|
||||
MSWindowsClientTaskBarReceiver* self = NULL;
|
||||
if (msg == WM_INITDIALOG) {
|
||||
self = static_cast<MSWindowsClientTaskBarReceiver*>(
|
||||
reinterpret_cast<void*>(lParam));
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) lParam);
|
||||
}
|
||||
else {
|
||||
// get the extra window data and forward the call
|
||||
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
if (data != 0) {
|
||||
self = (MSWindowsClientTaskBarReceiver*) data;
|
||||
}
|
||||
}
|
||||
|
||||
// forward the message
|
||||
if (self != NULL) {
|
||||
return self->dlgProc(hwnd, msg, wParam, lParam);
|
||||
}
|
||||
else {
|
||||
return (msg == WM_INITDIALOG) ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
IArchTaskBarReceiver*
|
||||
createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events)
|
||||
{
|
||||
ArchMiscWindows::setIcons(
|
||||
(HICON)LoadImage(ArchMiscWindows::instanceWin32(),
|
||||
MAKEINTRESOURCE(IDI_SYNERGY),
|
||||
IMAGE_ICON,
|
||||
32, 32, LR_SHARED),
|
||||
(HICON)LoadImage(ArchMiscWindows::instanceWin32(),
|
||||
MAKEINTRESOURCE(IDI_SYNERGY),
|
||||
IMAGE_ICON,
|
||||
16, 16, LR_SHARED));
|
||||
|
||||
return new MSWindowsClientTaskBarReceiver(
|
||||
MSWindowsScreen::getWindowInstance(), logBuffer, events);
|
||||
}
|
||||
68
src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h
Normal file
68
src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "synergy/ClientTaskBarReceiver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
class BufferedLogOutputter;
|
||||
class IEventQueue;
|
||||
|
||||
//! Implementation of ClientTaskBarReceiver for Microsoft Windows
|
||||
class MSWindowsClientTaskBarReceiver : public ClientTaskBarReceiver {
|
||||
public:
|
||||
MSWindowsClientTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
|
||||
virtual ~MSWindowsClientTaskBarReceiver();
|
||||
|
||||
// IArchTaskBarReceiver overrides
|
||||
virtual void showStatus();
|
||||
virtual void runMenu(int x, int y);
|
||||
virtual void primaryAction();
|
||||
virtual const Icon getIcon() const;
|
||||
void cleanup();
|
||||
|
||||
protected:
|
||||
void copyLog() const;
|
||||
|
||||
// ClientTaskBarReceiver overrides
|
||||
virtual void onStatusChanged();
|
||||
|
||||
private:
|
||||
HICON loadIcon(UINT);
|
||||
void deleteIcon(HICON);
|
||||
void createWindow();
|
||||
void destroyWindow();
|
||||
|
||||
BOOL dlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL CALLBACK
|
||||
staticDlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private:
|
||||
HINSTANCE m_appInstance;
|
||||
HWND m_window;
|
||||
HMENU m_menu;
|
||||
HICON m_icon[kMaxState];
|
||||
const BufferedLogOutputter* m_logBuffer;
|
||||
|
||||
static const UINT s_stateToIconID[];
|
||||
};
|
||||
69
src/cmd/synergyc/OSXClientTaskBarReceiver.cpp
Normal file
69
src/cmd/synergyc/OSXClientTaskBarReceiver.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2004 Chris Schoeneman
|
||||
*
|
||||
* 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 "OSXClientTaskBarReceiver.h"
|
||||
#include "arch/Arch.h"
|
||||
|
||||
//
|
||||
// OSXClientTaskBarReceiver
|
||||
//
|
||||
|
||||
OSXClientTaskBarReceiver::OSXClientTaskBarReceiver(
|
||||
const BufferedLogOutputter*,
|
||||
IEventQueue* events) :
|
||||
ClientTaskBarReceiver(events)
|
||||
{
|
||||
// add ourself to the task bar
|
||||
ARCH->addReceiver(this);
|
||||
}
|
||||
|
||||
OSXClientTaskBarReceiver::~OSXClientTaskBarReceiver()
|
||||
{
|
||||
ARCH->removeReceiver(this);
|
||||
}
|
||||
|
||||
void
|
||||
OSXClientTaskBarReceiver::showStatus()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
OSXClientTaskBarReceiver::runMenu(int, int)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
OSXClientTaskBarReceiver::primaryAction()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const IArchTaskBarReceiver::Icon
|
||||
OSXClientTaskBarReceiver::getIcon() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IArchTaskBarReceiver*
|
||||
createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events)
|
||||
{
|
||||
return new OSXClientTaskBarReceiver(logBuffer, events);
|
||||
}
|
||||
|
||||
37
src/cmd/synergyc/OSXClientTaskBarReceiver.h
Normal file
37
src/cmd/synergyc/OSXClientTaskBarReceiver.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2004 Chris Schoeneman
|
||||
*
|
||||
* 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 "synergy/ClientTaskBarReceiver.h"
|
||||
|
||||
class BufferedLogOutputter;
|
||||
class IEventQueue;
|
||||
|
||||
//! Implementation of ClientTaskBarReceiver for OS X
|
||||
class OSXClientTaskBarReceiver : public ClientTaskBarReceiver {
|
||||
public:
|
||||
OSXClientTaskBarReceiver(const BufferedLogOutputter*, IEventQueue* events);
|
||||
virtual ~OSXClientTaskBarReceiver();
|
||||
|
||||
// IArchTaskBarReceiver overrides
|
||||
virtual void showStatus();
|
||||
virtual void runMenu(int x, int y);
|
||||
virtual void primaryAction();
|
||||
virtual const Icon getIcon() const;
|
||||
};
|
||||
68
src/cmd/synergyc/XWindowsClientTaskBarReceiver.cpp
Normal file
68
src/cmd/synergyc/XWindowsClientTaskBarReceiver.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "XWindowsClientTaskBarReceiver.h"
|
||||
#include "arch/Arch.h"
|
||||
|
||||
//
|
||||
// CXWindowsClientTaskBarReceiver
|
||||
//
|
||||
|
||||
CXWindowsClientTaskBarReceiver::CXWindowsClientTaskBarReceiver(
|
||||
const BufferedLogOutputter*,
|
||||
IEventQueue* events) :
|
||||
ClientTaskBarReceiver(events)
|
||||
{
|
||||
// add ourself to the task bar
|
||||
ARCH->addReceiver(this);
|
||||
}
|
||||
|
||||
CXWindowsClientTaskBarReceiver::~CXWindowsClientTaskBarReceiver()
|
||||
{
|
||||
ARCH->removeReceiver(this);
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsClientTaskBarReceiver::showStatus()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsClientTaskBarReceiver::runMenu(int, int)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsClientTaskBarReceiver::primaryAction()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const IArchTaskBarReceiver::Icon
|
||||
CXWindowsClientTaskBarReceiver::getIcon() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IArchTaskBarReceiver*
|
||||
createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events)
|
||||
{
|
||||
return new CXWindowsClientTaskBarReceiver(logBuffer, events);
|
||||
}
|
||||
38
src/cmd/synergyc/XWindowsClientTaskBarReceiver.h
Normal file
38
src/cmd/synergyc/XWindowsClientTaskBarReceiver.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "synergy/ClientTaskBarReceiver.h"
|
||||
|
||||
class BufferedLogOutputter;
|
||||
class IEventQueue;
|
||||
|
||||
//! Implementation of ClientTaskBarReceiver for X Windows
|
||||
class CXWindowsClientTaskBarReceiver : public ClientTaskBarReceiver {
|
||||
public:
|
||||
CXWindowsClientTaskBarReceiver(
|
||||
const BufferedLogOutputter*, IEventQueue* events);
|
||||
virtual ~CXWindowsClientTaskBarReceiver();
|
||||
|
||||
// IArchTaskBarReceiver overrides
|
||||
virtual void showStatus();
|
||||
virtual void runMenu(int x, int y);
|
||||
virtual void primaryAction();
|
||||
virtual const Icon getIcon() const;
|
||||
};
|
||||
@@ -16,18 +16,24 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "core/ClientApp.h"
|
||||
#include "synergy/ClientApp.h"
|
||||
#include "arch/Arch.h"
|
||||
#include "base/Log.h"
|
||||
#include "base/EventQueue.h"
|
||||
|
||||
#include <iostream>
|
||||
#if WINAPI_MSWINDOWS
|
||||
#include "MSWindowsClientTaskBarReceiver.h"
|
||||
#elif WINAPI_XWINDOWS
|
||||
#include "XWindowsClientTaskBarReceiver.h"
|
||||
#elif WINAPI_CARBON
|
||||
#include "OSXClientTaskBarReceiver.h"
|
||||
#else
|
||||
#error Platform not supported.
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
std::cerr << "warning: synergyc is deprecated. instead, use: synergy-core --client" << std::endl;
|
||||
|
||||
#if SYSAPI_WIN32
|
||||
// record window instance for tray icon, etc
|
||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
||||
@@ -39,6 +45,6 @@ main(int argc, char** argv)
|
||||
Log log;
|
||||
EventQueue events;
|
||||
|
||||
ClientApp app(&events);
|
||||
ClientApp app(&events, createTaskBarReceiver);
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
|
||||
27
src/cmd/synergyd/CMakeLists.txt
Normal file
27
src/cmd/synergyd/CMakeLists.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2012 Nick Bolton
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
file(GLOB headers "*.h")
|
||||
file(GLOB sources "*.cpp")
|
||||
|
||||
if (WIN32)
|
||||
add_executable (synergyd WIN32 ${sources})
|
||||
else()
|
||||
add_executable (synergyd ${sources})
|
||||
endif()
|
||||
|
||||
target_link_libraries (synergyd
|
||||
arch base common io ipc mt net platform synlib shared ${libs} ${OPENSSL_LIBS})
|
||||
44
src/cmd/synergyd/synergyd.cpp
Normal file
44
src/cmd/synergyd/synergyd.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2012 Nick Bolton
|
||||
*
|
||||
* 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 "synergy/DaemonApp.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef SYSAPI_UNIX
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
DaemonApp app;
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
|
||||
#elif SYSAPI_WIN32
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
DaemonApp app;
|
||||
return app.run(__argc, __argv);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -19,6 +19,8 @@ set(sources
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
file(GLOB arch_headers "MSWindows*.h")
|
||||
file(GLOB arch_sources "MSWindows*.cpp")
|
||||
list(APPEND sources
|
||||
resource.h
|
||||
synergys.ico
|
||||
@@ -28,12 +30,29 @@ if (WIN32)
|
||||
tb_run.ico
|
||||
tb_wait.ico
|
||||
)
|
||||
elseif (APPLE)
|
||||
file(GLOB arch_headers "OSX*.h")
|
||||
file(GLOB arch_sources "OSX*.cpp")
|
||||
elseif (UNIX)
|
||||
file(GLOB arch_headers "XWindows*.h")
|
||||
file(GLOB arch_sources "XWindows*.cpp")
|
||||
endif()
|
||||
|
||||
list(APPEND sources ${arch_sources})
|
||||
list(APPEND headers ${arch_headers})
|
||||
|
||||
if (SYNERGY_ADD_HEADERS)
|
||||
list(APPEND sources ${headers})
|
||||
endif()
|
||||
|
||||
add_executable(synergys ${sources})
|
||||
target_link_libraries(synergys
|
||||
arch base client common io mt net ipc platform server core ${libs} ${OPENSSL_LIBS})
|
||||
arch base client common io mt net ipc platform server synlib ${libs} ${OPENSSL_LIBS})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
install (TARGETS synergys DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install (TARGETS synergys DESTINATION bin)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
408
src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp
Normal file
408
src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp
Normal file
@@ -0,0 +1,408 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "MSWindowsServerTaskBarReceiver.h"
|
||||
|
||||
#include "resource.h"
|
||||
#include "server/Server.h"
|
||||
#include "platform/MSWindowsClipboard.h"
|
||||
#include "platform/MSWindowsScreen.h"
|
||||
#include "arch/win32/ArchTaskBarWindows.h"
|
||||
#include "arch/win32/ArchMiscWindows.h"
|
||||
#include "arch/Arch.h"
|
||||
#include "base/EventQueue.h"
|
||||
#include "base/IEventQueue.h"
|
||||
#include "base/log_outputters.h"
|
||||
#include "base/EventTypes.h"
|
||||
|
||||
//
|
||||
// MSWindowsServerTaskBarReceiver
|
||||
//
|
||||
|
||||
const UINT MSWindowsServerTaskBarReceiver::s_stateToIconID[kMaxState] =
|
||||
{
|
||||
IDI_TASKBAR_NOT_RUNNING,
|
||||
IDI_TASKBAR_NOT_WORKING,
|
||||
IDI_TASKBAR_NOT_CONNECTED,
|
||||
IDI_TASKBAR_CONNECTED
|
||||
};
|
||||
|
||||
MSWindowsServerTaskBarReceiver::MSWindowsServerTaskBarReceiver(
|
||||
HINSTANCE appInstance, const BufferedLogOutputter* logBuffer, IEventQueue* events) :
|
||||
ServerTaskBarReceiver(events),
|
||||
m_events(events),
|
||||
m_appInstance(appInstance),
|
||||
m_window(NULL),
|
||||
m_logBuffer(logBuffer)
|
||||
{
|
||||
for (UInt32 i = 0; i < kMaxState; ++i) {
|
||||
m_icon[i] = loadIcon(s_stateToIconID[i]);
|
||||
}
|
||||
m_menu = LoadMenu(m_appInstance, MAKEINTRESOURCE(IDR_TASKBAR));
|
||||
|
||||
// don't create the window yet. we'll create it on demand. this
|
||||
// has the side benefit of being created in the thread used for
|
||||
// the task bar. that's good because it means the existence of
|
||||
// the window won't prevent changing the main thread's desktop.
|
||||
|
||||
// add ourself to the task bar
|
||||
ARCH->addReceiver(this);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::cleanup()
|
||||
{
|
||||
ARCH->removeReceiver(this);
|
||||
for (UInt32 i = 0; i < kMaxState; ++i) {
|
||||
deleteIcon(m_icon[i]);
|
||||
}
|
||||
DestroyMenu(m_menu);
|
||||
destroyWindow();
|
||||
}
|
||||
|
||||
MSWindowsServerTaskBarReceiver::~MSWindowsServerTaskBarReceiver()
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::showStatus()
|
||||
{
|
||||
// create the window
|
||||
createWindow();
|
||||
|
||||
// lock self while getting status
|
||||
lock();
|
||||
|
||||
// get the current status
|
||||
std::string status = getToolTip();
|
||||
|
||||
// get the connect clients, if any
|
||||
const Clients& clients = getClients();
|
||||
|
||||
// done getting status
|
||||
unlock();
|
||||
|
||||
// update dialog
|
||||
HWND child = GetDlgItem(m_window, IDC_TASKBAR_STATUS_STATUS);
|
||||
SendMessage(child, WM_SETTEXT, 0, (LPARAM)status.c_str());
|
||||
child = GetDlgItem(m_window, IDC_TASKBAR_STATUS_CLIENTS);
|
||||
SendMessage(child, LB_RESETCONTENT, 0, 0);
|
||||
for (Clients::const_iterator index = clients.begin();
|
||||
index != clients.end(); ) {
|
||||
const char* client = index->c_str();
|
||||
if (++index == clients.end()) {
|
||||
SendMessage(child, LB_ADDSTRING, 0, (LPARAM)client);
|
||||
}
|
||||
else {
|
||||
SendMessage(child, LB_INSERTSTRING, (WPARAM)-1, (LPARAM)client);
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsWindowVisible(m_window)) {
|
||||
// position it by the mouse
|
||||
POINT cursorPos;
|
||||
GetCursorPos(&cursorPos);
|
||||
RECT windowRect;
|
||||
GetWindowRect(m_window, &windowRect);
|
||||
int x = cursorPos.x;
|
||||
int y = cursorPos.y;
|
||||
int fw = GetSystemMetrics(SM_CXDLGFRAME);
|
||||
int fh = GetSystemMetrics(SM_CYDLGFRAME);
|
||||
int ww = windowRect.right - windowRect.left;
|
||||
int wh = windowRect.bottom - windowRect.top;
|
||||
int sw = GetSystemMetrics(SM_CXFULLSCREEN);
|
||||
int sh = GetSystemMetrics(SM_CYFULLSCREEN);
|
||||
if (fw < 1) {
|
||||
fw = 1;
|
||||
}
|
||||
if (fh < 1) {
|
||||
fh = 1;
|
||||
}
|
||||
if (x + ww - fw > sw) {
|
||||
x -= ww - fw;
|
||||
}
|
||||
else {
|
||||
x -= fw;
|
||||
}
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
}
|
||||
if (y + wh - fh > sh) {
|
||||
y -= wh - fh;
|
||||
}
|
||||
else {
|
||||
y -= fh;
|
||||
}
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
}
|
||||
SetWindowPos(m_window, HWND_TOPMOST, x, y, ww, wh,
|
||||
SWP_SHOWWINDOW);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::runMenu(int x, int y)
|
||||
{
|
||||
// do popup menu. we need a window to pass to TrackPopupMenu().
|
||||
// the SetForegroundWindow() and SendMessage() calls around
|
||||
// TrackPopupMenu() are to get the menu to be dismissed when
|
||||
// another window gets activated and are just one of those
|
||||
// win32 weirdnesses.
|
||||
createWindow();
|
||||
SetForegroundWindow(m_window);
|
||||
HMENU menu = GetSubMenu(m_menu, 0);
|
||||
SetMenuDefaultItem(menu, IDC_TASKBAR_STATUS, FALSE);
|
||||
HMENU logLevelMenu = GetSubMenu(menu, 3);
|
||||
CheckMenuRadioItem(logLevelMenu, 0, 6,
|
||||
CLOG->getFilter() - kERROR, MF_BYPOSITION);
|
||||
int n = TrackPopupMenu(menu,
|
||||
TPM_NONOTIFY |
|
||||
TPM_RETURNCMD |
|
||||
TPM_LEFTBUTTON |
|
||||
TPM_RIGHTBUTTON,
|
||||
x, y, 0, m_window, NULL);
|
||||
SendMessage(m_window, WM_NULL, 0, 0);
|
||||
|
||||
// perform the requested operation
|
||||
switch (n) {
|
||||
case IDC_TASKBAR_STATUS:
|
||||
showStatus();
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG:
|
||||
copyLog();
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_SHOW_LOG:
|
||||
ARCH->showConsole(true);
|
||||
break;
|
||||
|
||||
case IDC_RELOAD_CONFIG:
|
||||
m_events->addEvent(Event(m_events->forServerApp().reloadConfig(),
|
||||
m_events->getSystemTarget()));
|
||||
break;
|
||||
|
||||
case IDC_FORCE_RECONNECT:
|
||||
m_events->addEvent(Event(m_events->forServerApp().forceReconnect(),
|
||||
m_events->getSystemTarget()));
|
||||
break;
|
||||
|
||||
case ID_SYNERGY_RESETSERVER:
|
||||
m_events->addEvent(Event(m_events->forServerApp().resetServer(),
|
||||
m_events->getSystemTarget()));
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_ERROR:
|
||||
CLOG->setFilter(kERROR);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_WARNING:
|
||||
CLOG->setFilter(kWARNING);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_NOTE:
|
||||
CLOG->setFilter(kNOTE);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_INFO:
|
||||
CLOG->setFilter(kINFO);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_DEBUG:
|
||||
CLOG->setFilter(kDEBUG);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_DEBUG1:
|
||||
CLOG->setFilter(kDEBUG1);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_LOG_LEVEL_DEBUG2:
|
||||
CLOG->setFilter(kDEBUG2);
|
||||
break;
|
||||
|
||||
case IDC_TASKBAR_QUIT:
|
||||
quit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::primaryAction()
|
||||
{
|
||||
showStatus();
|
||||
}
|
||||
|
||||
const IArchTaskBarReceiver::Icon
|
||||
MSWindowsServerTaskBarReceiver::getIcon() const
|
||||
{
|
||||
return static_cast<Icon>(m_icon[getStatus()]);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::copyLog() const
|
||||
{
|
||||
if (m_logBuffer != NULL) {
|
||||
// collect log buffer
|
||||
String data;
|
||||
for (BufferedLogOutputter::const_iterator index = m_logBuffer->begin();
|
||||
index != m_logBuffer->end(); ++index) {
|
||||
data += *index;
|
||||
data += "\n";
|
||||
}
|
||||
|
||||
// copy log to clipboard
|
||||
if (!data.empty()) {
|
||||
MSWindowsClipboard clipboard(m_window);
|
||||
clipboard.open(0);
|
||||
clipboard.emptyUnowned();
|
||||
clipboard.add(IClipboard::kText, data);
|
||||
clipboard.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::onStatusChanged()
|
||||
{
|
||||
if (IsWindowVisible(m_window)) {
|
||||
showStatus();
|
||||
}
|
||||
}
|
||||
|
||||
HICON
|
||||
MSWindowsServerTaskBarReceiver::loadIcon(UINT id)
|
||||
{
|
||||
HANDLE icon = LoadImage(m_appInstance,
|
||||
MAKEINTRESOURCE(id),
|
||||
IMAGE_ICON,
|
||||
0, 0,
|
||||
LR_DEFAULTCOLOR);
|
||||
return static_cast<HICON>(icon);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::deleteIcon(HICON icon)
|
||||
{
|
||||
if (icon != NULL) {
|
||||
DestroyIcon(icon);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::createWindow()
|
||||
{
|
||||
// ignore if already created
|
||||
if (m_window != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get the status dialog
|
||||
m_window = CreateDialogParam(m_appInstance,
|
||||
MAKEINTRESOURCE(IDD_TASKBAR_STATUS),
|
||||
NULL,
|
||||
(DLGPROC)&MSWindowsServerTaskBarReceiver::staticDlgProc,
|
||||
reinterpret_cast<LPARAM>(
|
||||
static_cast<void*>(this)));
|
||||
|
||||
// window should appear on top of everything, including (especially)
|
||||
// the task bar.
|
||||
LONG_PTR style = GetWindowLongPtr(m_window, GWL_EXSTYLE);
|
||||
style |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
|
||||
SetWindowLongPtr(m_window, GWL_EXSTYLE, style);
|
||||
|
||||
// tell the task bar about this dialog
|
||||
ArchTaskBarWindows::addDialog(m_window);
|
||||
}
|
||||
|
||||
void
|
||||
MSWindowsServerTaskBarReceiver::destroyWindow()
|
||||
{
|
||||
if (m_window != NULL) {
|
||||
ArchTaskBarWindows::removeDialog(m_window);
|
||||
DestroyWindow(m_window);
|
||||
m_window = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL
|
||||
MSWindowsServerTaskBarReceiver::dlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
// use default focus
|
||||
return TRUE;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
// hide when another window is activated
|
||||
if (LOWORD(wParam) == WA_INACTIVE) {
|
||||
ShowWindow(hwnd, SW_HIDE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// if msg is WM_INITDIALOG, extract the MSWindowsServerTaskBarReceiver*
|
||||
// and put it in the extra window data then forward the call.
|
||||
MSWindowsServerTaskBarReceiver* self = NULL;
|
||||
if (msg == WM_INITDIALOG) {
|
||||
self = static_cast<MSWindowsServerTaskBarReceiver*>(
|
||||
reinterpret_cast<void*>(lParam));
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
|
||||
}
|
||||
else {
|
||||
// get the extra window data and forward the call
|
||||
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||
if (data != 0) {
|
||||
self = static_cast<MSWindowsServerTaskBarReceiver*>(
|
||||
reinterpret_cast<void*>(data));
|
||||
}
|
||||
}
|
||||
|
||||
// forward the message
|
||||
if (self != NULL) {
|
||||
return self->dlgProc(hwnd, msg, wParam, lParam);
|
||||
}
|
||||
else {
|
||||
return (msg == WM_INITDIALOG) ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
IArchTaskBarReceiver*
|
||||
createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events)
|
||||
{
|
||||
ArchMiscWindows::setIcons(
|
||||
(HICON)LoadImage(ArchMiscWindows::instanceWin32(),
|
||||
MAKEINTRESOURCE(IDI_SYNERGY),
|
||||
IMAGE_ICON,
|
||||
32, 32, LR_SHARED),
|
||||
(HICON)LoadImage(ArchMiscWindows::instanceWin32(),
|
||||
MAKEINTRESOURCE(IDI_SYNERGY),
|
||||
IMAGE_ICON,
|
||||
16, 16, LR_SHARED));
|
||||
|
||||
return new MSWindowsServerTaskBarReceiver(
|
||||
MSWindowsScreen::getWindowInstance(), logBuffer, events);
|
||||
}
|
||||
69
src/cmd/synergys/MSWindowsServerTaskBarReceiver.h
Normal file
69
src/cmd/synergys/MSWindowsServerTaskBarReceiver.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "synergy/ServerTaskBarReceiver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
||||
class BufferedLogOutputter;
|
||||
class IEventQueue;
|
||||
|
||||
//! Implementation of ServerTaskBarReceiver for Microsoft Windows
|
||||
class MSWindowsServerTaskBarReceiver : public ServerTaskBarReceiver {
|
||||
public:
|
||||
MSWindowsServerTaskBarReceiver(HINSTANCE, const BufferedLogOutputter*, IEventQueue* events);
|
||||
virtual ~MSWindowsServerTaskBarReceiver();
|
||||
|
||||
// IArchTaskBarReceiver overrides
|
||||
virtual void showStatus();
|
||||
virtual void runMenu(int x, int y);
|
||||
virtual void primaryAction();
|
||||
virtual const Icon getIcon() const;
|
||||
void cleanup();
|
||||
|
||||
protected:
|
||||
void copyLog() const;
|
||||
|
||||
// ServerTaskBarReceiver overrides
|
||||
virtual void onStatusChanged();
|
||||
|
||||
private:
|
||||
HICON loadIcon(UINT);
|
||||
void deleteIcon(HICON);
|
||||
void createWindow();
|
||||
void destroyWindow();
|
||||
|
||||
BOOL dlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL CALLBACK
|
||||
staticDlgProc(HWND hwnd,
|
||||
UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private:
|
||||
HINSTANCE m_appInstance;
|
||||
HWND m_window;
|
||||
HMENU m_menu;
|
||||
HICON m_icon[kMaxState];
|
||||
const BufferedLogOutputter* m_logBuffer;
|
||||
IEventQueue* m_events;
|
||||
|
||||
static const UINT s_stateToIconID[];
|
||||
};
|
||||
67
src/cmd/synergys/OSXServerTaskBarReceiver.cpp
Normal file
67
src/cmd/synergys/OSXServerTaskBarReceiver.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2004 Chris Schoeneman
|
||||
*
|
||||
* 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 "OSXServerTaskBarReceiver.h"
|
||||
#include "arch/Arch.h"
|
||||
|
||||
//
|
||||
// OSXServerTaskBarReceiver
|
||||
//
|
||||
|
||||
OSXServerTaskBarReceiver::OSXServerTaskBarReceiver(
|
||||
const BufferedLogOutputter*, IEventQueue* events) :
|
||||
ServerTaskBarReceiver(events)
|
||||
{
|
||||
// add ourself to the task bar
|
||||
ARCH->addReceiver(this);
|
||||
}
|
||||
|
||||
OSXServerTaskBarReceiver::~OSXServerTaskBarReceiver()
|
||||
{
|
||||
ARCH->removeReceiver(this);
|
||||
}
|
||||
|
||||
void
|
||||
OSXServerTaskBarReceiver::showStatus()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
OSXServerTaskBarReceiver::runMenu(int, int)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
OSXServerTaskBarReceiver::primaryAction()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const IArchTaskBarReceiver::Icon
|
||||
OSXServerTaskBarReceiver::getIcon() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IArchTaskBarReceiver*
|
||||
createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events)
|
||||
{
|
||||
return new OSXServerTaskBarReceiver(logBuffer, events);
|
||||
}
|
||||
36
src/cmd/synergys/OSXServerTaskBarReceiver.h
Normal file
36
src/cmd/synergys/OSXServerTaskBarReceiver.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2004 Chris Schoeneman
|
||||
*
|
||||
* 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 "synergy/ServerTaskBarReceiver.h"
|
||||
|
||||
class BufferedLogOutputter;
|
||||
|
||||
//! Implementation of ServerTaskBarReceiver for OS X
|
||||
class OSXServerTaskBarReceiver : public ServerTaskBarReceiver {
|
||||
public:
|
||||
OSXServerTaskBarReceiver(const BufferedLogOutputter*, IEventQueue* events);
|
||||
virtual ~OSXServerTaskBarReceiver();
|
||||
|
||||
// IArchTaskBarReceiver overrides
|
||||
virtual void showStatus();
|
||||
virtual void runMenu(int x, int y);
|
||||
virtual void primaryAction();
|
||||
virtual const Icon getIcon() const;
|
||||
};
|
||||
67
src/cmd/synergys/XWindowsServerTaskBarReceiver.cpp
Normal file
67
src/cmd/synergys/XWindowsServerTaskBarReceiver.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "XWindowsServerTaskBarReceiver.h"
|
||||
#include "arch/Arch.h"
|
||||
|
||||
//
|
||||
// CXWindowsServerTaskBarReceiver
|
||||
//
|
||||
|
||||
CXWindowsServerTaskBarReceiver::CXWindowsServerTaskBarReceiver(
|
||||
const BufferedLogOutputter*, IEventQueue* events) :
|
||||
ServerTaskBarReceiver(events)
|
||||
{
|
||||
// add ourself to the task bar
|
||||
ARCH->addReceiver(this);
|
||||
}
|
||||
|
||||
CXWindowsServerTaskBarReceiver::~CXWindowsServerTaskBarReceiver()
|
||||
{
|
||||
ARCH->removeReceiver(this);
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsServerTaskBarReceiver::showStatus()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsServerTaskBarReceiver::runMenu(int, int)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsServerTaskBarReceiver::primaryAction()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const IArchTaskBarReceiver::Icon
|
||||
CXWindowsServerTaskBarReceiver::getIcon() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IArchTaskBarReceiver*
|
||||
createTaskBarReceiver(const BufferedLogOutputter* logBuffer, IEventQueue* events)
|
||||
{
|
||||
return new CXWindowsServerTaskBarReceiver(logBuffer, events);
|
||||
}
|
||||
38
src/cmd/synergys/XWindowsServerTaskBarReceiver.h
Normal file
38
src/cmd/synergys/XWindowsServerTaskBarReceiver.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2003 Chris Schoeneman
|
||||
*
|
||||
* 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 "synergy/ServerTaskBarReceiver.h"
|
||||
|
||||
class BufferedLogOutputter;
|
||||
class IEventQueue;
|
||||
|
||||
//! Implementation of ServerTaskBarReceiver for X Windows
|
||||
class CXWindowsServerTaskBarReceiver : public ServerTaskBarReceiver {
|
||||
public:
|
||||
CXWindowsServerTaskBarReceiver(
|
||||
const BufferedLogOutputter*, IEventQueue* events);
|
||||
virtual ~CXWindowsServerTaskBarReceiver();
|
||||
|
||||
// IArchTaskBarReceiver overrides
|
||||
virtual void showStatus();
|
||||
virtual void runMenu(int x, int y);
|
||||
virtual void primaryAction();
|
||||
virtual const Icon getIcon() const;
|
||||
};
|
||||
@@ -16,18 +16,24 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "core/ServerApp.h"
|
||||
#include "synergy/ServerApp.h"
|
||||
#include "arch/Arch.h"
|
||||
#include "base/Log.h"
|
||||
#include "base/EventQueue.h"
|
||||
|
||||
#include <iostream>
|
||||
#if WINAPI_MSWINDOWS
|
||||
#include "MSWindowsServerTaskBarReceiver.h"
|
||||
#elif WINAPI_XWINDOWS
|
||||
#include "XWindowsServerTaskBarReceiver.h"
|
||||
#elif WINAPI_CARBON
|
||||
#include "OSXServerTaskBarReceiver.h"
|
||||
#else
|
||||
#error Platform not supported.
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
std::cerr << "warning: synergys is deprecated. instead, use: synergy-core --server" << std::endl;
|
||||
|
||||
#if SYSAPI_WIN32
|
||||
// record window instance for tray icon, etc
|
||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
||||
@@ -39,6 +45,6 @@ main(int argc, char** argv)
|
||||
Log log;
|
||||
EventQueue events;
|
||||
|
||||
ServerApp app(&events);
|
||||
ServerApp app(&events, createTaskBarReceiver);
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2017 Symless Ltd.
|
||||
# Copyright (C) 2014-2016 Symless Ltd.
|
||||
#
|
||||
# This package is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@@ -13,14 +13,15 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
add_executable(synergy-core main.cpp)
|
||||
target_link_libraries(synergy-core
|
||||
arch base client common io mt net ipc platform server core ${libs} ${OPENSSL_LIBS})
|
||||
file(GLOB headers "*.h")
|
||||
file(GLOB sources "*.cpp")
|
||||
|
||||
if (SYNERGY_CORE_INSTALL)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
install (TARGETS synergy-core DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install (TARGETS synergy-core DESTINATION bin)
|
||||
endif()
|
||||
add_executable(syntool ${sources})
|
||||
target_link_libraries(syntool
|
||||
synlib arch base client common io ipc mt net platform server ${libs} ${OPENSSL_LIBS})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
install (TARGETS syntool DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install (TARGETS syntool DESTINATION bin)
|
||||
endif()
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* found in the file LICENSE that should have accompanied this file.
|
||||
*
|
||||
*
|
||||
* This package is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@@ -15,14 +15,17 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "synergy/ToolApp.h"
|
||||
#include "arch/Arch.h"
|
||||
|
||||
#define ARCH_INTERNET ArchInternetWindows
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
#if SYSAPI_WIN32
|
||||
// record window instance for tray icon, etc
|
||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
||||
#endif
|
||||
|
||||
#include "base/String.h"
|
||||
|
||||
class ArchInternetWindows {
|
||||
public:
|
||||
String get(const String& url);
|
||||
String urlEncode(const String& url);
|
||||
};
|
||||
ToolApp app;
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
67
src/gui/CMakeLists.txt
Normal file
67
src/gui/CMakeLists.txt
Normal file
@@ -0,0 +1,67 @@
|
||||
cmake_minimum_required (VERSION 3.4)
|
||||
|
||||
find_package (Qt5 COMPONENTS Core Widgets Network)
|
||||
set (CMAKE_AUTOMOC ON)
|
||||
set (CMAKE_AUTORCC ON)
|
||||
set (CMAKE_AUTOUIC ON)
|
||||
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)
|
||||
endif()
|
||||
|
||||
add_executable (synergy WIN32
|
||||
${LEGACY_GUI_SOURCE_FILES}
|
||||
${LEGACY_GUI_UI_FILES}
|
||||
${LEGACY_GUI_RC_FILES}
|
||||
res/Synergy.qrc
|
||||
)
|
||||
|
||||
include_directories (./src)
|
||||
target_link_libraries (synergy shared)
|
||||
|
||||
if (NOT SYNERGY_ENTERPRISE)
|
||||
if (WIN32)
|
||||
include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
find_library (DNSSD_LIB dnssd.lib
|
||||
HINTS ENV BONJOUR_SDK_HOME
|
||||
PATH_SUFFIXES "Lib/x64")
|
||||
else()
|
||||
find_library (DNSSD_LIB dnssd.lib
|
||||
HINTS ENV BONJOUR_SDK_HOME
|
||||
PATH_SUFFIXES "Lib/Win32")
|
||||
endif()
|
||||
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
target_link_libraries (synergy dns_sd)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
qt5_use_modules (synergy Core Widgets Network)
|
||||
target_compile_definitions (synergy PRIVATE -DSYNERGY_VERSION_STAGE="${SYNERGY_VERSION_STAGE}")
|
||||
target_compile_definitions (synergy PRIVATE -DSYNERGY_REVISION="${SYNERGY_REVISION}")
|
||||
|
||||
if (WIN32)
|
||||
if (NOT SYNERGY_ENTERPRISE)
|
||||
target_link_libraries (synergy ${DNSSD_LIB})
|
||||
endif ()
|
||||
set_target_properties (synergy PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
install (TARGETS synergy DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install (TARGETS synergy DESTINATION bin)
|
||||
endif()
|
||||
162
src/gui/gui.pro
Normal file
162
src/gui/gui.pro
Normal file
@@ -0,0 +1,162 @@
|
||||
QT += widgets \
|
||||
network
|
||||
TEMPLATE = app
|
||||
TARGET = synergy
|
||||
DEFINES += VERSION_STAGE=\\\"$$QMAKE_VERSION_STAGE\\\"
|
||||
DEFINES += VERSION_REVISION=\\\"$$QMAKE_VERSION_REVISION\\\"
|
||||
DEFINES -= UNICODE
|
||||
DEFINES += _MBCS
|
||||
DEPENDPATH += . \
|
||||
res
|
||||
INCLUDEPATH += . \
|
||||
src \
|
||||
../lib/shared/
|
||||
FORMS += src/MainWindowBase.ui \
|
||||
src/AboutDialogBase.ui \
|
||||
src/ServerConfigDialogBase.ui \
|
||||
src/ScreenSettingsDialogBase.ui \
|
||||
src/ActionDialogBase.ui \
|
||||
src/HotkeyDialogBase.ui \
|
||||
src/SettingsDialogBase.ui \
|
||||
src/SetupWizardBase.ui \
|
||||
src/AddClientDialogBase.ui \
|
||||
src/ActivationDialog.ui \
|
||||
src/CancelActivationDialog.ui \
|
||||
src/FailedLoginDialog.ui
|
||||
SOURCES += src/main.cpp \
|
||||
src/MainWindow.cpp \
|
||||
src/AboutDialog.cpp \
|
||||
src/ServerConfig.cpp \
|
||||
src/ServerConfigDialog.cpp \
|
||||
src/ScreenSetupView.cpp \
|
||||
src/Screen.cpp \
|
||||
src/ScreenSetupModel.cpp \
|
||||
src/NewScreenWidget.cpp \
|
||||
src/TrashScreenWidget.cpp \
|
||||
src/ScreenSettingsDialog.cpp \
|
||||
src/BaseConfig.cpp \
|
||||
src/HotkeyDialog.cpp \
|
||||
src/ActionDialog.cpp \
|
||||
src/Hotkey.cpp \
|
||||
src/Action.cpp \
|
||||
src/KeySequence.cpp \
|
||||
src/KeySequenceWidget.cpp \
|
||||
src/SettingsDialog.cpp \
|
||||
src/AppConfig.cpp \
|
||||
src/QSynergyApplication.cpp \
|
||||
src/VersionChecker.cpp \
|
||||
src/SetupWizard.cpp \
|
||||
src/IpcClient.cpp \
|
||||
src/IpcReader.cpp \
|
||||
src/Ipc.cpp \
|
||||
src/SynergyLocale.cpp \
|
||||
src/QUtility.cpp \
|
||||
src/ZeroconfServer.cpp \
|
||||
src/ZeroconfThread.cpp \
|
||||
src/ZeroconfRegister.cpp \
|
||||
src/ZeroconfBrowser.cpp \
|
||||
src/ZeroconfService.cpp \
|
||||
src/DataDownloader.cpp \
|
||||
src/AddClientDialog.cpp \
|
||||
src/CommandProcess.cpp \
|
||||
src/CoreInterface.cpp \
|
||||
src/Fingerprint.cpp \
|
||||
src/SslCertificate.cpp \
|
||||
src/WebClient.cpp \
|
||||
src/ActivationNotifier.cpp \
|
||||
src/ActivationDialog.cpp \
|
||||
src/CancelActivationDialog.cpp \
|
||||
src/FailedLoginDialog.cpp \
|
||||
../lib/shared/SerialKey.cpp \
|
||||
src/LicenseManager.cpp
|
||||
HEADERS += src/MainWindow.h \
|
||||
src/AboutDialog.h \
|
||||
src/ServerConfig.h \
|
||||
src/ServerConfigDialog.h \
|
||||
src/ScreenSetupView.h \
|
||||
src/Screen.h \
|
||||
src/ScreenSetupModel.h \
|
||||
src/NewScreenWidget.h \
|
||||
src/TrashScreenWidget.h \
|
||||
src/ScreenSettingsDialog.h \
|
||||
src/BaseConfig.h \
|
||||
src/HotkeyDialog.h \
|
||||
src/ActionDialog.h \
|
||||
src/Hotkey.h \
|
||||
src/Action.h \
|
||||
src/KeySequence.h \
|
||||
src/KeySequenceWidget.h \
|
||||
src/SettingsDialog.h \
|
||||
src/AppConfig.h \
|
||||
src/QSynergyApplication.h \
|
||||
src/VersionChecker.h \
|
||||
src/SetupWizard.h \
|
||||
src/IpcClient.h \
|
||||
src/IpcReader.h \
|
||||
src/Ipc.h \
|
||||
src/SynergyLocale.h \
|
||||
src/QUtility.h \
|
||||
src/ZeroconfServer.h \
|
||||
src/ZeroconfThread.h \
|
||||
src/ZeroconfRegister.h \
|
||||
src/ZeroconfRecord.h \
|
||||
src/ZeroconfBrowser.h \
|
||||
src/ZeroconfService.h \
|
||||
src/DataDownloader.h \
|
||||
src/AddClientDialog.h \
|
||||
src/CommandProcess.h \
|
||||
src/ProcessorArch.h \
|
||||
src/CoreInterface.h \
|
||||
src/Fingerprint.h \
|
||||
src/SslCertificate.h \
|
||||
src/WebClient.h \
|
||||
src/ActivationNotifier.h \
|
||||
src/ElevateMode.h \
|
||||
src/ActivationDialog.h \
|
||||
src/CancelActivationDialog.h \
|
||||
src/FailedLoginDialog.h \
|
||||
../lib/shared/EditionType.h \
|
||||
../lib/shared/SerialKey.h \
|
||||
src/LicenseManager.h
|
||||
RESOURCES += res/Synergy.qrc
|
||||
RC_FILE = res/win/Synergy.rc
|
||||
macx {
|
||||
QMAKE_INFO_PLIST = res/mac/Info.plist
|
||||
TARGET = Synergy
|
||||
QSYNERGY_ICON.files = res/mac/Synergy.icns
|
||||
QSYNERGY_ICON.path = Contents/Resources
|
||||
QMAKE_BUNDLE_DATA += QSYNERGY_ICON
|
||||
LIBS += $$MACX_LIBS
|
||||
}
|
||||
unix:!macx:LIBS += -ldns_sd
|
||||
debug {
|
||||
OBJECTS_DIR = tmp/debug
|
||||
MOC_DIR = tmp/debug
|
||||
RCC_DIR = tmp/debug
|
||||
}
|
||||
release {
|
||||
OBJECTS_DIR = tmp/release
|
||||
MOC_DIR = tmp/release
|
||||
RCC_DIR = tmp/release
|
||||
}
|
||||
win32-msvc2015 {
|
||||
LIBS += -lAdvapi32
|
||||
QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMT
|
||||
}
|
||||
win32-msvc* {
|
||||
contains(QMAKE_HOST.arch, x86):{
|
||||
QMAKE_LFLAGS *= /MACHINE:X86
|
||||
LIBS += -L"$$(BONJOUR_SDK_HOME)/Lib/Win32" -ldnssd
|
||||
}
|
||||
|
||||
contains(QMAKE_HOST.arch, x86_64):{
|
||||
QMAKE_LFLAGS *= /MACHINE:X64
|
||||
LIBS += -L"$$(BONJOUR_SDK_HOME)/Lib/x64" -ldnssd
|
||||
}
|
||||
}
|
||||
win32 {
|
||||
Debug:DESTDIR = ../../bin/Debug
|
||||
Release:DESTDIR = ../../bin/Release
|
||||
INCLUDEPATH += "$$(BONJOUR_SDK_HOME)/Include"
|
||||
}
|
||||
else:DESTDIR = ../../bin
|
||||
1407
src/gui/gui.ts
Normal file
1407
src/gui/gui.ts
Normal file
File diff suppressed because it is too large
Load Diff
1
src/gui/lang.cmd
Normal file
1
src/gui/lang.cmd
Normal file
@@ -0,0 +1 @@
|
||||
lupdate -noobsolete gui.pro -ts gui.ts
|
||||
2
src/gui/langbuild.cmd
Normal file
2
src/gui/langbuild.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
cd res/lang
|
||||
lrelease *.ts
|
||||
59
src/gui/res/Synergy.qrc
Normal file
59
src/gui/res/Synergy.qrc
Normal file
@@ -0,0 +1,59 @@
|
||||
<RCC>
|
||||
<qresource prefix="/res">
|
||||
<file>icons/16x16/synergy-connected.png</file>
|
||||
<file>icons/16x16/synergy-disconnected.png</file>
|
||||
<file>icons/64x64/video-display.png</file>
|
||||
<file>icons/64x64/user-trash.png</file>
|
||||
<file>icons/16x16/warning.png</file>
|
||||
<file>icons/256x256/synergy.ico</file>
|
||||
<file>image/about.png</file>
|
||||
<file>lang/gui_ar.qm</file>
|
||||
<file>lang/gui_bg-BG.qm</file>
|
||||
<file>lang/gui_ca-AD.qm</file>
|
||||
<file>lang/gui_cs-CZ.qm</file>
|
||||
<file>lang/gui_cy.qm</file>
|
||||
<file>lang/gui_da.qm</file>
|
||||
<file>lang/gui_de.qm</file>
|
||||
<file>lang/gui_es.qm</file>
|
||||
<file>lang/gui_fi.qm</file>
|
||||
<file>lang/gui_fr.qm</file>
|
||||
<file>lang/gui_grk.qm</file>
|
||||
<file>lang/gui_he.qm</file>
|
||||
<file>lang/gui_hr-HR.qm</file>
|
||||
<file>lang/gui_hu-HU.qm</file>
|
||||
<file>lang/gui_id.qm</file>
|
||||
<file>lang/gui_it.qm</file>
|
||||
<file>lang/gui_ja-JP.qm</file>
|
||||
<file>lang/gui_ko.qm</file>
|
||||
<file>lang/gui_lt.qm</file>
|
||||
<file>lang/gui_lv.qm</file>
|
||||
<file>lang/gui_nl-NL.qm</file>
|
||||
<file>lang/gui_no.qm</file>
|
||||
<file>lang/gui_pes-IR.qm</file>
|
||||
<file>lang/gui_pl-PL.qm</file>
|
||||
<file>lang/gui_pt-BR.qm</file>
|
||||
<file>lang/gui_pt-PT.qm</file>
|
||||
<file>lang/gui_ro.qm</file>
|
||||
<file>lang/gui_ru.qm</file>
|
||||
<file>lang/gui_si.qm</file>
|
||||
<file>lang/gui_sk-SK.qm</file>
|
||||
<file>lang/gui_sl-SI.qm</file>
|
||||
<file>lang/gui_sq-AL.qm</file>
|
||||
<file>lang/gui_sr.qm</file>
|
||||
<file>lang/gui_sv.qm</file>
|
||||
<file>lang/gui_th-TH.qm</file>
|
||||
<file>lang/gui_tr-TR.qm</file>
|
||||
<file>lang/gui_uk.qm</file>
|
||||
<file>lang/gui_ur.qm</file>
|
||||
<file>lang/gui_mr.qm</file>
|
||||
<file>lang/gui_vi.qm</file>
|
||||
<file>lang/gui_zh-CN.qm</file>
|
||||
<file>lang/gui_zh-TW.qm</file>
|
||||
<file>lang/Languages.xml</file>
|
||||
<file>icons/16x16/money.png</file>
|
||||
<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>
|
||||
BIN
src/gui/res/icons/16x16/auto-config.png
Normal file
BIN
src/gui/res/icons/16x16/auto-config.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 610 B |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user