normalised line endings - replaced \r\n with \n
This commit is contained in:
parent
77200d5779
commit
f4d937532e
182
CMakeLists.txt
182
CMakeLists.txt
|
@ -1,91 +1,91 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Version number for Synergy+
|
# Version number for Synergy+
|
||||||
SET(VERSION_MAJOR 1)
|
SET(VERSION_MAJOR 1)
|
||||||
SET(VERSION_MINOR 5)
|
SET(VERSION_MINOR 5)
|
||||||
SET(VERSION_REV 0)
|
SET(VERSION_REV 0)
|
||||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
||||||
|
|
||||||
|
|
||||||
# The check for 2.6 may be too strict (consider lowering).
|
# The check for 2.6 may be too strict (consider lowering).
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)
|
||||||
|
|
||||||
# CMake complains if we don't have this.
|
# CMake complains if we don't have this.
|
||||||
IF(COMMAND cmake_policy)
|
IF(COMMAND cmake_policy)
|
||||||
CMAKE_POLICY(SET CMP0003 NEW)
|
CMAKE_POLICY(SET CMP0003 NEW)
|
||||||
ENDIF(COMMAND cmake_policy)
|
ENDIF(COMMAND cmake_policy)
|
||||||
|
|
||||||
# We're escaping quotes in the Windows version number, because
|
# We're escaping quotes in the Windows version number, because
|
||||||
# for some reason CMake won't do it at config version 2.4.7
|
# for some reason CMake won't do it at config version 2.4.7
|
||||||
# It seems that this restores the newer behaviour where define
|
# It seems that this restores the newer behaviour where define
|
||||||
# args are not auto-escaped.
|
# args are not auto-escaped.
|
||||||
IF(COMMAND cmake_policy)
|
IF(COMMAND cmake_policy)
|
||||||
CMAKE_POLICY(SET CMP0005 NEW)
|
CMAKE_POLICY(SET CMP0005 NEW)
|
||||||
ENDIF(COMMAND cmake_policy)
|
ENDIF(COMMAND cmake_policy)
|
||||||
|
|
||||||
# First, declare project (important for prerequisite checks).
|
# First, declare project (important for prerequisite checks).
|
||||||
PROJECT(synergy-plus C CXX)
|
PROJECT(synergy-plus C CXX)
|
||||||
|
|
||||||
# Set some easy to type variables.
|
# Set some easy to type variables.
|
||||||
SET(root_dir ${CMAKE_SOURCE_DIR})
|
SET(root_dir ${CMAKE_SOURCE_DIR})
|
||||||
SET(cmake_dir ${root_dir}/cmake)
|
SET(cmake_dir ${root_dir}/cmake)
|
||||||
SET(bin_dir ${root_dir}/bin)
|
SET(bin_dir ${root_dir}/bin)
|
||||||
SET(doc_dir ${root_dir}/doc)
|
SET(doc_dir ${root_dir}/doc)
|
||||||
|
|
||||||
# Now for the stuff to generate config.h (and setup defines).
|
# Now for the stuff to generate config.h (and setup defines).
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_config.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_config.txt)
|
||||||
|
|
||||||
# Now for all the executables and libraries.
|
# Now for all the executables and libraries.
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_lib.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_lib.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_synergyc.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_synergyc.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_synergys.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_synergys.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_launcher.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_launcher.txt)
|
||||||
|
|
||||||
# Setup the CPack config.
|
# Setup the CPack config.
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_cpack.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_cpack.txt)
|
||||||
|
|
||||||
# Setup doxygen
|
# Setup doxygen
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_doxygen.txt)
|
INCLUDE(${cmake_dir}/CMakeLists_doxygen.txt)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# add /analyze in order to unconver potential bugs in the source code
|
# add /analyze in order to unconver potential bugs in the source code
|
||||||
# Details: http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
|
# Details: http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
|
||||||
# add /FR to generate browse information (ncb files) usefull for using IDE
|
# add /FR to generate browse information (ncb files) usefull for using IDE
|
||||||
|
|
||||||
#define _BIND_TO_CURRENT_CRT_VERSION 1
|
#define _BIND_TO_CURRENT_CRT_VERSION 1
|
||||||
#define _BIND_TO_CURRENT_ATL_VERSION 1
|
#define _BIND_TO_CURRENT_ATL_VERSION 1
|
||||||
#define _BIND_TO_CURRENT_MFC_VERSION 1
|
#define _BIND_TO_CURRENT_MFC_VERSION 1
|
||||||
#define _BIND_TO_CURRENT_OPENMP_VERSION 1
|
#define _BIND_TO_CURRENT_OPENMP_VERSION 1
|
||||||
# next line replaced the previous 4 ones:
|
# next line replaced the previous 4 ones:
|
||||||
#define _BIND_TO_CURRENT_VCLIBS_VERSION 1;
|
#define _BIND_TO_CURRENT_VCLIBS_VERSION 1;
|
||||||
|
|
||||||
# compiler: /MP - use multi cores to compile
|
# compiler: /MP - use multi cores to compile
|
||||||
# added _SECURE_SCL=1 for finding bugs with iterators - http://msdn.microsoft.com/en-us/library/aa985965.aspx
|
# added _SECURE_SCL=1 for finding bugs with iterators - http://msdn.microsoft.com/en-us/library/aa985965.aspx
|
||||||
|
|
||||||
# common args between all vs builds
|
# common args between all vs builds
|
||||||
SET(VS_ARGS "/FR /MP /D _BIND_TO_CURRENT_VCLIBS_VERSION=1 /D _SECURE_SCL=1 ${VS_ARGS_EXTRA}")
|
SET(VS_ARGS "/FR /MP /D _BIND_TO_CURRENT_VCLIBS_VERSION=1 /D _SECURE_SCL=1 ${VS_ARGS_EXTRA}")
|
||||||
|
|
||||||
# we may use `cmake -D VS_ARGS_EXTRA="/analyze"` for example to specify
|
# we may use `cmake -D VS_ARGS_EXTRA="/analyze"` for example to specify
|
||||||
# analyze mode (since we don't always want to use it; e.g. on non-team
|
# analyze mode (since we don't always want to use it; e.g. on non-team
|
||||||
# or non-x86 compiler editions where there's no support)
|
# or non-x86 compiler editions where there's no support)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VS_ARGS}")
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VS_ARGS}")
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VS_ARGS}")
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VS_ARGS}")
|
||||||
|
|
||||||
# this line removes "/D NDEBUG" from release, we want them in order to find bugs even on release builds.
|
# this line removes "/D NDEBUG" from release, we want them in order to find bugs even on release builds.
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2")
|
SET(CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2")
|
||||||
|
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
2
COMPILE
2
COMPILE
|
@ -1 +1 @@
|
||||||
See: http://code.google.com/p/synergy-plus/wiki/Compiling
|
See: http://code.google.com/p/synergy-plus/wiki/Compiling
|
||||||
|
|
34
README
34
README
|
@ -1,17 +1,17 @@
|
||||||
See: http://code.google.com/p/synergy-plus/wiki/Readme
|
See: http://code.google.com/p/synergy-plus/wiki/Readme
|
||||||
|
|
||||||
Announcement | 2009-08-04
|
Announcement | 2009-08-04
|
||||||
=========================
|
=========================
|
||||||
We have recently switched to CMake, to replace Automake.
|
We have recently switched to CMake, to replace Automake.
|
||||||
Plese read the Compiling wiki page for help with CMake:
|
Plese read the Compiling wiki page for help with CMake:
|
||||||
http://code.google.com/p/synergy-plus/wiki/Compiling
|
http://code.google.com/p/synergy-plus/wiki/Compiling
|
||||||
|
|
||||||
Linux/Mac
|
Linux/Mac
|
||||||
---------
|
---------
|
||||||
Instead of using the traditional GNU style `./configure; make`
|
Instead of using the traditional GNU style `./configure; make`
|
||||||
commands, you will now need to use CMake.
|
commands, you will now need to use CMake.
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
-------
|
-------
|
||||||
Instead of using the VS2005 and VS2008 directories, you now need
|
Instead of using the VS2005 and VS2008 directories, you now need
|
||||||
to generate the Visual Studio project files using CMake.
|
to generate the Visual Studio project files using CMake.
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1862
build/commands.py
1862
build/commands.py
File diff suppressed because it is too large
Load Diff
|
@ -1,42 +1,42 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2010 The Synergy+ Project
|
# Copyright (C) 2010 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from ftplib import FTP
|
from ftplib import FTP
|
||||||
|
|
||||||
class FtpUploader:
|
class FtpUploader:
|
||||||
def __init__(self, host, user, password, dir):
|
def __init__(self, host, user, password, dir):
|
||||||
self.host = host
|
self.host = host
|
||||||
self.user = user
|
self.user = user
|
||||||
self.password = password
|
self.password = password
|
||||||
self.dir = dir
|
self.dir = dir
|
||||||
|
|
||||||
def run(self, src, dest, replace=False):
|
def run(self, src, dest, replace=False):
|
||||||
|
|
||||||
ftp = FTP(self.host, self.user, self.password)
|
ftp = FTP(self.host, self.user, self.password)
|
||||||
ftp.cwd(self.dir)
|
ftp.cwd(self.dir)
|
||||||
|
|
||||||
# check to see if we should stop here
|
# check to see if we should stop here
|
||||||
if not replace:
|
if not replace:
|
||||||
files = ftp.nlst()
|
files = ftp.nlst()
|
||||||
if dest in files:
|
if dest in files:
|
||||||
print 'Already exists, skipping.'
|
print 'Already exists, skipping.'
|
||||||
ftp.close()
|
ftp.close()
|
||||||
return
|
return
|
||||||
|
|
||||||
f = open(src, 'rb')
|
f = open(src, 'rb')
|
||||||
ftp.storbinary('STOR ' + dest, f)
|
ftp.storbinary('STOR ' + dest, f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
ftp.close()
|
ftp.close()
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Declare libs, so we can use list in linker later. There's probably
|
# Declare libs, so we can use list in linker later. There's probably
|
||||||
# a more elegant way of doing this; with SCons, when you check for the
|
# a more elegant way of doing this; with SCons, when you check for the
|
||||||
# lib, it is automatically passed to the linker.
|
# lib, it is automatically passed to the linker.
|
||||||
SET(libs)
|
SET(libs)
|
||||||
|
|
||||||
|
@ -209,8 +209,8 @@ IF(UNIX)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
|
|
||||||
LIST(APPEND libs Wtsapi32 Userenv)
|
LIST(APPEND libs Wtsapi32 Userenv)
|
||||||
|
|
||||||
ADD_DEFINITIONS(
|
ADD_DEFINITIONS(
|
||||||
/DWIN32
|
/DWIN32
|
||||||
|
|
|
@ -1,135 +1,135 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# List of CPack variables:
|
# List of CPack variables:
|
||||||
# http://www.vtk.org/Wiki/CMake:CPackConfiguration
|
# http://www.vtk.org/Wiki/CMake:CPackConfiguration
|
||||||
|
|
||||||
# CPack files common to all platforms.
|
# CPack files common to all platforms.
|
||||||
SET(cpack_targets synergys synergyc)
|
SET(cpack_targets synergys synergyc)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# Windows has an extra GUI and DLL.
|
# Windows has an extra GUI and DLL.
|
||||||
LIST(APPEND cpack_targets launcher synrgyhk)
|
LIST(APPEND cpack_targets launcher synrgyhk)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
INSTALL(
|
INSTALL(
|
||||||
TARGETS ${cpack_targets}
|
TARGETS ${cpack_targets}
|
||||||
RUNTIME DESTINATION bin)
|
RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
INSTALL(
|
INSTALL(
|
||||||
FILES
|
FILES
|
||||||
bin/Release/qsynergy.exe
|
bin/Release/qsynergy.exe
|
||||||
DESTINATION bin)
|
DESTINATION bin)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
# TODO: how the hell do we distribute mac apps?
|
# TODO: how the hell do we distribute mac apps?
|
||||||
#INSTALL(
|
#INSTALL(
|
||||||
# MACOSX_BUNDLE
|
# MACOSX_BUNDLE
|
||||||
# bin/QSynergy.app
|
# bin/QSynergy.app
|
||||||
# DESTINATION bin)
|
# DESTINATION bin)
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
INSTALL(
|
INSTALL(
|
||||||
FILES
|
FILES
|
||||||
bin/qsynergy
|
bin/qsynergy
|
||||||
DESTINATION bin)
|
DESTINATION bin)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
# The default CPack behaviour is not to append the system processor
|
# The default CPack behaviour is not to append the system processor
|
||||||
# type, which is undesirable in our case, since we want to support
|
# type, which is undesirable in our case, since we want to support
|
||||||
# both 32-bit and 64-bit processors.
|
# both 32-bit and 64-bit processors.
|
||||||
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
||||||
|
|
||||||
# Hack: When running CMake on 64-bit Windows 7, the value of
|
# Hack: When running CMake on 64-bit Windows 7, the value of
|
||||||
# CMAKE_SYSTEM_PROCESSOR always seems to be x86, regardless of if the
|
# CMAKE_SYSTEM_PROCESSOR always seems to be x86, regardless of if the
|
||||||
# CMake build is 32-bit or 64-bit. As a work around, we will prefix either
|
# CMake build is 32-bit or 64-bit. As a work around, we will prefix either
|
||||||
# x86 or x64 (in the same style as Microsoft do with their installers).
|
# x86 or x64 (in the same style as Microsoft do with their installers).
|
||||||
# However, some confusion may be caused when the user sees that Synergy+
|
# However, some confusion may be caused when the user sees that Synergy+
|
||||||
# is installed in the x86 Program Files directory (even though it's a
|
# is installed in the x86 Program Files directory (even though it's a
|
||||||
# 64-bit build). This is caused by NSIS only supporting the 32-bit
|
# 64-bit build). This is caused by NSIS only supporting the 32-bit
|
||||||
# installs structure (also uses 32-bit registry key locations).
|
# installs structure (also uses 32-bit registry key locations).
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(CMAKE_CL_64)
|
IF(CMAKE_CL_64)
|
||||||
SET(CPACK_SYSTEM_NAME Windows-x64)
|
SET(CPACK_SYSTEM_NAME Windows-x64)
|
||||||
ELSE(CMAKE_CL_64)
|
ELSE(CMAKE_CL_64)
|
||||||
SET(CPACK_SYSTEM_NAME Windows-x86)
|
SET(CPACK_SYSTEM_NAME Windows-x86)
|
||||||
ENDIF(CMAKE_CL_64)
|
ENDIF(CMAKE_CL_64)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
# For source code, use .tar.gz on Unix, and .zip on Windows
|
# For source code, use .tar.gz on Unix, and .zip on Windows
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
SET(CPACK_SOURCE_GENERATOR TGZ)
|
SET(CPACK_SOURCE_GENERATOR TGZ)
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
SET(CPACK_SOURCE_GENERATOR ZIP)
|
SET(CPACK_SOURCE_GENERATOR ZIP)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CPACK_SYSTEM_NAME "MacOSX-Universal")
|
set(CPACK_SYSTEM_NAME "MacOSX-Universal")
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_NAME "synergy-plus")
|
SET(CPACK_PACKAGE_NAME "synergy-plus")
|
||||||
SET(CPACK_PACKAGE_VENDOR "The Synergy+ Project")
|
SET(CPACK_PACKAGE_VENDOR "The Synergy+ Project")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installs Synergy+ server and client")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installs Synergy+ server and client")
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV})
|
SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV})
|
||||||
SET(CPACK_PACKAGE_VERSION ${VERSION})
|
SET(CPACK_PACKAGE_VERSION ${VERSION})
|
||||||
SET(CPACK_PACKAGE_CONTACT http://code.google.com/p/synergy-plus/)
|
SET(CPACK_PACKAGE_CONTACT http://code.google.com/p/synergy-plus/)
|
||||||
SET(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf")
|
SET(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf")
|
||||||
SET(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
|
SET(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(WIN32_ICON "${root_dir}/cmd/launcher/synergy.ico")
|
SET(WIN32_ICON "${root_dir}/cmd/launcher/synergy.ico")
|
||||||
SET(CPACK_NSIS_MUI_ICON ${WIN32_ICON})
|
SET(CPACK_NSIS_MUI_ICON ${WIN32_ICON})
|
||||||
SET(CPACK_NSIS_MUI_UNIICON ${WIN32_ICON})
|
SET(CPACK_NSIS_MUI_UNIICON ${WIN32_ICON})
|
||||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME launcher)
|
SET(CPACK_NSIS_INSTALLED_ICON_NAME launcher)
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Synergy+")
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Synergy+")
|
||||||
SET(CPACK_PACKAGE_EXECUTABLES qsynergy;Synergy+)
|
SET(CPACK_PACKAGE_EXECUTABLES qsynergy;Synergy+)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
# files to exclude from src package (regex patterns)
|
# files to exclude from src package (regex patterns)
|
||||||
# to escape, use 4 backslashes (\\\\) -- yuck!
|
# to escape, use 4 backslashes (\\\\) -- yuck!
|
||||||
SET(CPACK_SOURCE_IGNORE_FILES
|
SET(CPACK_SOURCE_IGNORE_FILES
|
||||||
# temp output dir in root
|
# temp output dir in root
|
||||||
"/bin/"
|
"/bin/"
|
||||||
|
|
||||||
# generated config.h file
|
# generated config.h file
|
||||||
"/config\\\\.h$"
|
"/config\\\\.h$"
|
||||||
|
|
||||||
# buildbot stuff
|
# buildbot stuff
|
||||||
"\\\\.buildbot\\\\-sourcedata$"
|
"\\\\.buildbot\\\\-sourcedata$"
|
||||||
|
|
||||||
# qt temp build dir
|
# qt temp build dir
|
||||||
"/gui/tmp/.*"
|
"/gui/tmp/.*"
|
||||||
|
|
||||||
# qt make file
|
# qt make file
|
||||||
"/gui/Makefile$"
|
"/gui/Makefile$"
|
||||||
|
|
||||||
# qt generated ui headers
|
# qt generated ui headers
|
||||||
"/gui/ui_.*\\\\.h$"
|
"/gui/ui_.*\\\\.h$"
|
||||||
|
|
||||||
# compiled python files
|
# compiled python files
|
||||||
".*\\\\.pyc$"
|
".*\\\\.pyc$"
|
||||||
|
|
||||||
# subversion caches (all dirs)
|
# subversion caches (all dirs)
|
||||||
".*/\\\\.svn/.*"
|
".*/\\\\.svn/.*"
|
||||||
|
|
||||||
# emacs temporary files
|
# emacs temporary files
|
||||||
".*~$"
|
".*~$"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Must be last (since it relies of CPACK_ vars).
|
# Must be last (since it relies of CPACK_ vars).
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
|
@ -1,84 +1,84 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(root_cmd_launcher ${root_dir}/cmd/launcher)
|
SET(root_cmd_launcher ${root_dir}/cmd/launcher)
|
||||||
|
|
||||||
SET(src_cmd_launcher_mswindows
|
SET(src_cmd_launcher_mswindows
|
||||||
${root_cmd_launcher}/CAddScreen.cpp
|
${root_cmd_launcher}/CAddScreen.cpp
|
||||||
${root_cmd_launcher}/CAdvancedOptions.cpp
|
${root_cmd_launcher}/CAdvancedOptions.cpp
|
||||||
${root_cmd_launcher}/CAutoStart.cpp
|
${root_cmd_launcher}/CAutoStart.cpp
|
||||||
${root_cmd_launcher}/CGlobalOptions.cpp
|
${root_cmd_launcher}/CGlobalOptions.cpp
|
||||||
${root_cmd_launcher}/CHotkeyOptions.cpp
|
${root_cmd_launcher}/CHotkeyOptions.cpp
|
||||||
${root_cmd_launcher}/CInfo.cpp
|
${root_cmd_launcher}/CInfo.cpp
|
||||||
${root_cmd_launcher}/CScreensLinks.cpp
|
${root_cmd_launcher}/CScreensLinks.cpp
|
||||||
${root_cmd_launcher}/LaunchUtil.cpp
|
${root_cmd_launcher}/LaunchUtil.cpp
|
||||||
${root_cmd_launcher}/launcher.cpp
|
${root_cmd_launcher}/launcher.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_cmd_launcher_mswindows
|
SET(inc_cmd_launcher_mswindows
|
||||||
${root_cmd_launcher}/CAddScreen.h
|
${root_cmd_launcher}/CAddScreen.h
|
||||||
${root_cmd_launcher}/CAdvancedOptions.h
|
${root_cmd_launcher}/CAdvancedOptions.h
|
||||||
${root_cmd_launcher}/CAutoStart.h
|
${root_cmd_launcher}/CAutoStart.h
|
||||||
${root_cmd_launcher}/CGlobalOptions.h
|
${root_cmd_launcher}/CGlobalOptions.h
|
||||||
${root_cmd_launcher}/CHotkeyOptions.h
|
${root_cmd_launcher}/CHotkeyOptions.h
|
||||||
${root_cmd_launcher}/CInfo.h
|
${root_cmd_launcher}/CInfo.h
|
||||||
${root_cmd_launcher}/CScreensLinks.h
|
${root_cmd_launcher}/CScreensLinks.h
|
||||||
${root_cmd_launcher}/LaunchUtil.h
|
${root_cmd_launcher}/LaunchUtil.h
|
||||||
${root_cmd_launcher}/resource.h
|
${root_cmd_launcher}/resource.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(res_cmd_launcher_mswindows
|
SET(res_cmd_launcher_mswindows
|
||||||
${root_cmd_launcher}/launcher.rc
|
${root_cmd_launcher}/launcher.rc
|
||||||
${root_cmd_launcher}/synergy.ico
|
${root_cmd_launcher}/synergy.ico
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_launcher)
|
SET(src_cmd_launcher)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_carbon})
|
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_carbon})
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_xwindows})
|
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_xwindows})
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
LIST(APPEND src_cmd_launcher
|
LIST(APPEND src_cmd_launcher
|
||||||
${inc_cmd_launcher_mswindows}
|
${inc_cmd_launcher_mswindows}
|
||||||
${res_cmd_launcher_mswindows}
|
${res_cmd_launcher_mswindows}
|
||||||
${src_cmd_launcher_mswindows}
|
${src_cmd_launcher_mswindows}
|
||||||
)
|
)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
SET(inc_dirs_cmd_launcher
|
SET(inc_dirs_cmd_launcher
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib
|
${root_dir}/lib
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
${root_dir}/lib/base
|
${root_dir}/lib/base
|
||||||
${root_dir}/lib/common
|
${root_dir}/lib/common
|
||||||
${root_dir}/lib/io
|
${root_dir}/lib/io
|
||||||
${root_dir}/lib/mt
|
${root_dir}/lib/mt
|
||||||
${root_dir}/lib/net
|
${root_dir}/lib/net
|
||||||
${root_dir}/lib/platform
|
${root_dir}/lib/platform
|
||||||
${root_dir}/lib/synergy
|
${root_dir}/lib/synergy
|
||||||
${root_dir}/lib/server
|
${root_dir}/lib/server
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_launcher})
|
INCLUDE_DIRECTORIES(${inc_dirs_cmd_launcher})
|
||||||
ADD_EXECUTABLE(launcher WIN32 ${src_cmd_launcher})
|
ADD_EXECUTABLE(launcher WIN32 ${src_cmd_launcher})
|
||||||
TARGET_LINK_LIBRARIES(launcher synergy ${libs})
|
TARGET_LINK_LIBRARIES(launcher synergy ${libs})
|
||||||
|
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
|
@ -1,415 +1,415 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(root_lib ${root_dir}/lib)
|
SET(root_lib ${root_dir}/lib)
|
||||||
|
|
||||||
SET(src_lib_arch
|
SET(src_lib_arch
|
||||||
${root_lib}/arch/CArchAppUtil.cpp
|
${root_lib}/arch/CArchAppUtil.cpp
|
||||||
${root_lib}/arch/CArch.cpp
|
${root_lib}/arch/CArch.cpp
|
||||||
${root_lib}/arch/CArchDaemonNone.cpp
|
${root_lib}/arch/CArchDaemonNone.cpp
|
||||||
${root_lib}/arch/XArch.cpp
|
${root_lib}/arch/XArch.cpp
|
||||||
${root_lib}/arch/CArchConsoleStd.cpp
|
${root_lib}/arch/CArchConsoleStd.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_arch_unix
|
SET(src_lib_arch_unix
|
||||||
${root_lib}/arch/CArchAppUtilUnix.cpp
|
${root_lib}/arch/CArchAppUtilUnix.cpp
|
||||||
${root_lib}/arch/CArchConsoleUnix.cpp
|
${root_lib}/arch/CArchConsoleUnix.cpp
|
||||||
${root_lib}/arch/CArchDaemonUnix.cpp
|
${root_lib}/arch/CArchDaemonUnix.cpp
|
||||||
${root_lib}/arch/CArchFileUnix.cpp
|
${root_lib}/arch/CArchFileUnix.cpp
|
||||||
${root_lib}/arch/CArchLogUnix.cpp
|
${root_lib}/arch/CArchLogUnix.cpp
|
||||||
${root_lib}/arch/CArchMultithreadPosix.cpp
|
${root_lib}/arch/CArchMultithreadPosix.cpp
|
||||||
${root_lib}/arch/CArchNetworkBSD.cpp
|
${root_lib}/arch/CArchNetworkBSD.cpp
|
||||||
${root_lib}/arch/CArchSleepUnix.cpp
|
${root_lib}/arch/CArchSleepUnix.cpp
|
||||||
${root_lib}/arch/CArchStringUnix.cpp
|
${root_lib}/arch/CArchStringUnix.cpp
|
||||||
${root_lib}/arch/CArchSystemUnix.cpp
|
${root_lib}/arch/CArchSystemUnix.cpp
|
||||||
${root_lib}/arch/CArchTaskBarXWindows.cpp
|
${root_lib}/arch/CArchTaskBarXWindows.cpp
|
||||||
${root_lib}/arch/CArchTimeUnix.cpp
|
${root_lib}/arch/CArchTimeUnix.cpp
|
||||||
${root_lib}/arch/XArchUnix.cpp
|
${root_lib}/arch/XArchUnix.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_arch_windows
|
SET(src_lib_arch_windows
|
||||||
${root_lib}/arch/CArchAppUtilWindows.cpp
|
${root_lib}/arch/CArchAppUtilWindows.cpp
|
||||||
${root_lib}/arch/CArchConsoleWindows.cpp
|
${root_lib}/arch/CArchConsoleWindows.cpp
|
||||||
${root_lib}/arch/CArchDaemonWindows.cpp
|
${root_lib}/arch/CArchDaemonWindows.cpp
|
||||||
${root_lib}/arch/CArchFileWindows.cpp
|
${root_lib}/arch/CArchFileWindows.cpp
|
||||||
${root_lib}/arch/CArchLogWindows.cpp
|
${root_lib}/arch/CArchLogWindows.cpp
|
||||||
${root_lib}/arch/CArchMiscWindows.cpp
|
${root_lib}/arch/CArchMiscWindows.cpp
|
||||||
${root_lib}/arch/CArchMultithreadWindows.cpp
|
${root_lib}/arch/CArchMultithreadWindows.cpp
|
||||||
${root_lib}/arch/CArchNetworkWinsock.cpp
|
${root_lib}/arch/CArchNetworkWinsock.cpp
|
||||||
${root_lib}/arch/CArchSleepWindows.cpp
|
${root_lib}/arch/CArchSleepWindows.cpp
|
||||||
${root_lib}/arch/CArchStringWindows.cpp
|
${root_lib}/arch/CArchStringWindows.cpp
|
||||||
${root_lib}/arch/CArchSystemWindows.cpp
|
${root_lib}/arch/CArchSystemWindows.cpp
|
||||||
${root_lib}/arch/CArchTaskBarWindows.cpp
|
${root_lib}/arch/CArchTaskBarWindows.cpp
|
||||||
${root_lib}/arch/CArchTimeWindows.cpp
|
${root_lib}/arch/CArchTimeWindows.cpp
|
||||||
${root_lib}/arch/XArchWindows.cpp
|
${root_lib}/arch/XArchWindows.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_arch_windows
|
SET(inc_lib_arch_windows
|
||||||
${root_lib}/arch/CArchAppUtil.h
|
${root_lib}/arch/CArchAppUtil.h
|
||||||
${root_lib}/arch/CArchAppUtilWindows.h
|
${root_lib}/arch/CArchAppUtilWindows.h
|
||||||
${root_lib}/arch/CArchConsoleWindows.h
|
${root_lib}/arch/CArchConsoleWindows.h
|
||||||
${root_lib}/arch/CArchDaemonWindows.h
|
${root_lib}/arch/CArchDaemonWindows.h
|
||||||
${root_lib}/arch/CArchFileWindows.h
|
${root_lib}/arch/CArchFileWindows.h
|
||||||
${root_lib}/arch/CArchLogWindows.h
|
${root_lib}/arch/CArchLogWindows.h
|
||||||
${root_lib}/arch/CArchMiscWindows.h
|
${root_lib}/arch/CArchMiscWindows.h
|
||||||
${root_lib}/arch/CArchMultithreadWindows.h
|
${root_lib}/arch/CArchMultithreadWindows.h
|
||||||
${root_lib}/arch/CArchNetworkWinsock.h
|
${root_lib}/arch/CArchNetworkWinsock.h
|
||||||
${root_lib}/arch/CArchSleepWindows.h
|
${root_lib}/arch/CArchSleepWindows.h
|
||||||
${root_lib}/arch/CArchStringWindows.h
|
${root_lib}/arch/CArchStringWindows.h
|
||||||
${root_lib}/arch/CArchSystemWindows.h
|
${root_lib}/arch/CArchSystemWindows.h
|
||||||
${root_lib}/arch/CArchTaskBarWindows.h
|
${root_lib}/arch/CArchTaskBarWindows.h
|
||||||
${root_lib}/arch/CArchTimeWindows.h
|
${root_lib}/arch/CArchTimeWindows.h
|
||||||
${root_lib}/arch/CArchConsoleStd.h
|
${root_lib}/arch/CArchConsoleStd.h
|
||||||
${root_lib}/arch/IArchAppUtil.h
|
${root_lib}/arch/IArchAppUtil.h
|
||||||
${root_lib}/arch/XArchWindows.h
|
${root_lib}/arch/XArchWindows.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_base
|
SET(src_lib_base
|
||||||
${root_lib}/base/CEvent.cpp
|
${root_lib}/base/CEvent.cpp
|
||||||
${root_lib}/base/CEventQueue.cpp
|
${root_lib}/base/CEventQueue.cpp
|
||||||
${root_lib}/base/CFunctionEventJob.cpp
|
${root_lib}/base/CFunctionEventJob.cpp
|
||||||
${root_lib}/base/CFunctionJob.cpp
|
${root_lib}/base/CFunctionJob.cpp
|
||||||
${root_lib}/base/CLog.cpp
|
${root_lib}/base/CLog.cpp
|
||||||
${root_lib}/base/CSimpleEventQueueBuffer.cpp
|
${root_lib}/base/CSimpleEventQueueBuffer.cpp
|
||||||
${root_lib}/base/CStopwatch.cpp
|
${root_lib}/base/CStopwatch.cpp
|
||||||
${root_lib}/base/CStringUtil.cpp
|
${root_lib}/base/CStringUtil.cpp
|
||||||
${root_lib}/base/CUnicode.cpp
|
${root_lib}/base/CUnicode.cpp
|
||||||
${root_lib}/base/IEventQueue.cpp
|
${root_lib}/base/IEventQueue.cpp
|
||||||
${root_lib}/base/LogOutputters.cpp
|
${root_lib}/base/LogOutputters.cpp
|
||||||
${root_lib}/base/XBase.cpp
|
${root_lib}/base/XBase.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_base
|
SET(inc_lib_base
|
||||||
${root_lib}/base/CEvent.h
|
${root_lib}/base/CEvent.h
|
||||||
${root_lib}/base/CEventQueue.h
|
${root_lib}/base/CEventQueue.h
|
||||||
${root_lib}/base/CFunctionEventJob.h
|
${root_lib}/base/CFunctionEventJob.h
|
||||||
${root_lib}/base/CFunctionJob.h
|
${root_lib}/base/CFunctionJob.h
|
||||||
${root_lib}/base/CLog.h
|
${root_lib}/base/CLog.h
|
||||||
${root_lib}/base/CPriorityQueue.h
|
${root_lib}/base/CPriorityQueue.h
|
||||||
${root_lib}/base/CSimpleEventQueueBuffer.h
|
${root_lib}/base/CSimpleEventQueueBuffer.h
|
||||||
${root_lib}/base/CStopwatch.h
|
${root_lib}/base/CStopwatch.h
|
||||||
${root_lib}/base/CString.h
|
${root_lib}/base/CString.h
|
||||||
${root_lib}/base/CStringUtil.h
|
${root_lib}/base/CStringUtil.h
|
||||||
${root_lib}/base/CUnicode.h
|
${root_lib}/base/CUnicode.h
|
||||||
${root_lib}/base/IEventJob.h
|
${root_lib}/base/IEventJob.h
|
||||||
${root_lib}/base/IEventQueue.h
|
${root_lib}/base/IEventQueue.h
|
||||||
${root_lib}/base/IEventQueueBuffer.h
|
${root_lib}/base/IEventQueueBuffer.h
|
||||||
${root_lib}/base/IJob.h
|
${root_lib}/base/IJob.h
|
||||||
${root_lib}/base/ILogOutputter.h
|
${root_lib}/base/ILogOutputter.h
|
||||||
${root_lib}/base/LogOutputters.h
|
${root_lib}/base/LogOutputters.h
|
||||||
${root_lib}/base/TMethodEventJob.h
|
${root_lib}/base/TMethodEventJob.h
|
||||||
${root_lib}/base/TMethodJob.h
|
${root_lib}/base/TMethodJob.h
|
||||||
${root_lib}/base/XBase.h
|
${root_lib}/base/XBase.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_client
|
SET(src_lib_client
|
||||||
${root_lib}/client/CClient.cpp
|
${root_lib}/client/CClient.cpp
|
||||||
${root_lib}/client/CServerProxy.cpp
|
${root_lib}/client/CServerProxy.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_client
|
SET(inc_lib_client
|
||||||
${root_lib}/client/CClient.h
|
${root_lib}/client/CClient.h
|
||||||
${root_lib}/client/CServerProxy.h
|
${root_lib}/client/CServerProxy.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_common
|
SET(src_lib_common
|
||||||
${root_lib}/common/Version.cpp
|
${root_lib}/common/Version.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_common
|
SET(inc_lib_common
|
||||||
${root_lib}/common/Version.h
|
${root_lib}/common/Version.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_io
|
SET(src_lib_io
|
||||||
${root_lib}/io/CStreamBuffer.cpp
|
${root_lib}/io/CStreamBuffer.cpp
|
||||||
${root_lib}/io/CStreamFilter.cpp
|
${root_lib}/io/CStreamFilter.cpp
|
||||||
${root_lib}/io/IStream.cpp
|
${root_lib}/io/IStream.cpp
|
||||||
${root_lib}/io/XIO.cpp
|
${root_lib}/io/XIO.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_io
|
SET(inc_lib_io
|
||||||
${root_lib}/io/CStreamBuffer.h
|
${root_lib}/io/CStreamBuffer.h
|
||||||
${root_lib}/io/CStreamFilter.h
|
${root_lib}/io/CStreamFilter.h
|
||||||
${root_lib}/io/IStream.h
|
${root_lib}/io/IStream.h
|
||||||
${root_lib}/io/IStreamFilterFactory.h
|
${root_lib}/io/IStreamFilterFactory.h
|
||||||
${root_lib}/io/XIO.h
|
${root_lib}/io/XIO.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_mt
|
SET(src_lib_mt
|
||||||
${root_lib}/mt/CCondVar.cpp
|
${root_lib}/mt/CCondVar.cpp
|
||||||
${root_lib}/mt/CLock.cpp
|
${root_lib}/mt/CLock.cpp
|
||||||
${root_lib}/mt/CMutex.cpp
|
${root_lib}/mt/CMutex.cpp
|
||||||
${root_lib}/mt/CThread.cpp
|
${root_lib}/mt/CThread.cpp
|
||||||
${root_lib}/mt/XMT.cpp
|
${root_lib}/mt/XMT.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_mt
|
SET(inc_lib_mt
|
||||||
${root_lib}/mt/CCondVar.h
|
${root_lib}/mt/CCondVar.h
|
||||||
${root_lib}/mt/CLock.h
|
${root_lib}/mt/CLock.h
|
||||||
${root_lib}/mt/CMutex.h
|
${root_lib}/mt/CMutex.h
|
||||||
${root_lib}/mt/CThread.h
|
${root_lib}/mt/CThread.h
|
||||||
${root_lib}/mt/XMT.h
|
${root_lib}/mt/XMT.h
|
||||||
${root_lib}/mt/XThread.h
|
${root_lib}/mt/XThread.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_net
|
SET(src_lib_net
|
||||||
${root_lib}/net/CNetworkAddress.cpp
|
${root_lib}/net/CNetworkAddress.cpp
|
||||||
${root_lib}/net/CSocketMultiplexer.cpp
|
${root_lib}/net/CSocketMultiplexer.cpp
|
||||||
${root_lib}/net/CTCPListenSocket.cpp
|
${root_lib}/net/CTCPListenSocket.cpp
|
||||||
${root_lib}/net/CTCPSocket.cpp
|
${root_lib}/net/CTCPSocket.cpp
|
||||||
${root_lib}/net/CTCPSocketFactory.cpp
|
${root_lib}/net/CTCPSocketFactory.cpp
|
||||||
${root_lib}/net/IDataSocket.cpp
|
${root_lib}/net/IDataSocket.cpp
|
||||||
${root_lib}/net/IListenSocket.cpp
|
${root_lib}/net/IListenSocket.cpp
|
||||||
${root_lib}/net/ISocket.cpp
|
${root_lib}/net/ISocket.cpp
|
||||||
${root_lib}/net/XSocket.cpp
|
${root_lib}/net/XSocket.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_net
|
SET(inc_lib_net
|
||||||
${root_lib}/net/CNetworkAddress.h
|
${root_lib}/net/CNetworkAddress.h
|
||||||
${root_lib}/net/CSocketMultiplexer.h
|
${root_lib}/net/CSocketMultiplexer.h
|
||||||
${root_lib}/net/CTCPListenSocket.h
|
${root_lib}/net/CTCPListenSocket.h
|
||||||
${root_lib}/net/CTCPSocket.h
|
${root_lib}/net/CTCPSocket.h
|
||||||
${root_lib}/net/CTCPSocketFactory.h
|
${root_lib}/net/CTCPSocketFactory.h
|
||||||
${root_lib}/net/IDataSocket.h
|
${root_lib}/net/IDataSocket.h
|
||||||
${root_lib}/net/IListenSocket.h
|
${root_lib}/net/IListenSocket.h
|
||||||
${root_lib}/net/ISocket.h
|
${root_lib}/net/ISocket.h
|
||||||
${root_lib}/net/ISocketFactory.h
|
${root_lib}/net/ISocketFactory.h
|
||||||
${root_lib}/net/ISocketMultiplexerJob.h
|
${root_lib}/net/ISocketMultiplexerJob.h
|
||||||
${root_lib}/net/TSocketMultiplexerMethodJob.h
|
${root_lib}/net/TSocketMultiplexerMethodJob.h
|
||||||
${root_lib}/net/XSocket.h
|
${root_lib}/net/XSocket.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_xwindows
|
SET(src_lib_platform_xwindows
|
||||||
${root_lib}/platform/CXWindowsClipboard.cpp
|
${root_lib}/platform/CXWindowsClipboard.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp
|
${root_lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardBMPConverter.cpp
|
${root_lib}/platform/CXWindowsClipboardBMPConverter.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardHTMLConverter.cpp
|
${root_lib}/platform/CXWindowsClipboardHTMLConverter.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardTextConverter.cpp
|
${root_lib}/platform/CXWindowsClipboardTextConverter.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardUCS2Converter.cpp
|
${root_lib}/platform/CXWindowsClipboardUCS2Converter.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardUTF8Converter.cpp
|
${root_lib}/platform/CXWindowsClipboardUTF8Converter.cpp
|
||||||
${root_lib}/platform/CXWindowsEventQueueBuffer.cpp
|
${root_lib}/platform/CXWindowsEventQueueBuffer.cpp
|
||||||
${root_lib}/platform/CXWindowsKeyState.cpp
|
${root_lib}/platform/CXWindowsKeyState.cpp
|
||||||
${root_lib}/platform/CXWindowsScreen.cpp
|
${root_lib}/platform/CXWindowsScreen.cpp
|
||||||
${root_lib}/platform/CXWindowsScreenSaver.cpp
|
${root_lib}/platform/CXWindowsScreenSaver.cpp
|
||||||
${root_lib}/platform/CXWindowsUtil.cpp
|
${root_lib}/platform/CXWindowsUtil.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_mswindows
|
SET(src_lib_platform_mswindows
|
||||||
${root_lib}/platform/CMSWindowsClipboard.cpp
|
${root_lib}/platform/CMSWindowsClipboard.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp
|
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.cpp
|
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardHTMLConverter.cpp
|
${root_lib}/platform/CMSWindowsClipboardHTMLConverter.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardTextConverter.cpp
|
${root_lib}/platform/CMSWindowsClipboardTextConverter.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardUTF16Converter.cpp
|
${root_lib}/platform/CMSWindowsClipboardUTF16Converter.cpp
|
||||||
${root_lib}/platform/CMSWindowsDesks.cpp
|
${root_lib}/platform/CMSWindowsDesks.cpp
|
||||||
${root_lib}/platform/CMSWindowsEventQueueBuffer.cpp
|
${root_lib}/platform/CMSWindowsEventQueueBuffer.cpp
|
||||||
${root_lib}/platform/CMSWindowsKeyState.cpp
|
${root_lib}/platform/CMSWindowsKeyState.cpp
|
||||||
${root_lib}/platform/CMSWindowsScreen.cpp
|
${root_lib}/platform/CMSWindowsScreen.cpp
|
||||||
${root_lib}/platform/CMSWindowsScreenSaver.cpp
|
${root_lib}/platform/CMSWindowsScreenSaver.cpp
|
||||||
${root_lib}/platform/CMSWindowsUtil.cpp
|
${root_lib}/platform/CMSWindowsUtil.cpp
|
||||||
${root_lib}/platform/CMSWindowsRelauncher.cpp
|
${root_lib}/platform/CMSWindowsRelauncher.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_platform_mswindows
|
SET(inc_lib_platform_mswindows
|
||||||
${root_lib}/platform/CMSWindowsClipboard.h
|
${root_lib}/platform/CMSWindowsClipboard.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.h
|
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.h
|
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardHTMLConverter.h
|
${root_lib}/platform/CMSWindowsClipboardHTMLConverter.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardTextConverter.h
|
${root_lib}/platform/CMSWindowsClipboardTextConverter.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardUTF16Converter.h
|
${root_lib}/platform/CMSWindowsClipboardUTF16Converter.h
|
||||||
${root_lib}/platform/CMSWindowsDesks.h
|
${root_lib}/platform/CMSWindowsDesks.h
|
||||||
${root_lib}/platform/CMSWindowsEventQueueBuffer.h
|
${root_lib}/platform/CMSWindowsEventQueueBuffer.h
|
||||||
${root_lib}/platform/CMSWindowsKeyState.h
|
${root_lib}/platform/CMSWindowsKeyState.h
|
||||||
${root_lib}/platform/CMSWindowsScreen.h
|
${root_lib}/platform/CMSWindowsScreen.h
|
||||||
${root_lib}/platform/CMSWindowsScreenSaver.h
|
${root_lib}/platform/CMSWindowsScreenSaver.h
|
||||||
${root_lib}/platform/CMSWindowsUtil.h
|
${root_lib}/platform/CMSWindowsUtil.h
|
||||||
${root_lib}/platform/CMSWindowsRelauncher.h
|
${root_lib}/platform/CMSWindowsRelauncher.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_hook
|
SET(src_lib_platform_hook
|
||||||
${root_lib}/platform/CSynergyHook.cpp
|
${root_lib}/platform/CSynergyHook.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_platform_hook
|
SET(inc_lib_platform_hook
|
||||||
${root_lib}/platform/CSynergyHook.h
|
${root_lib}/platform/CSynergyHook.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_carbon
|
SET(src_lib_platform_carbon
|
||||||
${root_lib}/platform/COSXClipboard.cpp
|
${root_lib}/platform/COSXClipboard.cpp
|
||||||
${root_lib}/platform/COSXClipboardAnyTextConverter.cpp
|
${root_lib}/platform/COSXClipboardAnyTextConverter.cpp
|
||||||
${root_lib}/platform/COSXClipboardTextConverter.cpp
|
${root_lib}/platform/COSXClipboardTextConverter.cpp
|
||||||
${root_lib}/platform/COSXClipboardUTF16Converter.cpp
|
${root_lib}/platform/COSXClipboardUTF16Converter.cpp
|
||||||
${root_lib}/platform/COSXEventQueueBuffer.cpp
|
${root_lib}/platform/COSXEventQueueBuffer.cpp
|
||||||
${root_lib}/platform/COSXKeyState.cpp
|
${root_lib}/platform/COSXKeyState.cpp
|
||||||
${root_lib}/platform/COSXScreen.cpp
|
${root_lib}/platform/COSXScreen.cpp
|
||||||
${root_lib}/platform/COSXScreenSaver.cpp
|
${root_lib}/platform/COSXScreenSaver.cpp
|
||||||
${root_lib}/platform/COSXScreenSaverUtil.m
|
${root_lib}/platform/COSXScreenSaverUtil.m
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_server
|
SET(src_lib_server
|
||||||
${root_lib}/server/CBaseClientProxy.cpp
|
${root_lib}/server/CBaseClientProxy.cpp
|
||||||
${root_lib}/server/CClientListener.cpp
|
${root_lib}/server/CClientListener.cpp
|
||||||
${root_lib}/server/CClientProxy.cpp
|
${root_lib}/server/CClientProxy.cpp
|
||||||
${root_lib}/server/CClientProxy1_0.cpp
|
${root_lib}/server/CClientProxy1_0.cpp
|
||||||
${root_lib}/server/CClientProxy1_1.cpp
|
${root_lib}/server/CClientProxy1_1.cpp
|
||||||
${root_lib}/server/CClientProxy1_2.cpp
|
${root_lib}/server/CClientProxy1_2.cpp
|
||||||
${root_lib}/server/CClientProxy1_3.cpp
|
${root_lib}/server/CClientProxy1_3.cpp
|
||||||
${root_lib}/server/CClientProxyUnknown.cpp
|
${root_lib}/server/CClientProxyUnknown.cpp
|
||||||
${root_lib}/server/CConfig.cpp
|
${root_lib}/server/CConfig.cpp
|
||||||
${root_lib}/server/CInputFilter.cpp
|
${root_lib}/server/CInputFilter.cpp
|
||||||
${root_lib}/server/CPrimaryClient.cpp
|
${root_lib}/server/CPrimaryClient.cpp
|
||||||
${root_lib}/server/CServer.cpp
|
${root_lib}/server/CServer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_server
|
SET(inc_lib_server
|
||||||
${root_lib}/server/CBaseClientProxy.h
|
${root_lib}/server/CBaseClientProxy.h
|
||||||
${root_lib}/server/CClientListener.h
|
${root_lib}/server/CClientListener.h
|
||||||
${root_lib}/server/CClientProxy.h
|
${root_lib}/server/CClientProxy.h
|
||||||
${root_lib}/server/CClientProxy1_0.h
|
${root_lib}/server/CClientProxy1_0.h
|
||||||
${root_lib}/server/CClientProxy1_1.h
|
${root_lib}/server/CClientProxy1_1.h
|
||||||
${root_lib}/server/CClientProxy1_2.h
|
${root_lib}/server/CClientProxy1_2.h
|
||||||
${root_lib}/server/CClientProxy1_3.h
|
${root_lib}/server/CClientProxy1_3.h
|
||||||
${root_lib}/server/CClientProxyUnknown.h
|
${root_lib}/server/CClientProxyUnknown.h
|
||||||
${root_lib}/server/CConfig.h
|
${root_lib}/server/CConfig.h
|
||||||
${root_lib}/server/CInputFilter.h
|
${root_lib}/server/CInputFilter.h
|
||||||
${root_lib}/server/CPrimaryClient.h
|
${root_lib}/server/CPrimaryClient.h
|
||||||
${root_lib}/server/CServer.h
|
${root_lib}/server/CServer.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_synergy
|
SET(src_lib_synergy
|
||||||
${root_lib}/synergy/CClientTaskBarReceiver.cpp
|
${root_lib}/synergy/CClientTaskBarReceiver.cpp
|
||||||
${root_lib}/synergy/CServerTaskBarReceiver.cpp
|
${root_lib}/synergy/CServerTaskBarReceiver.cpp
|
||||||
${root_lib}/synergy/CApp.cpp
|
${root_lib}/synergy/CApp.cpp
|
||||||
${root_lib}/synergy/CClientApp.cpp
|
${root_lib}/synergy/CClientApp.cpp
|
||||||
${root_lib}/synergy/CServerApp.cpp
|
${root_lib}/synergy/CServerApp.cpp
|
||||||
${root_lib}/synergy/CClipboard.cpp
|
${root_lib}/synergy/CClipboard.cpp
|
||||||
${root_lib}/synergy/CKeyMap.cpp
|
${root_lib}/synergy/CKeyMap.cpp
|
||||||
${root_lib}/synergy/CKeyState.cpp
|
${root_lib}/synergy/CKeyState.cpp
|
||||||
${root_lib}/synergy/CPacketStreamFilter.cpp
|
${root_lib}/synergy/CPacketStreamFilter.cpp
|
||||||
${root_lib}/synergy/CPlatformScreen.cpp
|
${root_lib}/synergy/CPlatformScreen.cpp
|
||||||
${root_lib}/synergy/CProtocolUtil.cpp
|
${root_lib}/synergy/CProtocolUtil.cpp
|
||||||
${root_lib}/synergy/CScreen.cpp
|
${root_lib}/synergy/CScreen.cpp
|
||||||
${root_lib}/synergy/IClipboard.cpp
|
${root_lib}/synergy/IClipboard.cpp
|
||||||
${root_lib}/synergy/IKeyState.cpp
|
${root_lib}/synergy/IKeyState.cpp
|
||||||
${root_lib}/synergy/IPrimaryScreen.cpp
|
${root_lib}/synergy/IPrimaryScreen.cpp
|
||||||
${root_lib}/synergy/IScreen.cpp
|
${root_lib}/synergy/IScreen.cpp
|
||||||
${root_lib}/synergy/KeyTypes.cpp
|
${root_lib}/synergy/KeyTypes.cpp
|
||||||
${root_lib}/synergy/ProtocolTypes.cpp
|
${root_lib}/synergy/ProtocolTypes.cpp
|
||||||
${root_lib}/synergy/XScreen.cpp
|
${root_lib}/synergy/XScreen.cpp
|
||||||
${root_lib}/synergy/XSynergy.cpp
|
${root_lib}/synergy/XSynergy.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_synergy
|
SET(inc_lib_synergy
|
||||||
${root_lib}/synergy/CClientTaskBarReceiver.h
|
${root_lib}/synergy/CClientTaskBarReceiver.h
|
||||||
${root_lib}/synergy/CServerTaskBarReceiver.h
|
${root_lib}/synergy/CServerTaskBarReceiver.h
|
||||||
${root_lib}/synergy/CApp.h
|
${root_lib}/synergy/CApp.h
|
||||||
${root_lib}/synergy/CClientApp.h
|
${root_lib}/synergy/CClientApp.h
|
||||||
${root_lib}/synergy/CServerApp.h
|
${root_lib}/synergy/CServerApp.h
|
||||||
${root_lib}/synergy/CClipboard.h
|
${root_lib}/synergy/CClipboard.h
|
||||||
${root_lib}/synergy/CKeyMap.h
|
${root_lib}/synergy/CKeyMap.h
|
||||||
${root_lib}/synergy/CKeyState.h
|
${root_lib}/synergy/CKeyState.h
|
||||||
${root_lib}/synergy/CPacketStreamFilter.h
|
${root_lib}/synergy/CPacketStreamFilter.h
|
||||||
${root_lib}/synergy/CPlatformScreen.h
|
${root_lib}/synergy/CPlatformScreen.h
|
||||||
${root_lib}/synergy/CProtocolUtil.h
|
${root_lib}/synergy/CProtocolUtil.h
|
||||||
${root_lib}/synergy/CScreen.h
|
${root_lib}/synergy/CScreen.h
|
||||||
${root_lib}/synergy/ClipboardTypes.h
|
${root_lib}/synergy/ClipboardTypes.h
|
||||||
${root_lib}/synergy/IClient.h
|
${root_lib}/synergy/IClient.h
|
||||||
${root_lib}/synergy/IClipboard.h
|
${root_lib}/synergy/IClipboard.h
|
||||||
${root_lib}/synergy/IKeyState.h
|
${root_lib}/synergy/IKeyState.h
|
||||||
${root_lib}/synergy/IPlatformScreen.h
|
${root_lib}/synergy/IPlatformScreen.h
|
||||||
${root_lib}/synergy/IPrimaryScreen.h
|
${root_lib}/synergy/IPrimaryScreen.h
|
||||||
${root_lib}/synergy/IScreen.h
|
${root_lib}/synergy/IScreen.h
|
||||||
${root_lib}/synergy/IScreenSaver.h
|
${root_lib}/synergy/IScreenSaver.h
|
||||||
${root_lib}/synergy/ISecondaryScreen.h
|
${root_lib}/synergy/ISecondaryScreen.h
|
||||||
${root_lib}/synergy/KeyTypes.h
|
${root_lib}/synergy/KeyTypes.h
|
||||||
${root_lib}/synergy/MouseTypes.h
|
${root_lib}/synergy/MouseTypes.h
|
||||||
${root_lib}/synergy/OptionTypes.h
|
${root_lib}/synergy/OptionTypes.h
|
||||||
${root_lib}/synergy/ProtocolTypes.h
|
${root_lib}/synergy/ProtocolTypes.h
|
||||||
${root_lib}/synergy/XScreen.h
|
${root_lib}/synergy/XScreen.h
|
||||||
${root_lib}/synergy/XSynergy.h
|
${root_lib}/synergy/XSynergy.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create default `src`, with cross-platform sources.
|
# Create default `src`, with cross-platform sources.
|
||||||
SET(src_lib
|
SET(src_lib
|
||||||
${src_lib_arch}
|
${src_lib_arch}
|
||||||
${src_lib_base}
|
${src_lib_base}
|
||||||
${src_lib_client}
|
${src_lib_client}
|
||||||
${src_lib_common}
|
${src_lib_common}
|
||||||
${src_lib_io}
|
${src_lib_io}
|
||||||
${src_lib_mt}
|
${src_lib_mt}
|
||||||
${src_lib_net}
|
${src_lib_net}
|
||||||
${src_lib_server}
|
${src_lib_server}
|
||||||
${src_lib_synergy}
|
${src_lib_synergy}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Append to `src_lib`, the platform specific sources.
|
# Append to `src_lib`, the platform specific sources.
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
LIST(APPEND src_lib ${src_lib_arch_unix})
|
LIST(APPEND src_lib ${src_lib_arch_unix})
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
LIST(APPEND src_lib
|
LIST(APPEND src_lib
|
||||||
${src_lib_platform_carbon}
|
${src_lib_platform_carbon}
|
||||||
${inc_lib_synergy_carbon}
|
${inc_lib_synergy_carbon}
|
||||||
${src_lib_synergy_carbon}
|
${src_lib_synergy_carbon}
|
||||||
)
|
)
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
LIST(APPEND src_lib
|
LIST(APPEND src_lib
|
||||||
${src_lib_platform_xwindows}
|
${src_lib_platform_xwindows}
|
||||||
${inc_lib_synergy_xwindows}
|
${inc_lib_synergy_xwindows}
|
||||||
${src_lib_synergy_xwindows}
|
${src_lib_synergy_xwindows}
|
||||||
)
|
)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
LIST(APPEND src_lib
|
LIST(APPEND src_lib
|
||||||
${inc_lib_base}
|
${inc_lib_base}
|
||||||
${inc_lib_client}
|
${inc_lib_client}
|
||||||
${inc_lib_common}
|
${inc_lib_common}
|
||||||
${inc_lib_io}
|
${inc_lib_io}
|
||||||
${inc_lib_mt}
|
${inc_lib_mt}
|
||||||
${inc_lib_net}
|
${inc_lib_net}
|
||||||
${inc_lib_server}
|
${inc_lib_server}
|
||||||
${inc_lib_synergy}
|
${inc_lib_synergy}
|
||||||
${inc_lib_arch_windows}
|
${inc_lib_arch_windows}
|
||||||
${src_lib_arch_windows}
|
${src_lib_arch_windows}
|
||||||
${inc_lib_platform_mswindows}
|
${inc_lib_platform_mswindows}
|
||||||
${src_lib_platform_mswindows}
|
${src_lib_platform_mswindows}
|
||||||
${inc_lib_synergy_mswindows}
|
${inc_lib_synergy_mswindows}
|
||||||
${src_lib_synergy_mswindows}
|
${src_lib_synergy_mswindows}
|
||||||
)
|
)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
SET(inc_lib_dirs
|
SET(inc_lib_dirs
|
||||||
{$root_dir}
|
{$root_dir}
|
||||||
{$root_dir}/lib/arch
|
{$root_dir}/lib/arch
|
||||||
{$root_dir}/lib/base
|
{$root_dir}/lib/base
|
||||||
{$root_dir}/lib/client
|
{$root_dir}/lib/client
|
||||||
{$root_dir}/lib/common
|
{$root_dir}/lib/common
|
||||||
{$root_dir}/lib/io
|
{$root_dir}/lib/io
|
||||||
{$root_dir}/lib/mt
|
{$root_dir}/lib/mt
|
||||||
{$root_dir}/lib/net
|
{$root_dir}/lib/net
|
||||||
{$root_dir}/lib/platform
|
{$root_dir}/lib/platform
|
||||||
{$root_dir}/lib/server
|
{$root_dir}/lib/server
|
||||||
{$root_dir}/lib/synergy
|
{$root_dir}/lib/synergy
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_lib_dirs})
|
INCLUDE_DIRECTORIES(${inc_lib_dirs})
|
||||||
ADD_LIBRARY(synergy STATIC ${src_lib})
|
ADD_LIBRARY(synergy STATIC ${src_lib})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ADD_LIBRARY(synrgyhk SHARED ${inc_lib_platform_hook} ${src_lib_platform_hook})
|
ADD_LIBRARY(synrgyhk SHARED ${inc_lib_platform_hook} ${src_lib_platform_hook})
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
|
@ -1,84 +1,84 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(root_cmd_synergyc ${root_dir}/cmd/synergyc)
|
SET(root_cmd_synergyc ${root_dir}/cmd/synergyc)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_common
|
SET(src_cmd_synergyc_common
|
||||||
${root_cmd_synergyc}/synergyc.cpp
|
${root_cmd_synergyc}/synergyc.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_xwindows
|
SET(src_cmd_synergyc_xwindows
|
||||||
${root_cmd_synergyc}/CXWindowsClientTaskBarReceiver.cpp
|
${root_cmd_synergyc}/CXWindowsClientTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_mswindows
|
SET(src_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.cpp
|
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_cmd_synergyc_mswindows
|
SET(inc_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.h
|
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.h
|
||||||
${root_cmd_synergyc}/resource.h
|
${root_cmd_synergyc}/resource.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(res_cmd_synergyc_mswindows
|
SET(res_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/synergyc.ico
|
${root_cmd_synergyc}/synergyc.ico
|
||||||
${root_cmd_synergyc}/synergyc.rc
|
${root_cmd_synergyc}/synergyc.rc
|
||||||
${root_cmd_synergyc}/tb_error.ico
|
${root_cmd_synergyc}/tb_error.ico
|
||||||
${root_cmd_synergyc}/tb_idle.ico
|
${root_cmd_synergyc}/tb_idle.ico
|
||||||
${root_cmd_synergyc}/tb_run.ico
|
${root_cmd_synergyc}/tb_run.ico
|
||||||
${root_cmd_synergyc}/tb_wait.ico
|
${root_cmd_synergyc}/tb_wait.ico
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_carbon
|
SET(src_cmd_synergyc_carbon
|
||||||
${root_cmd_synergyc}/COSXClientTaskBarReceiver.cpp
|
${root_cmd_synergyc}/COSXClientTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc ${src_cmd_synergyc_common})
|
SET(src_cmd_synergyc ${src_cmd_synergyc_common})
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_carbon})
|
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_carbon})
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_xwindows})
|
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_xwindows})
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
|
|
||||||
LIST(APPEND src_cmd_synergyc
|
LIST(APPEND src_cmd_synergyc
|
||||||
${inc_cmd_synergyc_mswindows}
|
${inc_cmd_synergyc_mswindows}
|
||||||
${res_cmd_synergyc_mswindows}
|
${res_cmd_synergyc_mswindows}
|
||||||
${src_cmd_synergyc_mswindows}
|
${src_cmd_synergyc_mswindows}
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
SET(inc_dirs_cmd_synergyc
|
SET(inc_dirs_cmd_synergyc
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib
|
${root_dir}/lib
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
${root_dir}/lib/base
|
${root_dir}/lib/base
|
||||||
${root_dir}/lib/client
|
${root_dir}/lib/client
|
||||||
${root_dir}/lib/common
|
${root_dir}/lib/common
|
||||||
${root_dir}/lib/io
|
${root_dir}/lib/io
|
||||||
${root_dir}/lib/mt
|
${root_dir}/lib/mt
|
||||||
${root_dir}/lib/net
|
${root_dir}/lib/net
|
||||||
${root_dir}/lib/platform
|
${root_dir}/lib/platform
|
||||||
${root_dir}/lib/synergy
|
${root_dir}/lib/synergy
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergyc})
|
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergyc})
|
||||||
ADD_EXECUTABLE(synergyc ${src_cmd_synergyc})
|
ADD_EXECUTABLE(synergyc ${src_cmd_synergyc})
|
||||||
TARGET_LINK_LIBRARIES(synergyc synergy ${libs})
|
TARGET_LINK_LIBRARIES(synergyc synergy ${libs})
|
||||||
|
|
|
@ -1,84 +1,84 @@
|
||||||
# synergy-plus -- mouse and keyboard sharing utility
|
# synergy-plus -- mouse and keyboard sharing utility
|
||||||
# Copyright (C) 2009 The Synergy+ Project
|
# Copyright (C) 2009 The Synergy+ Project
|
||||||
#
|
#
|
||||||
# This package is free software; you can redistribute it and/or
|
# This package is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# found in the file COPYING that should have accompanied this file.
|
# found in the file COPYING that should have accompanied this file.
|
||||||
#
|
#
|
||||||
# This package is distributed in the hope that it will be useful,
|
# This package is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(root_cmd_synergys ${root_dir}/cmd/synergys)
|
SET(root_cmd_synergys ${root_dir}/cmd/synergys)
|
||||||
|
|
||||||
SET(src_cmd_synergys_common
|
SET(src_cmd_synergys_common
|
||||||
${root_cmd_synergys}/synergys.cpp
|
${root_cmd_synergys}/synergys.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys_xwindows
|
SET(src_cmd_synergys_xwindows
|
||||||
${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.cpp
|
${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys_mswindows
|
SET(src_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.cpp
|
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_cmd_synergys_mswindows
|
SET(inc_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.h
|
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.h
|
||||||
${root_cmd_synergys}/resource.h
|
${root_cmd_synergys}/resource.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(res_cmd_synergys_mswindows
|
SET(res_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/synergys.ico
|
${root_cmd_synergys}/synergys.ico
|
||||||
${root_cmd_synergys}/synergys.rc
|
${root_cmd_synergys}/synergys.rc
|
||||||
${root_cmd_synergys}/tb_error.ico
|
${root_cmd_synergys}/tb_error.ico
|
||||||
${root_cmd_synergys}/tb_idle.ico
|
${root_cmd_synergys}/tb_idle.ico
|
||||||
${root_cmd_synergys}/tb_run.ico
|
${root_cmd_synergys}/tb_run.ico
|
||||||
${root_cmd_synergys}/tb_wait.ico
|
${root_cmd_synergys}/tb_wait.ico
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys_carbon
|
SET(src_cmd_synergys_carbon
|
||||||
${root_cmd_synergys}/COSXServerTaskBarReceiver.cpp
|
${root_cmd_synergys}/COSXServerTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys ${src_cmd_synergys_common})
|
SET(src_cmd_synergys ${src_cmd_synergys_common})
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_carbon})
|
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_carbon})
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_xwindows})
|
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_xwindows})
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
|
|
||||||
LIST(APPEND src_cmd_synergys
|
LIST(APPEND src_cmd_synergys
|
||||||
${inc_cmd_synergys_mswindows}
|
${inc_cmd_synergys_mswindows}
|
||||||
${res_cmd_synergys_mswindows}
|
${res_cmd_synergys_mswindows}
|
||||||
${src_cmd_synergys_mswindows}
|
${src_cmd_synergys_mswindows}
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
SET(inc_dirs_cmd_synergys
|
SET(inc_dirs_cmd_synergys
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib
|
${root_dir}/lib
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
${root_dir}/lib/base
|
${root_dir}/lib/base
|
||||||
${root_dir}/lib/common
|
${root_dir}/lib/common
|
||||||
${root_dir}/lib/io
|
${root_dir}/lib/io
|
||||||
${root_dir}/lib/mt
|
${root_dir}/lib/mt
|
||||||
${root_dir}/lib/net
|
${root_dir}/lib/net
|
||||||
${root_dir}/lib/platform
|
${root_dir}/lib/platform
|
||||||
${root_dir}/lib/synergy
|
${root_dir}/lib/synergy
|
||||||
${root_dir}/lib/server
|
${root_dir}/lib/server
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergys})
|
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergys})
|
||||||
ADD_EXECUTABLE(synergys ${src_cmd_synergys})
|
ADD_EXECUTABLE(synergys ${src_cmd_synergys})
|
||||||
TARGET_LINK_LIBRARIES(synergys synergy ${libs})
|
TARGET_LINK_LIBRARIES(synergys synergy ${libs})
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
//{{NO_DEPENDENCIES}}
|
//{{NO_DEPENDENCIES}}
|
||||||
// Microsoft Visual C++ generated include file.
|
// Microsoft Visual C++ generated include file.
|
||||||
// Used by synergys.rc
|
// Used by synergys.rc
|
||||||
//
|
//
|
||||||
#define IDS_FAILED 1
|
#define IDS_FAILED 1
|
||||||
#define IDS_INIT_FAILED 2
|
#define IDS_INIT_FAILED 2
|
||||||
#define IDS_UNCAUGHT_EXCEPTION 3
|
#define IDS_UNCAUGHT_EXCEPTION 3
|
||||||
#define IDI_SYNERGY 101
|
#define IDI_SYNERGY 101
|
||||||
#define IDI_TASKBAR_NOT_RUNNING 102
|
#define IDI_TASKBAR_NOT_RUNNING 102
|
||||||
#define IDI_TASKBAR_NOT_WORKING 103
|
#define IDI_TASKBAR_NOT_WORKING 103
|
||||||
#define IDI_TASKBAR_NOT_CONNECTED 104
|
#define IDI_TASKBAR_NOT_CONNECTED 104
|
||||||
#define IDI_TASKBAR_CONNECTED 105
|
#define IDI_TASKBAR_CONNECTED 105
|
||||||
#define IDR_TASKBAR 107
|
#define IDR_TASKBAR 107
|
||||||
#define IDD_TASKBAR_STATUS 108
|
#define IDD_TASKBAR_STATUS 108
|
||||||
#define IDC_TASKBAR_STATUS_STATUS 1000
|
#define IDC_TASKBAR_STATUS_STATUS 1000
|
||||||
#define IDC_TASKBAR_STATUS_CLIENTS 1001
|
#define IDC_TASKBAR_STATUS_CLIENTS 1001
|
||||||
#define IDC_TASKBAR_QUIT 40003
|
#define IDC_TASKBAR_QUIT 40003
|
||||||
#define IDC_TASKBAR_STATUS 40004
|
#define IDC_TASKBAR_STATUS 40004
|
||||||
#define IDC_TASKBAR_LOG 40005
|
#define IDC_TASKBAR_LOG 40005
|
||||||
#define IDC_RELOAD_CONFIG 40006
|
#define IDC_RELOAD_CONFIG 40006
|
||||||
#define IDC_FORCE_RECONNECT 40007
|
#define IDC_FORCE_RECONNECT 40007
|
||||||
#define IDC_TASKBAR_SHOW_LOG 40008
|
#define IDC_TASKBAR_SHOW_LOG 40008
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_ERROR 40009
|
#define IDC_TASKBAR_LOG_LEVEL_ERROR 40009
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_WARNING 40010
|
#define IDC_TASKBAR_LOG_LEVEL_WARNING 40010
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_NOTE 40011
|
#define IDC_TASKBAR_LOG_LEVEL_NOTE 40011
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_INFO 40012
|
#define IDC_TASKBAR_LOG_LEVEL_INFO 40012
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_DEBUG 40013
|
#define IDC_TASKBAR_LOG_LEVEL_DEBUG 40013
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_DEBUG1 40014
|
#define IDC_TASKBAR_LOG_LEVEL_DEBUG1 40014
|
||||||
#define IDC_TASKBAR_LOG_LEVEL_DEBUG2 40015
|
#define IDC_TASKBAR_LOG_LEVEL_DEBUG2 40015
|
||||||
#define ID_SYNERGY_RELOADSYSTEM 40016
|
#define ID_SYNERGY_RELOADSYSTEM 40016
|
||||||
#define ID_SYNERGY_RESETSERVER 40017
|
#define ID_SYNERGY_RESETSERVER 40017
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 109
|
#define _APS_NEXT_RESOURCE_VALUE 109
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40018
|
#define _APS_NEXT_COMMAND_VALUE 40018
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1003
|
#define _APS_NEXT_CONTROL_VALUE 1003
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
566
gui/COPYING
566
gui/COPYING
|
@ -1,283 +1,283 @@
|
||||||
QSynergy is free software and published under the following
|
QSynergy is free software and published under the following
|
||||||
license:
|
license:
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
License is intended to guarantee your freedom to share and change free
|
License is intended to guarantee your freedom to share and change free
|
||||||
software--to make sure the software is free for all its users. This
|
software--to make sure the software is free for all its users. This
|
||||||
General Public License applies to most of the Free Software
|
General Public License applies to most of the Free Software
|
||||||
Foundation's software and to any other program whose authors commit to
|
Foundation's software and to any other program whose authors commit to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
the GNU Lesser General Public License instead.) You can apply it to
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
have the freedom to distribute copies of free software (and charge for
|
have the freedom to distribute copies of free software (and charge for
|
||||||
this service if you wish), that you receive source code or can get it
|
this service if you wish), that you receive source code or can get it
|
||||||
if you want it, that you can change the software or use pieces of it
|
if you want it, that you can change the software or use pieces of it
|
||||||
in new free programs; and that you know you can do these things.
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
To protect your rights, we need to make restrictions that forbid
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
These restrictions translate to certain responsibilities for you if you
|
These restrictions translate to certain responsibilities for you if you
|
||||||
distribute copies of the software, or if you modify it.
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
For example, if you distribute copies of such a program, whether
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
you have. You must make sure that they, too, receive or can get the
|
you have. You must make sure that they, too, receive or can get the
|
||||||
source code. And you must show them these terms so they know their
|
source code. And you must show them these terms so they know their
|
||||||
rights.
|
rights.
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
distribute and/or modify the software.
|
distribute and/or modify the software.
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
Also, for each author's protection and ours, we want to make certain
|
||||||
that everyone understands that there is no warranty for this free
|
that everyone understands that there is no warranty for this free
|
||||||
software. If the software is modified by someone else and passed on, we
|
software. If the software is modified by someone else and passed on, we
|
||||||
want its recipients to know that what they have is not the original, so
|
want its recipients to know that what they have is not the original, so
|
||||||
that any problems introduced by others will not reflect on the original
|
that any problems introduced by others will not reflect on the original
|
||||||
authors' reputations.
|
authors' reputations.
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
Finally, any free program is threatened constantly by software
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
program will individually obtain patent licenses, in effect making the
|
program will individually obtain patent licenses, in effect making the
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
0. This License applies to any program or other work which contains
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
under the terms of this General Public License. The "Program", below,
|
under the terms of this General Public License. The "Program", below,
|
||||||
refers to any such program or work, and a "work based on the Program"
|
refers to any such program or work, and a "work based on the Program"
|
||||||
means either the Program or any derivative work under copyright law:
|
means either the Program or any derivative work under copyright law:
|
||||||
that is to say, a work containing the Program or a portion of it,
|
that is to say, a work containing the Program or a portion of it,
|
||||||
either verbatim or with modifications and/or translated into another
|
either verbatim or with modifications and/or translated into another
|
||||||
language. (Hereinafter, translation is included without limitation in
|
language. (Hereinafter, translation is included without limitation in
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
Activities other than copying, distribution and modification are not
|
||||||
covered by this License; they are outside its scope. The act of
|
covered by this License; they are outside its scope. The act of
|
||||||
running the Program is not restricted, and the output from the Program
|
running the Program is not restricted, and the output from the Program
|
||||||
is covered only if its contents constitute a work based on the
|
is covered only if its contents constitute a work based on the
|
||||||
Program (independent of having been made by running the Program).
|
Program (independent of having been made by running the Program).
|
||||||
Whether that is true depends on what the Program does.
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
source code as you receive it, in any medium, provided that you
|
source code as you receive it, in any medium, provided that you
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
notices that refer to this License and to the absence of any warranty;
|
notices that refer to this License and to the absence of any warranty;
|
||||||
and give any other recipients of the Program a copy of this License
|
and give any other recipients of the Program a copy of this License
|
||||||
along with the Program.
|
along with the Program.
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
of it, thus forming a work based on the Program, and copy and
|
of it, thus forming a work based on the Program, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
above, provided that you also meet all of these conditions:
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
a) You must cause the modified files to carry prominent notices
|
||||||
stating that you changed the files and the date of any change.
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
b) You must cause any work that you distribute or publish, that in
|
||||||
whole or in part contains or is derived from the Program or any
|
whole or in part contains or is derived from the Program or any
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
parties under the terms of this License.
|
parties under the terms of this License.
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
c) If the modified program normally reads commands interactively
|
||||||
when run, you must cause it, when started running for such
|
when run, you must cause it, when started running for such
|
||||||
interactive use in the most ordinary way, to print or display an
|
interactive use in the most ordinary way, to print or display an
|
||||||
announcement including an appropriate copyright notice and a
|
announcement including an appropriate copyright notice and a
|
||||||
notice that there is no warranty (or else, saying that you provide
|
notice that there is no warranty (or else, saying that you provide
|
||||||
a warranty) and that users may redistribute the program under
|
a warranty) and that users may redistribute the program under
|
||||||
these conditions, and telling the user how to view a copy of this
|
these conditions, and telling the user how to view a copy of this
|
||||||
License. (Exception: if the Program itself is interactive but
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
and can be reasonably considered independent and separate works in
|
||||||
themselves, then this License, and its terms, do not apply to those
|
themselves, then this License, and its terms, do not apply to those
|
||||||
sections when you distribute them as separate works. But when you
|
sections when you distribute them as separate works. But when you
|
||||||
distribute the same sections as part of a whole which is a work based
|
distribute the same sections as part of a whole which is a work based
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
this License, whose permissions for other licensees extend to the
|
this License, whose permissions for other licensees extend to the
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
exercise the right to control the distribution of derivative or
|
exercise the right to control the distribution of derivative or
|
||||||
collective works based on the Program.
|
collective works based on the Program.
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
In addition, mere aggregation of another work not based on the Program
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
a storage or distribution medium does not bring the other work under
|
a storage or distribution medium does not bring the other work under
|
||||||
the scope of this License.
|
the scope of this License.
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
under Section 2) in object code or executable form under the terms of
|
under Section 2) in object code or executable form under the terms of
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
source code, which must be distributed under the terms of Sections
|
source code, which must be distributed under the terms of Sections
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
b) Accompany it with a written offer, valid for at least three
|
||||||
years, to give any third party, for a charge no more than your
|
years, to give any third party, for a charge no more than your
|
||||||
cost of physically performing source distribution, a complete
|
cost of physically performing source distribution, a complete
|
||||||
machine-readable copy of the corresponding source code, to be
|
machine-readable copy of the corresponding source code, to be
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
customarily used for software interchange; or,
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
c) Accompany it with the information you received as to the offer
|
||||||
to distribute corresponding source code. (This alternative is
|
to distribute corresponding source code. (This alternative is
|
||||||
allowed only for noncommercial distribution and only if you
|
allowed only for noncommercial distribution and only if you
|
||||||
received the program in object code or executable form with such
|
received the program in object code or executable form with such
|
||||||
an offer, in accord with Subsection b above.)
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
The source code for a work means the preferred form of the work for
|
||||||
making modifications to it. For an executable work, complete source
|
making modifications to it. For an executable work, complete source
|
||||||
code means all the source code for all modules it contains, plus any
|
code means all the source code for all modules it contains, plus any
|
||||||
associated interface definition files, plus the scripts used to
|
associated interface definition files, plus the scripts used to
|
||||||
control compilation and installation of the executable. However, as a
|
control compilation and installation of the executable. However, as a
|
||||||
special exception, the source code distributed need not include
|
special exception, the source code distributed need not include
|
||||||
anything that is normally distributed (in either source or binary
|
anything that is normally distributed (in either source or binary
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
operating system on which the executable runs, unless that component
|
operating system on which the executable runs, unless that component
|
||||||
itself accompanies the executable.
|
itself accompanies the executable.
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
If distribution of executable or object code is made by offering
|
||||||
access to copy from a designated place, then offering equivalent
|
access to copy from a designated place, then offering equivalent
|
||||||
access to copy the source code from the same place counts as
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
void, and will automatically terminate your rights under this License.
|
void, and will automatically terminate your rights under this License.
|
||||||
However, parties who have received copies, or rights, from you under
|
However, parties who have received copies, or rights, from you under
|
||||||
this License will not have their licenses terminated so long as such
|
this License will not have their licenses terminated so long as such
|
||||||
parties remain in full compliance.
|
parties remain in full compliance.
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
5. You are not required to accept this License, since you have not
|
||||||
signed it. However, nothing else grants you permission to modify or
|
signed it. However, nothing else grants you permission to modify or
|
||||||
distribute the Program or its derivative works. These actions are
|
distribute the Program or its derivative works. These actions are
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
modifying or distributing the Program (or any work based on the
|
modifying or distributing the Program (or any work based on the
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
all its terms and conditions for copying, distributing or modifying
|
all its terms and conditions for copying, distributing or modifying
|
||||||
the Program or works based on it.
|
the Program or works based on it.
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
Program), the recipient automatically receives a license from the
|
Program), the recipient automatically receives a license from the
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
these terms and conditions. You may not impose any further
|
these terms and conditions. You may not impose any further
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties to
|
You are not responsible for enforcing compliance by third parties to
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot
|
excuse you from the conditions of this License. If you cannot
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
License and any other pertinent obligations, then as a consequence you
|
License and any other pertinent obligations, then as a consequence you
|
||||||
may not distribute the Program at all. For example, if a patent
|
may not distribute the Program at all. For example, if a patent
|
||||||
license would not permit royalty-free redistribution of the Program by
|
license would not permit royalty-free redistribution of the Program by
|
||||||
all those who receive copies directly or indirectly through you, then
|
all those who receive copies directly or indirectly through you, then
|
||||||
the only way you could satisfy both it and this License would be to
|
the only way you could satisfy both it and this License would be to
|
||||||
refrain entirely from distribution of the Program.
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
If any portion of this section is held invalid or unenforceable under
|
||||||
any particular circumstance, the balance of the section is intended to
|
any particular circumstance, the balance of the section is intended to
|
||||||
apply and the section as a whole is intended to apply in other
|
apply and the section as a whole is intended to apply in other
|
||||||
circumstances.
|
circumstances.
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
It is not the purpose of this section to induce you to infringe any
|
||||||
patents or other property right claims or to contest validity of any
|
patents or other property right claims or to contest validity of any
|
||||||
such claims; this section has the sole purpose of protecting the
|
such claims; this section has the sole purpose of protecting the
|
||||||
integrity of the free software distribution system, which is
|
integrity of the free software distribution system, which is
|
||||||
implemented by public license practices. Many people have made
|
implemented by public license practices. Many people have made
|
||||||
generous contributions to the wide range of software distributed
|
generous contributions to the wide range of software distributed
|
||||||
through that system in reliance on consistent application of that
|
through that system in reliance on consistent application of that
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
to distribute software through any other system and a licensee cannot
|
to distribute software through any other system and a licensee cannot
|
||||||
impose that choice.
|
impose that choice.
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
original copyright holder who places the Program under this License
|
||||||
may add an explicit geographical distribution limitation excluding
|
may add an explicit geographical distribution limitation excluding
|
||||||
those countries, so that distribution is permitted only in or among
|
those countries, so that distribution is permitted only in or among
|
||||||
countries not thus excluded. In such case, this License incorporates
|
countries not thus excluded. In such case, this License incorporates
|
||||||
the limitation as if written in the body of this License.
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
of the General Public License from time to time. Such new versions will
|
of the General Public License from time to time. Such new versions will
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the Program
|
||||||
specifies a version number of this License which applies to it and "any
|
specifies a version number of this License which applies to it and "any
|
||||||
later version", you have the option of following the terms and conditions
|
later version", you have the option of following the terms and conditions
|
||||||
either of that version or of any later version published by the Free
|
either of that version or of any later version published by the Free
|
||||||
Software Foundation. If the Program does not specify a version number of
|
Software Foundation. If the Program does not specify a version number of
|
||||||
this License, you may choose any version ever published by the Free Software
|
this License, you may choose any version ever published by the Free Software
|
||||||
Foundation.
|
Foundation.
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
programs whose distribution conditions are different, write to the author
|
programs whose distribution conditions are different, write to the author
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
of preserving the free status of all derivatives of our free software and
|
of preserving the free status of all derivatives of our free software and
|
||||||
of promoting the sharing and reuse of software generally.
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
REPAIR OR CORRECTION.
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
194
gui/README
194
gui/README
|
@ -1,97 +1,97 @@
|
||||||
QSynergy
|
QSynergy
|
||||||
========
|
========
|
||||||
|
|
||||||
Version 0.9.0
|
Version 0.9.0
|
||||||
http://www.volker-lanz.de/en/software/qsynergy/
|
http://www.volker-lanz.de/en/software/qsynergy/
|
||||||
|
|
||||||
|
|
||||||
About QSynergy
|
About QSynergy
|
||||||
--------------
|
--------------
|
||||||
QSynergy is a graphical front end for Synergy. Synergy lets a user control more
|
QSynergy is a graphical front end for Synergy. Synergy lets a user control more
|
||||||
than one computer with a single mouse and keyboard (and has lots and lots of
|
than one computer with a single mouse and keyboard (and has lots and lots of
|
||||||
extra features on top of that). Learn more about Synergy itself or get it from:
|
extra features on top of that). Learn more about Synergy itself or get it from:
|
||||||
http://synergy2.sourceforge.net
|
http://synergy2.sourceforge.net
|
||||||
|
|
||||||
Synergy only has a GUI for MS Windows. QSynergy was written to step in and fill
|
Synergy only has a GUI for MS Windows. QSynergy was written to step in and fill
|
||||||
this gap for users on Mac and Unix platforms. Of course, QSynergy can also be
|
this gap for users on Mac and Unix platforms. Of course, QSynergy can also be
|
||||||
used on MS Windows.
|
used on MS Windows.
|
||||||
|
|
||||||
|
|
||||||
Running and using QSynergy
|
Running and using QSynergy
|
||||||
--------------------------
|
--------------------------
|
||||||
- Because QSynergy is a graphical frontend for Synergy, it does not make much
|
- Because QSynergy is a graphical frontend for Synergy, it does not make much
|
||||||
sense to run it without having Synergy installed. So if you have not done so
|
sense to run it without having Synergy installed. So if you have not done so
|
||||||
already, get it from http://synergy2.sourceforge.net and install it.
|
already, get it from http://synergy2.sourceforge.net and install it.
|
||||||
|
|
||||||
- See the Synergy documentation (http://synergy2.sourceforge.net/) for all
|
- See the Synergy documentation (http://synergy2.sourceforge.net/) for all
|
||||||
topics concerning what you can do with Synergy.
|
topics concerning what you can do with Synergy.
|
||||||
|
|
||||||
- In QSynergy, first, go to Edit -> Settings and check if the path names for
|
- In QSynergy, first, go to Edit -> Settings and check if the path names for
|
||||||
synergys (the Synergy server binary) and synergyc (the client) are correct.
|
synergys (the Synergy server binary) and synergyc (the client) are correct.
|
||||||
If they are not, set them by hand or browse to their locations.
|
If they are not, set them by hand or browse to their locations.
|
||||||
|
|
||||||
- QSynergy knows three modes:
|
- QSynergy knows three modes:
|
||||||
|
|
||||||
1. Run Synergy as a client (so the computer QSynergy runs on will be
|
1. Run Synergy as a client (so the computer QSynergy runs on will be
|
||||||
controlled from another computer).
|
controlled from another computer).
|
||||||
|
|
||||||
2. Run Synergy as a server with an existing configuration you have written
|
2. Run Synergy as a server with an existing configuration you have written
|
||||||
already (that's just like running Synergy from the command line with the "-c"
|
already (that's just like running Synergy from the command line with the "-c"
|
||||||
option).
|
option).
|
||||||
|
|
||||||
3. Interactively and graphically create a server configuration and run
|
3. Interactively and graphically create a server configuration and run
|
||||||
Synergy with this configuration. Herein lies the main benefit of using
|
Synergy with this configuration. Herein lies the main benefit of using
|
||||||
QSynergy instead of the command line Synergy version for Unix and Mac.
|
QSynergy instead of the command line Synergy version for Unix and Mac.
|
||||||
|
|
||||||
- Running as a client: Simply tick the "be a client" checkbox, enter the name
|
- Running as a client: Simply tick the "be a client" checkbox, enter the name
|
||||||
of the computer to connect to and push the "Start" button.
|
of the computer to connect to and push the "Start" button.
|
||||||
|
|
||||||
- Running as a server with an existing configuration: Tick the "be a server"
|
- Running as a server with an existing configuration: Tick the "be a server"
|
||||||
checkbox and the radio button that says you would like to use your own
|
checkbox and the radio button that says you would like to use your own
|
||||||
configuration file. Then enter the path to this configuration file (or browse
|
configuration file. Then enter the path to this configuration file (or browse
|
||||||
for it). Finally, push the "Start" button.
|
for it). Finally, push the "Start" button.
|
||||||
|
|
||||||
- Using QSynergy to configure the Synergy server: Tick the "be a server"
|
- Using QSynergy to configure the Synergy server: Tick the "be a server"
|
||||||
checkbox and the radio button that says you would like to interactively
|
checkbox and the radio button that says you would like to interactively
|
||||||
configure Synergy. Then push the "Configure server" button. After you have
|
configure Synergy. Then push the "Configure server" button. After you have
|
||||||
finished setting up your configuration, push the "Start" button. QSynergy
|
finished setting up your configuration, push the "Start" button. QSynergy
|
||||||
will remember your configuration across restarts, so there is no need to
|
will remember your configuration across restarts, so there is no need to
|
||||||
configure again the next time you run QSynergy -- unless you change your
|
configure again the next time you run QSynergy -- unless you change your
|
||||||
computer setup, of course.
|
computer setup, of course.
|
||||||
|
|
||||||
- On MS Windows and X11, QSynergy will minimize to the tray if you close the
|
- On MS Windows and X11, QSynergy will minimize to the tray if you close the
|
||||||
main window or pick the Window -> Minimize menu entry. Double click on the
|
main window or pick the Window -> Minimize menu entry. Double click on the
|
||||||
icon in the tray or right click on this icon and pick Restore to restore the
|
icon in the tray or right click on this icon and pick Restore to restore the
|
||||||
window.
|
window.
|
||||||
|
|
||||||
- On X11, QSynergy will be restarted with X11 if your X11 server correctly
|
- On X11, QSynergy will be restarted with X11 if your X11 server correctly
|
||||||
implements session handling. On MS Windows, you will have to add QSynergy to
|
implements session handling. On MS Windows, you will have to add QSynergy to
|
||||||
your Autostart folder. On the Mac, set it to automatically run when the
|
your Autostart folder. On the Mac, set it to automatically run when the
|
||||||
Finder starts.
|
Finder starts.
|
||||||
|
|
||||||
|
|
||||||
Known bugs and limitations
|
Known bugs and limitations
|
||||||
--------------------------
|
--------------------------
|
||||||
- It is not possible to configure partial links (e.g., only 50% of a screen's
|
- It is not possible to configure partial links (e.g., only 50% of a screen's
|
||||||
edge linking to another screen)
|
edge linking to another screen)
|
||||||
|
|
||||||
- If you configure a hotkey for a specific screen and later delete this screen,
|
- If you configure a hotkey for a specific screen and later delete this screen,
|
||||||
QSynergy does not warn you that this will lead to an invalid configuration.
|
QSynergy does not warn you that this will lead to an invalid configuration.
|
||||||
|
|
||||||
- Importing existing synery server configuration files is not possible.
|
- Importing existing synery server configuration files is not possible.
|
||||||
|
|
||||||
- There is no true communication channel between Synergy itself and QSynergy.
|
- There is no true communication channel between Synergy itself and QSynergy.
|
||||||
This means that QSynergy cannot really know if Synergy itself is working or
|
This means that QSynergy cannot really know if Synergy itself is working or
|
||||||
has encountered any problems. QSynergy only knows "Synergy is running" or
|
has encountered any problems. QSynergy only knows "Synergy is running" or
|
||||||
"Synergy has quit with an error".
|
"Synergy has quit with an error".
|
||||||
|
|
||||||
- Mac OS X only: The look and feel of QSynergy is not quite right for the
|
- Mac OS X only: The look and feel of QSynergy is not quite right for the
|
||||||
platform. This is due to limitations in Qt.
|
platform. This is due to limitations in Qt.
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
QSynergy is written using the Qt Toolkit. It is free software released under
|
QSynergy is written using the Qt Toolkit. It is free software released under
|
||||||
the GPLv2.
|
the GPLv2.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,148 +1,148 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "WindowsServices.h"
|
#include "WindowsServices.h"
|
||||||
#include "AppConfig.h"
|
#include "AppConfig.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "LogDialog.h"
|
#include "LogDialog.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
WindowsServices::WindowsServices(QWidget* parent, AppConfig& appConfig) :
|
WindowsServices::WindowsServices(QWidget* parent, AppConfig& appConfig) :
|
||||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||||
Ui::WindowsServicesBase(),
|
Ui::WindowsServicesBase(),
|
||||||
m_appConfig(appConfig),
|
m_appConfig(appConfig),
|
||||||
m_log(new LogDialog(this, process()))
|
m_log(new LogDialog(this, process()))
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsServices::runProc(const QString& app, const QStringList& args, QPushButton* button)
|
void WindowsServices::runProc(const QString& app, const QStringList& args, QPushButton* button)
|
||||||
{
|
{
|
||||||
// disable until we know we've finished
|
// disable until we know we've finished
|
||||||
button->setEnabled(false);
|
button->setEnabled(false);
|
||||||
|
|
||||||
// clear contents so user doesn't get confused by previous messages
|
// clear contents so user doesn't get confused by previous messages
|
||||||
m_log->clear();
|
m_log->clear();
|
||||||
|
|
||||||
// deleted at end of function
|
// deleted at end of function
|
||||||
QProcess proc(this);
|
QProcess proc(this);
|
||||||
m_process = &proc;
|
m_process = &proc;
|
||||||
|
|
||||||
// send output to log window
|
// send output to log window
|
||||||
connect(m_process, SIGNAL(readyReadStandardOutput()), m_log, SLOT(readSynergyOutput()));
|
connect(m_process, SIGNAL(readyReadStandardOutput()), m_log, SLOT(readSynergyOutput()));
|
||||||
connect(m_process, SIGNAL(readyReadStandardError()), m_log, SLOT(readSynergyOutput()));
|
connect(m_process, SIGNAL(readyReadStandardError()), m_log, SLOT(readSynergyOutput()));
|
||||||
|
|
||||||
m_process->start(app, args);
|
m_process->start(app, args);
|
||||||
m_log->show();
|
m_log->show();
|
||||||
|
|
||||||
// service management should be instant
|
// service management should be instant
|
||||||
m_process->waitForFinished();
|
m_process->waitForFinished();
|
||||||
|
|
||||||
if (m_process->exitCode() == 0)
|
if (m_process->exitCode() == 0)
|
||||||
{
|
{
|
||||||
QMessageBox::information(m_log, "Service manager", "Completed successfully.");
|
QMessageBox::information(m_log, "Service manager", "Completed successfully.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QMessageBox::critical(
|
QMessageBox::critical(
|
||||||
m_log, "Service manager error",
|
m_log, "Service manager error",
|
||||||
QString("Unable to install or uninstall service. Error code: " +
|
QString("Unable to install or uninstall service. Error code: " +
|
||||||
QString::number(m_process->exitCode())));
|
QString::number(m_process->exitCode())));
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect(m_process, SIGNAL(readyReadStandardOutput()), m_log, SLOT(readSynergyOutput()));
|
disconnect(m_process, SIGNAL(readyReadStandardOutput()), m_log, SLOT(readSynergyOutput()));
|
||||||
disconnect(m_process, SIGNAL(readyReadStandardError()), m_log, SLOT(readSynergyOutput()));
|
disconnect(m_process, SIGNAL(readyReadStandardError()), m_log, SLOT(readSynergyOutput()));
|
||||||
|
|
||||||
button->setEnabled(true);
|
button->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsServices::on_m_pInstallServer_clicked()
|
void WindowsServices::on_m_pInstallServer_clicked()
|
||||||
{
|
{
|
||||||
QString app = mainWindow()->appPath(
|
QString app = mainWindow()->appPath(
|
||||||
appConfig().synergysName(), appConfig().synergys());
|
appConfig().synergysName(), appConfig().synergys());
|
||||||
|
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args <<
|
args <<
|
||||||
"--service" << "install" <<
|
"--service" << "install" <<
|
||||||
"--relaunch" <<
|
"--relaunch" <<
|
||||||
"--debug" << appConfig().logLevelText() <<
|
"--debug" << appConfig().logLevelText() <<
|
||||||
"-c" << mainWindow()->configFilename() <<
|
"-c" << mainWindow()->configFilename() <<
|
||||||
"--address" << mainWindow()->address();
|
"--address" << mainWindow()->address();
|
||||||
|
|
||||||
if (appConfig().logToFile())
|
if (appConfig().logToFile())
|
||||||
{
|
{
|
||||||
appConfig().persistLogDir();
|
appConfig().persistLogDir();
|
||||||
args << "--log" << appConfig().logFilename();
|
args << "--log" << appConfig().logFilename();
|
||||||
}
|
}
|
||||||
|
|
||||||
runProc(app, args, m_pInstallServer);
|
runProc(app, args, m_pInstallServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsServices::on_m_pUninstallServer_clicked()
|
void WindowsServices::on_m_pUninstallServer_clicked()
|
||||||
{
|
{
|
||||||
QString app = mainWindow()->appPath(
|
QString app = mainWindow()->appPath(
|
||||||
appConfig().synergysName(), appConfig().synergys());
|
appConfig().synergysName(), appConfig().synergys());
|
||||||
|
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args << "--service" << "uninstall";
|
args << "--service" << "uninstall";
|
||||||
runProc(app, args, m_pInstallServer);
|
runProc(app, args, m_pInstallServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsServices::on_m_pInstallClient_clicked()
|
void WindowsServices::on_m_pInstallClient_clicked()
|
||||||
{
|
{
|
||||||
if (mainWindow()->hostname().isEmpty())
|
if (mainWindow()->hostname().isEmpty())
|
||||||
{
|
{
|
||||||
QMessageBox::critical(
|
QMessageBox::critical(
|
||||||
this, "Service manager error", "Hostname was not specified on main screen.");
|
this, "Service manager error", "Hostname was not specified on main screen.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString app = mainWindow()->appPath(
|
QString app = mainWindow()->appPath(
|
||||||
appConfig().synergycName(), appConfig().synergyc());
|
appConfig().synergycName(), appConfig().synergyc());
|
||||||
|
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args <<
|
args <<
|
||||||
"--service" << "install" <<
|
"--service" << "install" <<
|
||||||
"--relaunch" <<
|
"--relaunch" <<
|
||||||
"--debug" << appConfig().logLevelText();
|
"--debug" << appConfig().logLevelText();
|
||||||
|
|
||||||
if (appConfig().logToFile())
|
if (appConfig().logToFile())
|
||||||
{
|
{
|
||||||
appConfig().persistLogDir();
|
appConfig().persistLogDir();
|
||||||
args << "--log" << appConfig().logFilename();
|
args << "--log" << appConfig().logFilename();
|
||||||
}
|
}
|
||||||
|
|
||||||
// hostname must come last to be a valid arg
|
// hostname must come last to be a valid arg
|
||||||
args << mainWindow()->hostname();
|
args << mainWindow()->hostname();
|
||||||
|
|
||||||
runProc(app, args, m_pInstallServer);
|
runProc(app, args, m_pInstallServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowsServices::on_m_pUninstallClient_clicked()
|
void WindowsServices::on_m_pUninstallClient_clicked()
|
||||||
{
|
{
|
||||||
QString app = mainWindow()->appPath(
|
QString app = mainWindow()->appPath(
|
||||||
appConfig().synergycName(), appConfig().synergyc());
|
appConfig().synergycName(), appConfig().synergyc());
|
||||||
|
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args << "--service" << "uninstall";
|
args << "--service" << "uninstall";
|
||||||
runProc(app, args, m_pInstallServer);
|
runProc(app, args, m_pInstallServer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,59 +1,59 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef WINDOWSSERVICES_H
|
#ifndef WINDOWSSERVICES_H
|
||||||
#define WINDOWSSERVICES_H
|
#define WINDOWSSERVICES_H
|
||||||
|
|
||||||
#include "ui_WindowsServicesBase.h"
|
#include "ui_WindowsServicesBase.h"
|
||||||
|
|
||||||
class QWidget;
|
class QWidget;
|
||||||
class QProcess;
|
class QProcess;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QProcess;
|
class QProcess;
|
||||||
|
|
||||||
class AppConfig;
|
class AppConfig;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class LogDialog;
|
class LogDialog;
|
||||||
|
|
||||||
class WindowsServices : public QDialog, public Ui::WindowsServicesBase
|
class WindowsServices : public QDialog, public Ui::WindowsServicesBase
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WindowsServices(QWidget* parent, AppConfig& appConfig);
|
WindowsServices(QWidget* parent, AppConfig& appConfig);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AppConfig &appConfig() const { return m_appConfig; }
|
AppConfig &appConfig() const { return m_appConfig; }
|
||||||
MainWindow* mainWindow() const { return (MainWindow*)parent(); }
|
MainWindow* mainWindow() const { return (MainWindow*)parent(); }
|
||||||
QProcess*& process() { return m_process; }
|
QProcess*& process() { return m_process; }
|
||||||
void runProc(const QString& app, const QStringList& args, QPushButton* button);
|
void runProc(const QString& app, const QStringList& args, QPushButton* button);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_app;
|
QString m_app;
|
||||||
AppConfig &m_appConfig;
|
AppConfig &m_appConfig;
|
||||||
QProcess* m_process;
|
QProcess* m_process;
|
||||||
LogDialog* m_log;
|
LogDialog* m_log;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_m_pUninstallClient_clicked();
|
void on_m_pUninstallClient_clicked();
|
||||||
void on_m_pInstallClient_clicked();
|
void on_m_pInstallClient_clicked();
|
||||||
void on_m_pUninstallServer_clicked();
|
void on_m_pUninstallServer_clicked();
|
||||||
void on_m_pInstallServer_clicked();
|
void on_m_pInstallServer_clicked();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WINDOWSSERVICES_H
|
#endif // WINDOWSSERVICES_H
|
||||||
|
|
|
@ -189,12 +189,12 @@ public:
|
||||||
// IArchAppUtil overrides
|
// IArchAppUtil overrides
|
||||||
virtual bool parseArg(const int& argc, const char* const* argv, int& i);
|
virtual bool parseArg(const int& argc, const char* const* argv, int& i);
|
||||||
virtual void adoptApp(CApp* app);
|
virtual void adoptApp(CApp* app);
|
||||||
virtual CApp& app() const;
|
virtual CApp& app() const;
|
||||||
virtual int run(int argc, char** argv);
|
virtual int run(int argc, char** argv);
|
||||||
virtual void beforeAppExit();
|
virtual void beforeAppExit();
|
||||||
|
|
||||||
// expose util so we don't need to re-implement all the functions
|
// expose util so we don't need to re-implement all the functions
|
||||||
IArchAppUtil& util() const { return *m_appUtil; }
|
IArchAppUtil& util() const { return *m_appUtil; }
|
||||||
IArchDaemon& daemon() const { return *m_daemon; }
|
IArchDaemon& daemon() const { return *m_daemon; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1,60 +1,60 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CArchAppUtil.h"
|
#include "CArchAppUtil.h"
|
||||||
#include "CApp.h"
|
#include "CApp.h"
|
||||||
|
|
||||||
CArchAppUtil* CArchAppUtil::s_instance = nullptr;
|
|
||||||
|
|
||||||
CArchAppUtil::CArchAppUtil() :
|
|
||||||
m_app(nullptr)
|
|
||||||
{
|
|
||||||
s_instance = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
CArchAppUtil::~CArchAppUtil()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
CArchAppUtil* CArchAppUtil::s_instance = nullptr;
|
||||||
CArchAppUtil::parseArg(const int& argc, const char* const* argv, int& i)
|
|
||||||
{
|
CArchAppUtil::CArchAppUtil() :
|
||||||
// no common platform args (yet)
|
m_app(nullptr)
|
||||||
return false;
|
{
|
||||||
}
|
s_instance = this;
|
||||||
|
}
|
||||||
void
|
|
||||||
CArchAppUtil::adoptApp(CApp* app)
|
CArchAppUtil::~CArchAppUtil()
|
||||||
{
|
{
|
||||||
app->m_bye = &exitAppStatic;
|
}
|
||||||
m_app = app;
|
|
||||||
}
|
bool
|
||||||
|
CArchAppUtil::parseArg(const int& argc, const char* const* argv, int& i)
|
||||||
CApp&
|
{
|
||||||
CArchAppUtil::app() const
|
// no common platform args (yet)
|
||||||
{
|
return false;
|
||||||
assert(m_app != nullptr);
|
}
|
||||||
return *m_app;
|
|
||||||
}
|
void
|
||||||
|
CArchAppUtil::adoptApp(CApp* app)
|
||||||
CArchAppUtil&
|
{
|
||||||
CArchAppUtil::instance()
|
app->m_bye = &exitAppStatic;
|
||||||
{
|
m_app = app;
|
||||||
assert(s_instance != nullptr);
|
}
|
||||||
return *s_instance;
|
|
||||||
}
|
CApp&
|
||||||
|
CArchAppUtil::app() const
|
||||||
|
{
|
||||||
|
assert(m_app != nullptr);
|
||||||
|
return *m_app;
|
||||||
|
}
|
||||||
|
|
||||||
|
CArchAppUtil&
|
||||||
|
CArchAppUtil::instance()
|
||||||
|
{
|
||||||
|
assert(s_instance != nullptr);
|
||||||
|
return *s_instance;
|
||||||
|
}
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "IArchAppUtil.h"
|
#include "IArchAppUtil.h"
|
||||||
#include "XSynergy.h"
|
#include "XSynergy.h"
|
||||||
|
|
||||||
class CArchAppUtil : public IArchAppUtil {
|
class CArchAppUtil : public IArchAppUtil {
|
||||||
public:
|
public:
|
||||||
CArchAppUtil();
|
CArchAppUtil();
|
||||||
virtual ~CArchAppUtil();
|
virtual ~CArchAppUtil();
|
||||||
|
|
||||||
virtual bool parseArg(const int& argc, const char* const* argv, int& i);
|
virtual bool parseArg(const int& argc, const char* const* argv, int& i);
|
||||||
virtual void adoptApp(CApp* app);
|
virtual void adoptApp(CApp* app);
|
||||||
CApp& app() const;
|
CApp& app() const;
|
||||||
virtual void exitApp(int code) { throw XExitApp(code); }
|
virtual void exitApp(int code) { throw XExitApp(code); }
|
||||||
|
|
||||||
static CArchAppUtil& instance();
|
static CArchAppUtil& instance();
|
||||||
static void exitAppStatic(int code) { instance().exitApp(code); }
|
static void exitAppStatic(int code) { instance().exitApp(code); }
|
||||||
virtual void beforeAppExit() {}
|
virtual void beforeAppExit() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CApp* m_app;
|
CApp* m_app;
|
||||||
static CArchAppUtil* s_instance;
|
static CArchAppUtil* s_instance;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,57 +1,57 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CArchAppUtilUnix.h"
|
#include "CArchAppUtilUnix.h"
|
||||||
|
|
||||||
CArchAppUtilUnix::CArchAppUtilUnix()
|
CArchAppUtilUnix::CArchAppUtilUnix()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CArchAppUtilUnix::~CArchAppUtilUnix()
|
CArchAppUtilUnix::~CArchAppUtilUnix()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CArchAppUtilUnix::parseArg(const int& argc, const char* const* argv, int& i)
|
CArchAppUtilUnix::parseArg(const int& argc, const char* const* argv, int& i)
|
||||||
{
|
{
|
||||||
#if WINAPI_XWINDOWS
|
#if WINAPI_XWINDOWS
|
||||||
if (app().isArg(i, argc, argv, "-display", "--display", 1)) {
|
if (app().isArg(i, argc, argv, "-display", "--display", 1)) {
|
||||||
// use alternative display
|
// use alternative display
|
||||||
app().argsBase().m_display = argv[++i];
|
app().argsBase().m_display = argv[++i];
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
// option not supported here
|
// option not supported here
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
// no options for carbon
|
// no options for carbon
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
standardStartupStatic(int argc, char** argv)
|
standardStartupStatic(int argc, char** argv)
|
||||||
{
|
{
|
||||||
return CArchAppUtil::instance().app().standardStartup(argc, argv);
|
return CArchAppUtil::instance().app().standardStartup(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CArchAppUtilUnix::run(int argc, char** argv)
|
CArchAppUtilUnix::run(int argc, char** argv)
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CArchAppUtil.h"
|
#include "CArchAppUtil.h"
|
||||||
|
|
||||||
#define ARCH_APPUTIL CArchAppUtilUnix
|
#define ARCH_APPUTIL CArchAppUtilUnix
|
||||||
|
|
||||||
class CArchAppUtilUnix : public CArchAppUtil {
|
class CArchAppUtilUnix : public CArchAppUtil {
|
||||||
public:
|
public:
|
||||||
CArchAppUtilUnix();
|
CArchAppUtilUnix();
|
||||||
virtual ~CArchAppUtilUnix();
|
virtual ~CArchAppUtilUnix();
|
||||||
|
|
||||||
bool parseArg(const int& argc, const char* const* argv, int& i);
|
bool parseArg(const int& argc, const char* const* argv, int& i);
|
||||||
int run(int argc, char** argv);
|
int run(int argc, char** argv);
|
||||||
void startNode();
|
void startNode();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,338 +1,338 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CArchAppUtilWindows.h"
|
#include "CArchAppUtilWindows.h"
|
||||||
#include "Version.h"
|
#include "Version.h"
|
||||||
#include "CLog.h"
|
#include "CLog.h"
|
||||||
#include "XArchWindows.h"
|
#include "XArchWindows.h"
|
||||||
#include "CArchMiscWindows.h"
|
#include "CArchMiscWindows.h"
|
||||||
#include "CApp.h"
|
#include "CApp.h"
|
||||||
#include "LogOutputters.h"
|
#include "LogOutputters.h"
|
||||||
#include "CMSWindowsScreen.h"
|
#include "CMSWindowsScreen.h"
|
||||||
#include "XSynergy.h"
|
#include "XSynergy.h"
|
||||||
#include "IArchTaskBarReceiver.h"
|
#include "IArchTaskBarReceiver.h"
|
||||||
#include "CMSWindowsRelauncher.h"
|
#include "CMSWindowsRelauncher.h"
|
||||||
#include "CScreen.h"
|
#include "CScreen.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
|
|
||||||
CArchAppUtilWindows::CArchAppUtilWindows() :
|
CArchAppUtilWindows::CArchAppUtilWindows() :
|
||||||
m_exitMode(kExitModeNormal)
|
m_exitMode(kExitModeNormal)
|
||||||
{
|
{
|
||||||
if (SetConsoleCtrlHandler((PHANDLER_ROUTINE)consoleHandler, TRUE) == FALSE)
|
if (SetConsoleCtrlHandler((PHANDLER_ROUTINE)consoleHandler, TRUE) == FALSE)
|
||||||
{
|
{
|
||||||
throw XArchEvalWindows();
|
throw XArchEvalWindows();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CArchAppUtilWindows::~CArchAppUtilWindows()
|
CArchAppUtilWindows::~CArchAppUtilWindows()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI CArchAppUtilWindows::consoleHandler(DWORD CEvent)
|
BOOL WINAPI CArchAppUtilWindows::consoleHandler(DWORD CEvent)
|
||||||
{
|
{
|
||||||
if (instance().app().m_taskBarReceiver)
|
if (instance().app().m_taskBarReceiver)
|
||||||
{
|
{
|
||||||
// HACK: it would be nice to delete the s_taskBarReceiver object, but
|
// HACK: it would be nice to delete the s_taskBarReceiver object, but
|
||||||
// this is best done by the CApp destructor; however i don't feel like
|
// this is best done by the CApp destructor; however i don't feel like
|
||||||
// opening up that can of worms today... i need sleep.
|
// opening up that can of worms today... i need sleep.
|
||||||
instance().app().m_taskBarReceiver->cleanup();
|
instance().app().m_taskBarReceiver->cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExitProcess(kExitTerminated);
|
ExitProcess(kExitTerminated);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CArchAppUtilWindows::parseArg(const int& argc, const char* const* argv, int& i)
|
CArchAppUtilWindows::parseArg(const int& argc, const char* const* argv, int& i)
|
||||||
{
|
{
|
||||||
if (app().isArg(i, argc, argv, NULL, "--service")) {
|
if (app().isArg(i, argc, argv, NULL, "--service")) {
|
||||||
|
|
||||||
const char* action = argv[++i];
|
const char* action = argv[++i];
|
||||||
|
|
||||||
if (_stricmp(action, "install") == 0) {
|
if (_stricmp(action, "install") == 0) {
|
||||||
installService();
|
installService();
|
||||||
}
|
}
|
||||||
else if (_stricmp(action, "uninstall") == 0) {
|
else if (_stricmp(action, "uninstall") == 0) {
|
||||||
uninstallService();
|
uninstallService();
|
||||||
}
|
}
|
||||||
else if (_stricmp(action, "start") == 0) {
|
else if (_stricmp(action, "start") == 0) {
|
||||||
startService();
|
startService();
|
||||||
}
|
}
|
||||||
else if (_stricmp(action, "stop") == 0) {
|
else if (_stricmp(action, "stop") == 0) {
|
||||||
stopService();
|
stopService();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG((CLOG_ERR "unknown service action: %s", action));
|
LOG((CLOG_ERR "unknown service action: %s", action));
|
||||||
app().m_bye(kExitArgs);
|
app().m_bye(kExitArgs);
|
||||||
}
|
}
|
||||||
app().m_bye(kExitSuccess);
|
app().m_bye(kExitSuccess);
|
||||||
}
|
}
|
||||||
else if (app().isArg(i, argc, argv, NULL, "--debug-service-wait")) {
|
else if (app().isArg(i, argc, argv, NULL, "--debug-service-wait")) {
|
||||||
|
|
||||||
app().argsBase().m_debugServiceWait = true;
|
app().argsBase().m_debugServiceWait = true;
|
||||||
}
|
}
|
||||||
else if (app().isArg(i, argc, argv, NULL, "--relaunch")) {
|
else if (app().isArg(i, argc, argv, NULL, "--relaunch")) {
|
||||||
|
|
||||||
app().argsBase().m_relaunchMode = true;
|
app().argsBase().m_relaunchMode = true;
|
||||||
}
|
}
|
||||||
else if (app().isArg(i, argc, argv, NULL, "--exit-pause")) {
|
else if (app().isArg(i, argc, argv, NULL, "--exit-pause")) {
|
||||||
|
|
||||||
app().argsBase().m_pauseOnExit = true;
|
app().argsBase().m_pauseOnExit = true;
|
||||||
}
|
}
|
||||||
else if (app().isArg(i, argc, argv, NULL, "--no-tray")) {
|
else if (app().isArg(i, argc, argv, NULL, "--no-tray")) {
|
||||||
|
|
||||||
app().argsBase().m_disableTray = true;
|
app().argsBase().m_disableTray = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// option not supported here
|
// option not supported here
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString
|
CString
|
||||||
CArchAppUtilWindows::getServiceArgs() const
|
CArchAppUtilWindows::getServiceArgs() const
|
||||||
{
|
{
|
||||||
std::stringstream argBuf;
|
std::stringstream argBuf;
|
||||||
for (int i = 1; i < __argc; i++) {
|
for (int i = 1; i < __argc; i++) {
|
||||||
const char* arg = __argv[i];
|
const char* arg = __argv[i];
|
||||||
|
|
||||||
// ignore service setup args
|
// ignore service setup args
|
||||||
if (_stricmp(arg, "--service") == 0) {
|
if (_stricmp(arg, "--service") == 0) {
|
||||||
// ignore and skip the next arg also (service action)
|
// ignore and skip the next arg also (service action)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (strchr(arg, ' ') != NULL) {
|
if (strchr(arg, ' ') != NULL) {
|
||||||
// surround argument with quotes if it contains a space
|
// surround argument with quotes if it contains a space
|
||||||
argBuf << " \"" << arg << "\"";
|
argBuf << " \"" << arg << "\"";
|
||||||
} else {
|
} else {
|
||||||
argBuf << " " << arg;
|
argBuf << " " << arg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return argBuf.str();
|
return argBuf.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::installService()
|
CArchAppUtilWindows::installService()
|
||||||
{
|
{
|
||||||
CString args = getServiceArgs();
|
CString args = getServiceArgs();
|
||||||
|
|
||||||
// get the path of this program
|
// get the path of this program
|
||||||
char thisPath[MAX_PATH];
|
char thisPath[MAX_PATH];
|
||||||
GetModuleFileName(CArchMiscWindows::instanceWin32(), thisPath, MAX_PATH);
|
GetModuleFileName(CArchMiscWindows::instanceWin32(), thisPath, MAX_PATH);
|
||||||
|
|
||||||
ARCH->installDaemon(
|
ARCH->installDaemon(
|
||||||
app().daemonName(), app().daemonInfo(),
|
app().daemonName(), app().daemonInfo(),
|
||||||
thisPath, args.c_str(), NULL, true);
|
thisPath, args.c_str(), NULL, true);
|
||||||
|
|
||||||
LOG((CLOG_INFO "service '%s' installed with args: %s",
|
LOG((CLOG_INFO "service '%s' installed with args: %s",
|
||||||
app().daemonName(), args != "" ? args.c_str() : "none" ));
|
app().daemonName(), args != "" ? args.c_str() : "none" ));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::uninstallService()
|
CArchAppUtilWindows::uninstallService()
|
||||||
{
|
{
|
||||||
ARCH->uninstallDaemon(app().daemonName(), true);
|
ARCH->uninstallDaemon(app().daemonName(), true);
|
||||||
LOG((CLOG_INFO "service '%s' uninstalled", app().daemonName()));
|
LOG((CLOG_INFO "service '%s' uninstalled", app().daemonName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::startService()
|
CArchAppUtilWindows::startService()
|
||||||
{
|
{
|
||||||
// open service manager
|
// open service manager
|
||||||
SC_HANDLE mgr = OpenSCManager(NULL, NULL, GENERIC_READ);
|
SC_HANDLE mgr = OpenSCManager(NULL, NULL, GENERIC_READ);
|
||||||
if (mgr == NULL) {
|
if (mgr == NULL) {
|
||||||
throw XArchDaemonFailed(new XArchEvalWindows());
|
throw XArchDaemonFailed(new XArchEvalWindows());
|
||||||
}
|
}
|
||||||
|
|
||||||
// open the service
|
// open the service
|
||||||
SC_HANDLE service = OpenService(
|
SC_HANDLE service = OpenService(
|
||||||
mgr, app().daemonName(), SERVICE_START);
|
mgr, app().daemonName(), SERVICE_START);
|
||||||
|
|
||||||
if (service == NULL) {
|
if (service == NULL) {
|
||||||
CloseServiceHandle(mgr);
|
CloseServiceHandle(mgr);
|
||||||
throw XArchDaemonFailed(new XArchEvalWindows());
|
throw XArchDaemonFailed(new XArchEvalWindows());
|
||||||
}
|
}
|
||||||
|
|
||||||
// start the service
|
// start the service
|
||||||
if (StartService(service, 0, NULL)) {
|
if (StartService(service, 0, NULL)) {
|
||||||
LOG((CLOG_INFO "service '%s' started", app().daemonName()));
|
LOG((CLOG_INFO "service '%s' started", app().daemonName()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw XArchDaemonFailed(new XArchEvalWindows());
|
throw XArchDaemonFailed(new XArchEvalWindows());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::stopService()
|
CArchAppUtilWindows::stopService()
|
||||||
{
|
{
|
||||||
// open service manager
|
// open service manager
|
||||||
SC_HANDLE mgr = OpenSCManager(NULL, NULL, GENERIC_READ);
|
SC_HANDLE mgr = OpenSCManager(NULL, NULL, GENERIC_READ);
|
||||||
if (mgr == NULL) {
|
if (mgr == NULL) {
|
||||||
throw XArchDaemonFailed(new XArchEvalWindows());
|
throw XArchDaemonFailed(new XArchEvalWindows());
|
||||||
}
|
}
|
||||||
|
|
||||||
// open the service
|
// open the service
|
||||||
SC_HANDLE service = OpenService(
|
SC_HANDLE service = OpenService(
|
||||||
mgr, app().daemonName(),
|
mgr, app().daemonName(),
|
||||||
SERVICE_STOP | SERVICE_QUERY_STATUS);
|
SERVICE_STOP | SERVICE_QUERY_STATUS);
|
||||||
|
|
||||||
if (service == NULL) {
|
if (service == NULL) {
|
||||||
CloseServiceHandle(mgr);
|
CloseServiceHandle(mgr);
|
||||||
throw XArchDaemonFailed(new XArchEvalWindows());
|
throw XArchDaemonFailed(new XArchEvalWindows());
|
||||||
}
|
}
|
||||||
|
|
||||||
// ask the service to stop, asynchronously
|
// ask the service to stop, asynchronously
|
||||||
SERVICE_STATUS ss;
|
SERVICE_STATUS ss;
|
||||||
if (!ControlService(service, SERVICE_CONTROL_STOP, &ss)) {
|
if (!ControlService(service, SERVICE_CONTROL_STOP, &ss)) {
|
||||||
DWORD dwErrCode = GetLastError();
|
DWORD dwErrCode = GetLastError();
|
||||||
if (dwErrCode != ERROR_SERVICE_NOT_ACTIVE) {
|
if (dwErrCode != ERROR_SERVICE_NOT_ACTIVE) {
|
||||||
LOG((CLOG_ERR "cannot stop service '%s'", app().daemonName()));
|
LOG((CLOG_ERR "cannot stop service '%s'", app().daemonName()));
|
||||||
throw XArchDaemonFailed(new XArchEvalWindows());
|
throw XArchDaemonFailed(new XArchEvalWindows());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG((CLOG_INFO "service '%s' stopping asynchronously", app().daemonName()));
|
LOG((CLOG_INFO "service '%s' stopping asynchronously", app().daemonName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
mainLoopStatic()
|
mainLoopStatic()
|
||||||
{
|
{
|
||||||
return CArchAppUtil::instance().app().mainLoop();
|
return CArchAppUtil::instance().app().mainLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CArchAppUtilWindows::daemonNTMainLoop(int argc, const char** argv)
|
CArchAppUtilWindows::daemonNTMainLoop(int argc, const char** argv)
|
||||||
{
|
{
|
||||||
app().initApp(argc, argv);
|
app().initApp(argc, argv);
|
||||||
debugServiceWait();
|
debugServiceWait();
|
||||||
|
|
||||||
// NB: what the hell does this do?!
|
// NB: what the hell does this do?!
|
||||||
app().argsBase().m_backend = false;
|
app().argsBase().m_backend = false;
|
||||||
|
|
||||||
return CArchMiscWindows::runDaemon(mainLoopStatic);
|
return CArchMiscWindows::runDaemon(mainLoopStatic);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::exitApp(int code)
|
CArchAppUtilWindows::exitApp(int code)
|
||||||
{
|
{
|
||||||
switch (m_exitMode) {
|
switch (m_exitMode) {
|
||||||
|
|
||||||
case kExitModeDaemon:
|
case kExitModeDaemon:
|
||||||
CArchMiscWindows::daemonFailed(code);
|
CArchMiscWindows::daemonFailed(code);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw XExitApp(code);
|
throw XExitApp(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int daemonNTMainLoopStatic(int argc, const char** argv)
|
int daemonNTMainLoopStatic(int argc, const char** argv)
|
||||||
{
|
{
|
||||||
return CArchAppUtilWindows::instance().daemonNTMainLoop(argc, argv);
|
return CArchAppUtilWindows::instance().daemonNTMainLoop(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CArchAppUtilWindows::daemonNTStartup(int, char**)
|
CArchAppUtilWindows::daemonNTStartup(int, char**)
|
||||||
{
|
{
|
||||||
CSystemLogger sysLogger(app().daemonName(), false);
|
CSystemLogger sysLogger(app().daemonName(), false);
|
||||||
m_exitMode = kExitModeDaemon;
|
m_exitMode = kExitModeDaemon;
|
||||||
return ARCH->daemonize(app().daemonName(), daemonNTMainLoopStatic);
|
return ARCH->daemonize(app().daemonName(), daemonNTMainLoopStatic);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
daemonNTStartupStatic(int argc, char** argv)
|
daemonNTStartupStatic(int argc, char** argv)
|
||||||
{
|
{
|
||||||
return CArchAppUtilWindows::instance().daemonNTStartup(argc, argv);
|
return CArchAppUtilWindows::instance().daemonNTStartup(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
foregroundStartupStatic(int argc, char** argv)
|
foregroundStartupStatic(int argc, char** argv)
|
||||||
{
|
{
|
||||||
return CArchAppUtil::instance().app().foregroundStartup(argc, argv);
|
return CArchAppUtil::instance().app().foregroundStartup(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::beforeAppExit()
|
CArchAppUtilWindows::beforeAppExit()
|
||||||
{
|
{
|
||||||
// this can be handy for debugging, since the application is launched in
|
// this can be handy for debugging, since the application is launched in
|
||||||
// a new console window, and will normally close on exit (making it so
|
// a new console window, and will normally close on exit (making it so
|
||||||
// that we can't see error messages).
|
// that we can't see error messages).
|
||||||
if (app().argsBase().m_pauseOnExit) {
|
if (app().argsBase().m_pauseOnExit) {
|
||||||
std::cout << std::endl << "Press any key to exit..." << std::endl;
|
std::cout << std::endl << "Press any key to exit..." << std::endl;
|
||||||
int c = _getch();
|
int c = _getch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CArchAppUtilWindows::run(int argc, char** argv)
|
CArchAppUtilWindows::run(int argc, char** argv)
|
||||||
{
|
{
|
||||||
// record window instance for tray icon, etc
|
// record window instance for tray icon, etc
|
||||||
CArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
CArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));
|
||||||
|
|
||||||
CMSWindowsScreen::init(CArchMiscWindows::instanceWin32());
|
CMSWindowsScreen::init(CArchMiscWindows::instanceWin32());
|
||||||
CThread::getCurrentThread().setPriority(-14);
|
CThread::getCurrentThread().setPriority(-14);
|
||||||
|
|
||||||
StartupFunc startup;
|
StartupFunc startup;
|
||||||
if (CArchMiscWindows::wasLaunchedAsService()) {
|
if (CArchMiscWindows::wasLaunchedAsService()) {
|
||||||
startup = &daemonNTStartupStatic;
|
startup = &daemonNTStartupStatic;
|
||||||
} else {
|
} else {
|
||||||
startup = &foregroundStartupStatic;
|
startup = &foregroundStartupStatic;
|
||||||
app().argsBase().m_daemon = false;
|
app().argsBase().m_daemon = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return app().runInner(argc, argv, NULL, startup);
|
return app().runInner(argc, argv, NULL, startup);
|
||||||
}
|
}
|
||||||
|
|
||||||
CArchAppUtilWindows&
|
CArchAppUtilWindows&
|
||||||
CArchAppUtilWindows::instance()
|
CArchAppUtilWindows::instance()
|
||||||
{
|
{
|
||||||
return (CArchAppUtilWindows&)CArchAppUtil::instance();
|
return (CArchAppUtilWindows&)CArchAppUtil::instance();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::debugServiceWait()
|
CArchAppUtilWindows::debugServiceWait()
|
||||||
{
|
{
|
||||||
if (app().argsBase().m_debugServiceWait)
|
if (app().argsBase().m_debugServiceWait)
|
||||||
{
|
{
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
// this code is only executed when the process is launched via the
|
// this code is only executed when the process is launched via the
|
||||||
// windows service controller (and --debug-service-wait arg is
|
// windows service controller (and --debug-service-wait arg is
|
||||||
// used). to debug, set a breakpoint on this line so that
|
// used). to debug, set a breakpoint on this line so that
|
||||||
// execution is delayed until the debugger is attached.
|
// execution is delayed until the debugger is attached.
|
||||||
ARCH->sleep(1);
|
ARCH->sleep(1);
|
||||||
LOG((CLOG_INFO "waiting for debugger to attach"));
|
LOG((CLOG_INFO "waiting for debugger to attach"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CArchAppUtilWindows::startNode()
|
CArchAppUtilWindows::startNode()
|
||||||
{
|
{
|
||||||
if (app().argsBase().m_relaunchMode) {
|
if (app().argsBase().m_relaunchMode) {
|
||||||
|
|
||||||
|
@ -346,5 +346,5 @@ CArchAppUtilWindows::startNode()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
app().startNode();
|
app().startNode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,78 +1,78 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CArchAppUtil.h"
|
#include "CArchAppUtil.h"
|
||||||
#include "CString.h"
|
#include "CString.h"
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include "Windows.h"
|
#include "Windows.h"
|
||||||
|
|
||||||
#define ARCH_APPUTIL CArchAppUtilWindows
|
#define ARCH_APPUTIL CArchAppUtilWindows
|
||||||
|
|
||||||
enum AppExitMode {
|
enum AppExitMode {
|
||||||
kExitModeNormal,
|
kExitModeNormal,
|
||||||
kExitModeDaemon
|
kExitModeDaemon
|
||||||
};
|
};
|
||||||
|
|
||||||
class CArchAppUtilWindows : public CArchAppUtil {
|
class CArchAppUtilWindows : public CArchAppUtil {
|
||||||
public:
|
public:
|
||||||
CArchAppUtilWindows();
|
CArchAppUtilWindows();
|
||||||
virtual ~CArchAppUtilWindows();
|
virtual ~CArchAppUtilWindows();
|
||||||
|
|
||||||
// Gets the arguments to be used with a service.
|
// Gets the arguments to be used with a service.
|
||||||
CString getServiceArgs() const;
|
CString getServiceArgs() const;
|
||||||
|
|
||||||
// Install application as Windows service.
|
// Install application as Windows service.
|
||||||
void installService();
|
void installService();
|
||||||
|
|
||||||
// Uninstall a Windows service with matching daemon name.
|
// Uninstall a Windows service with matching daemon name.
|
||||||
void uninstallService();
|
void uninstallService();
|
||||||
|
|
||||||
// Start a Windows service with matching daemon name.
|
// Start a Windows service with matching daemon name.
|
||||||
void startService();
|
void startService();
|
||||||
|
|
||||||
// Stop a Windows service with matching daemon name.
|
// Stop a Windows service with matching daemon name.
|
||||||
void stopService();
|
void stopService();
|
||||||
|
|
||||||
// Will install, uninstall, start, or stop the service depending on arg.
|
// Will install, uninstall, start, or stop the service depending on arg.
|
||||||
void handleServiceArg(const char* serviceAction);
|
void handleServiceArg(const char* serviceAction);
|
||||||
|
|
||||||
bool parseArg(const int& argc, const char* const* argv, int& i);
|
bool parseArg(const int& argc, const char* const* argv, int& i);
|
||||||
|
|
||||||
int daemonNTStartup(int, char**);
|
int daemonNTStartup(int, char**);
|
||||||
|
|
||||||
int daemonNTMainLoop(int argc, const char** argv);
|
int daemonNTMainLoop(int argc, const char** argv);
|
||||||
|
|
||||||
void debugServiceWait();
|
void debugServiceWait();
|
||||||
|
|
||||||
int run(int argc, char** argv);
|
int run(int argc, char** argv);
|
||||||
|
|
||||||
void exitApp(int code);
|
void exitApp(int code);
|
||||||
|
|
||||||
void beforeAppExit();
|
void beforeAppExit();
|
||||||
|
|
||||||
static CArchAppUtilWindows& instance();
|
static CArchAppUtilWindows& instance();
|
||||||
|
|
||||||
void startNode();
|
void startNode();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AppExitMode m_exitMode;
|
AppExitMode m_exitMode;
|
||||||
static BOOL WINAPI consoleHandler(DWORD CEvent);
|
static BOOL WINAPI consoleHandler(DWORD CEvent);
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -24,7 +24,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "stdstring.h"
|
#include "stdstring.h"
|
||||||
#include "stdset.h"
|
#include "stdset.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <Tlhelp32.h>
|
#include <Tlhelp32.h>
|
||||||
#include "CString.h"
|
#include "CString.h"
|
||||||
|
|
||||||
|
@ -174,10 +174,10 @@ public:
|
||||||
static bool wasLaunchedAsService();
|
static bool wasLaunchedAsService();
|
||||||
|
|
||||||
//! Returns true if we got the parent process name.
|
//! Returns true if we got the parent process name.
|
||||||
static bool getParentProcessName(CString &name);
|
static bool getParentProcessName(CString &name);
|
||||||
|
|
||||||
static HINSTANCE instanceWin32();
|
static HINSTANCE instanceWin32();
|
||||||
|
|
||||||
static void setInstanceWin32(HINSTANCE instance);
|
static void setInstanceWin32(HINSTANCE instance);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "IInterface.h"
|
#include "IInterface.h"
|
||||||
|
|
||||||
// TODO: replace with forward declaration if possible
|
// TODO: replace with forward declaration if possible
|
||||||
// we need to decouple these classes!
|
// we need to decouple these classes!
|
||||||
#include "CApp.h"
|
#include "CApp.h"
|
||||||
|
|
||||||
class IArchAppUtil : public IInterface {
|
class IArchAppUtil : public IInterface {
|
||||||
public:
|
public:
|
||||||
virtual bool parseArg(const int& argc, const char* const* argv, int& i) = 0;
|
virtual bool parseArg(const int& argc, const char* const* argv, int& i) = 0;
|
||||||
virtual void adoptApp(CApp* app) = 0;
|
virtual void adoptApp(CApp* app) = 0;
|
||||||
virtual CApp& app() const = 0;
|
virtual CApp& app() const = 0;
|
||||||
virtual int run(int argc, char** argv) = 0;
|
virtual int run(int argc, char** argv) = 0;
|
||||||
virtual void beforeAppExit() = 0;
|
virtual void beforeAppExit() = 0;
|
||||||
virtual void startNode() = 0;
|
virtual void startNode() = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,326 +1,326 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2010 The Synergy+ Project
|
* Copyright (C) 2010 The Synergy+ Project
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CMSWindowsRelauncher.h"
|
#include "CMSWindowsRelauncher.h"
|
||||||
#include "CThread.h"
|
#include "CThread.h"
|
||||||
#include "TMethodJob.h"
|
#include "TMethodJob.h"
|
||||||
#include "CLog.h"
|
#include "CLog.h"
|
||||||
#include "CArch.h"
|
#include "CArch.h"
|
||||||
#include "Version.h"
|
#include "Version.h"
|
||||||
#include "CArchDaemonWindows.h"
|
#include "CArchDaemonWindows.h"
|
||||||
|
|
||||||
#include <Tlhelp32.h>
|
#include <Tlhelp32.h>
|
||||||
#include <UserEnv.h>
|
#include <UserEnv.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
CMSWindowsRelauncher::CMSWindowsRelauncher() :
|
CMSWindowsRelauncher::CMSWindowsRelauncher() :
|
||||||
m_thread(NULL)
|
m_thread(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CMSWindowsRelauncher::~CMSWindowsRelauncher()
|
CMSWindowsRelauncher::~CMSWindowsRelauncher()
|
||||||
{
|
{
|
||||||
delete m_thread;
|
delete m_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CMSWindowsRelauncher::startAsync()
|
CMSWindowsRelauncher::startAsync()
|
||||||
{
|
{
|
||||||
m_thread = new CThread(new TMethodJob<CMSWindowsRelauncher>(
|
m_thread = new CThread(new TMethodJob<CMSWindowsRelauncher>(
|
||||||
this, &CMSWindowsRelauncher::startThread, nullptr));
|
this, &CMSWindowsRelauncher::startThread, nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CMSWindowsRelauncher::startThread(void*)
|
CMSWindowsRelauncher::startThread(void*)
|
||||||
{
|
{
|
||||||
LOG((CLOG_NOTE "starting relaunch service"));
|
LOG((CLOG_NOTE "starting relaunch service"));
|
||||||
int ret = relaunchLoop();
|
int ret = relaunchLoop();
|
||||||
|
|
||||||
// HACK: this actually throws an exception to exit with 0 (nasty)
|
// HACK: this actually throws an exception to exit with 0 (nasty)
|
||||||
ARCH->util().app().m_bye(ret);
|
ARCH->util().app().m_bye(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this still gets the physical session (the one the keyboard and
|
// this still gets the physical session (the one the keyboard and
|
||||||
// mouse is connected to), sometimes this returns -1 but not sure why
|
// mouse is connected to), sometimes this returns -1 but not sure why
|
||||||
DWORD
|
DWORD
|
||||||
CMSWindowsRelauncher::getSessionId()
|
CMSWindowsRelauncher::getSessionId()
|
||||||
{
|
{
|
||||||
return WTSGetActiveConsoleSessionId();
|
return WTSGetActiveConsoleSessionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
CMSWindowsRelauncher::winlogonInSession(DWORD sessionId, PHANDLE process)
|
CMSWindowsRelauncher::winlogonInSession(DWORD sessionId, PHANDLE process)
|
||||||
{
|
{
|
||||||
// first we need to take a snapshot of the running processes
|
// first we need to take a snapshot of the running processes
|
||||||
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||||
if (snapshot == INVALID_HANDLE_VALUE) {
|
if (snapshot == INVALID_HANDLE_VALUE) {
|
||||||
LOG((CLOG_ERR "could not get process snapshot (error: %i)",
|
LOG((CLOG_ERR "could not get process snapshot (error: %i)",
|
||||||
GetLastError()));
|
GetLastError()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PROCESSENTRY32 entry;
|
PROCESSENTRY32 entry;
|
||||||
entry.dwSize = sizeof(PROCESSENTRY32);
|
entry.dwSize = sizeof(PROCESSENTRY32);
|
||||||
|
|
||||||
// get the first process, and if we can't do that then it's
|
// get the first process, and if we can't do that then it's
|
||||||
// unlikely we can go any further
|
// unlikely we can go any further
|
||||||
BOOL gotEntry = Process32First(snapshot, &entry);
|
BOOL gotEntry = Process32First(snapshot, &entry);
|
||||||
if (!gotEntry) {
|
if (!gotEntry) {
|
||||||
LOG((CLOG_ERR "could not get first process entry (error: %i)",
|
LOG((CLOG_ERR "could not get first process entry (error: %i)",
|
||||||
GetLastError()));
|
GetLastError()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// used to record process names for debug info
|
// used to record process names for debug info
|
||||||
std::list<std::string> nameList;
|
std::list<std::string> nameList;
|
||||||
|
|
||||||
// now just iterate until we can find winlogon.exe pid
|
// now just iterate until we can find winlogon.exe pid
|
||||||
DWORD pid = 0;
|
DWORD pid = 0;
|
||||||
while(gotEntry) {
|
while(gotEntry) {
|
||||||
|
|
||||||
// make sure we're not checking the system process
|
// make sure we're not checking the system process
|
||||||
if (entry.th32ProcessID != 0) {
|
if (entry.th32ProcessID != 0) {
|
||||||
|
|
||||||
DWORD processSessionId;
|
DWORD processSessionId;
|
||||||
BOOL pidToSidRet = ProcessIdToSessionId(
|
BOOL pidToSidRet = ProcessIdToSessionId(
|
||||||
entry.th32ProcessID, &processSessionId);
|
entry.th32ProcessID, &processSessionId);
|
||||||
|
|
||||||
if (!pidToSidRet) {
|
if (!pidToSidRet) {
|
||||||
LOG((CLOG_ERR "could not get session id for process id %i (error: %i)",
|
LOG((CLOG_ERR "could not get session id for process id %i (error: %i)",
|
||||||
entry.th32ProcessID, GetLastError()));
|
entry.th32ProcessID, GetLastError()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// only pay attention to processes in the active session
|
// only pay attention to processes in the active session
|
||||||
if (processSessionId == sessionId) {
|
if (processSessionId == sessionId) {
|
||||||
|
|
||||||
// store the names so we can record them for debug
|
// store the names so we can record them for debug
|
||||||
nameList.push_back(entry.szExeFile);
|
nameList.push_back(entry.szExeFile);
|
||||||
|
|
||||||
if (_stricmp(entry.szExeFile, "winlogon.exe") == 0) {
|
if (_stricmp(entry.szExeFile, "winlogon.exe") == 0) {
|
||||||
pid = entry.th32ProcessID;
|
pid = entry.th32ProcessID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// now move on to the next entry (if we're not at the end)
|
// now move on to the next entry (if we're not at the end)
|
||||||
gotEntry = Process32Next(snapshot, &entry);
|
gotEntry = Process32Next(snapshot, &entry);
|
||||||
if (!gotEntry) {
|
if (!gotEntry) {
|
||||||
|
|
||||||
DWORD err = GetLastError();
|
DWORD err = GetLastError();
|
||||||
if (err != ERROR_NO_MORE_FILES) {
|
if (err != ERROR_NO_MORE_FILES) {
|
||||||
|
|
||||||
// only worry about error if it's not the end of the snapshot
|
// only worry about error if it's not the end of the snapshot
|
||||||
LOG((CLOG_ERR "could not get subsiquent process entry (error: %i)",
|
LOG((CLOG_ERR "could not get subsiquent process entry (error: %i)",
|
||||||
GetLastError()));
|
GetLastError()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string nameListJoin;
|
std::string nameListJoin;
|
||||||
for(std::list<std::string>::iterator it = nameList.begin();
|
for(std::list<std::string>::iterator it = nameList.begin();
|
||||||
it != nameList.end(); it++) {
|
it != nameList.end(); it++) {
|
||||||
nameListJoin.append(*it);
|
nameListJoin.append(*it);
|
||||||
nameListJoin.append(", ");
|
nameListJoin.append(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG((CLOG_DEBUG "checked processes while looking for winlogon.exe: %s",
|
LOG((CLOG_DEBUG "checked processes while looking for winlogon.exe: %s",
|
||||||
nameListJoin.c_str()));
|
nameListJoin.c_str()));
|
||||||
|
|
||||||
CloseHandle(snapshot);
|
CloseHandle(snapshot);
|
||||||
|
|
||||||
if (pid) {
|
if (pid) {
|
||||||
// now get the process so we can get the process, with which
|
// now get the process so we can get the process, with which
|
||||||
// we'll use to get the process token.
|
// we'll use to get the process token.
|
||||||
*process = OpenProcess(MAXIMUM_ALLOWED, FALSE, pid);
|
*process = OpenProcess(MAXIMUM_ALLOWED, FALSE, pid);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG((CLOG_DEBUG "could not find winlogon.exe in session %i", sessionId));
|
LOG((CLOG_DEBUG "could not find winlogon.exe in session %i", sessionId));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// gets the current user (so we can launch under their session)
|
// gets the current user (so we can launch under their session)
|
||||||
HANDLE
|
HANDLE
|
||||||
CMSWindowsRelauncher::getCurrentUserToken(DWORD sessionId, LPSECURITY_ATTRIBUTES security)
|
CMSWindowsRelauncher::getCurrentUserToken(DWORD sessionId, LPSECURITY_ATTRIBUTES security)
|
||||||
{
|
{
|
||||||
HANDLE currentToken;
|
HANDLE currentToken;
|
||||||
HANDLE winlogonProcess;
|
HANDLE winlogonProcess;
|
||||||
|
|
||||||
if (winlogonInSession(sessionId, &winlogonProcess)) {
|
if (winlogonInSession(sessionId, &winlogonProcess)) {
|
||||||
|
|
||||||
LOG((CLOG_DEBUG "session %i has winlogon.exe", sessionId));
|
LOG((CLOG_DEBUG "session %i has winlogon.exe", sessionId));
|
||||||
|
|
||||||
// get the token, so we can re-launch with this token
|
// get the token, so we can re-launch with this token
|
||||||
// -- do we really need all these access bits?
|
// -- do we really need all these access bits?
|
||||||
BOOL tokenRet = OpenProcessToken(
|
BOOL tokenRet = OpenProcessToken(
|
||||||
winlogonProcess,
|
winlogonProcess,
|
||||||
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY |
|
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY |
|
||||||
TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY |
|
TOKEN_DUPLICATE | TOKEN_ASSIGN_PRIMARY |
|
||||||
TOKEN_ADJUST_SESSIONID | TOKEN_READ | TOKEN_WRITE,
|
TOKEN_ADJUST_SESSIONID | TOKEN_READ | TOKEN_WRITE,
|
||||||
¤tToken);
|
¤tToken);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
LOG((CLOG_ERR "session %i does not have winlogon.exe "
|
LOG((CLOG_ERR "session %i does not have winlogon.exe "
|
||||||
"which is needed for re-launch", sessionId));
|
"which is needed for re-launch", sessionId));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLE primaryToken;
|
HANDLE primaryToken;
|
||||||
BOOL duplicateRet = DuplicateTokenEx(
|
BOOL duplicateRet = DuplicateTokenEx(
|
||||||
currentToken, MAXIMUM_ALLOWED, security,
|
currentToken, MAXIMUM_ALLOWED, security,
|
||||||
SecurityImpersonation, TokenPrimary, &primaryToken);
|
SecurityImpersonation, TokenPrimary, &primaryToken);
|
||||||
|
|
||||||
if (!duplicateRet) {
|
if (!duplicateRet) {
|
||||||
LOG((CLOG_ERR "could not duplicate token %i (error: %i)",
|
LOG((CLOG_ERR "could not duplicate token %i (error: %i)",
|
||||||
currentToken, GetLastError()));
|
currentToken, GetLastError()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return primaryToken;
|
return primaryToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CMSWindowsRelauncher::relaunchLoop()
|
CMSWindowsRelauncher::relaunchLoop()
|
||||||
{
|
{
|
||||||
// start with invalid id (gets re-assigned on first loop)
|
// start with invalid id (gets re-assigned on first loop)
|
||||||
DWORD sessionId = -1;
|
DWORD sessionId = -1;
|
||||||
|
|
||||||
// keep here so we can check if proc running -- huh?
|
// keep here so we can check if proc running -- huh?
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
|
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
|
||||||
|
|
||||||
int returnCode = kExitSuccess;
|
int returnCode = kExitSuccess;
|
||||||
bool launched = false;
|
bool launched = false;
|
||||||
|
|
||||||
// TODO: fix this hack BEFORE release; we need to exit gracefully instead
|
// TODO: fix this hack BEFORE release; we need to exit gracefully instead
|
||||||
// of being force killed!
|
// of being force killed!
|
||||||
bool loopRunning = true;
|
bool loopRunning = true;
|
||||||
while (loopRunning) {
|
while (loopRunning) {
|
||||||
|
|
||||||
DWORD newSessionId = getSessionId();
|
DWORD newSessionId = getSessionId();
|
||||||
|
|
||||||
// only enter here when id changes, and the session isn't -1, which
|
// only enter here when id changes, and the session isn't -1, which
|
||||||
// may mean that there is no active session.
|
// may mean that there is no active session.
|
||||||
if ((newSessionId != sessionId) && (newSessionId != -1)) {
|
if ((newSessionId != sessionId) && (newSessionId != -1)) {
|
||||||
|
|
||||||
// HACK: doesn't close process in a nice way
|
// HACK: doesn't close process in a nice way
|
||||||
// TODO: use CloseMainWindow instead
|
// TODO: use CloseMainWindow instead
|
||||||
if (launched) {
|
if (launched) {
|
||||||
TerminateProcess(pi.hProcess, kExitSuccess);
|
TerminateProcess(pi.hProcess, kExitSuccess);
|
||||||
LOG((CLOG_DEBUG "terminated existing process to make way for new one"));
|
LOG((CLOG_DEBUG "terminated existing process to make way for new one"));
|
||||||
launched = false;
|
launched = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ok, this is now the active session (forget the old one if any)
|
// ok, this is now the active session (forget the old one if any)
|
||||||
sessionId = newSessionId;
|
sessionId = newSessionId;
|
||||||
|
|
||||||
SECURITY_ATTRIBUTES sa;
|
SECURITY_ATTRIBUTES sa;
|
||||||
ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
|
ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
|
||||||
|
|
||||||
// get the token for the user in active session, which is the
|
// get the token for the user in active session, which is the
|
||||||
// one receiving input from mouse and keyboard.
|
// one receiving input from mouse and keyboard.
|
||||||
HANDLE userToken = getCurrentUserToken(sessionId, &sa);
|
HANDLE userToken = getCurrentUserToken(sessionId, &sa);
|
||||||
|
|
||||||
if (userToken != 0) {
|
if (userToken != 0) {
|
||||||
LOG((CLOG_DEBUG "got user token to launch new process"));
|
LOG((CLOG_DEBUG "got user token to launch new process"));
|
||||||
|
|
||||||
std::string cmd = getCommand();
|
std::string cmd = getCommand();
|
||||||
|
|
||||||
// in case reusing process info struct
|
// in case reusing process info struct
|
||||||
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
|
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
|
||||||
|
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
ZeroMemory(&si, sizeof(STARTUPINFO));
|
ZeroMemory(&si, sizeof(STARTUPINFO));
|
||||||
si.cb = sizeof(STARTUPINFO);
|
si.cb = sizeof(STARTUPINFO);
|
||||||
si.lpDesktop = "winsta0\\default";
|
si.lpDesktop = "winsta0\\default";
|
||||||
|
|
||||||
LPVOID environment;
|
LPVOID environment;
|
||||||
BOOL blockRet = CreateEnvironmentBlock(&environment, userToken, FALSE);
|
BOOL blockRet = CreateEnvironmentBlock(&environment, userToken, FALSE);
|
||||||
if (!blockRet) {
|
if (!blockRet) {
|
||||||
LOG((CLOG_ERR "could not create environment block (error: %i)",
|
LOG((CLOG_ERR "could not create environment block (error: %i)",
|
||||||
GetLastError()));
|
GetLastError()));
|
||||||
|
|
||||||
returnCode = kExitFailed;
|
returnCode = kExitFailed;
|
||||||
loopRunning = false; // stop loop
|
loopRunning = false; // stop loop
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
DWORD creationFlags =
|
DWORD creationFlags =
|
||||||
NORMAL_PRIORITY_CLASS |
|
NORMAL_PRIORITY_CLASS |
|
||||||
CREATE_NO_WINDOW |
|
CREATE_NO_WINDOW |
|
||||||
CREATE_UNICODE_ENVIRONMENT;
|
CREATE_UNICODE_ENVIRONMENT;
|
||||||
|
|
||||||
// re-launch in current active user session
|
// re-launch in current active user session
|
||||||
BOOL createRet = CreateProcessAsUser(
|
BOOL createRet = CreateProcessAsUser(
|
||||||
userToken, NULL, LPSTR(cmd.c_str()),
|
userToken, NULL, LPSTR(cmd.c_str()),
|
||||||
&sa, NULL, TRUE, creationFlags,
|
&sa, NULL, TRUE, creationFlags,
|
||||||
environment, NULL, &si, &pi);
|
environment, NULL, &si, &pi);
|
||||||
|
|
||||||
DestroyEnvironmentBlock(environment);
|
DestroyEnvironmentBlock(environment);
|
||||||
CloseHandle(userToken);
|
CloseHandle(userToken);
|
||||||
|
|
||||||
if (!createRet) {
|
if (!createRet) {
|
||||||
LOG((CLOG_ERR "could not launch (error: %i)", GetLastError()));
|
LOG((CLOG_ERR "could not launch (error: %i)", GetLastError()));
|
||||||
returnCode = kExitFailed;
|
returnCode = kExitFailed;
|
||||||
loopRunning = false;
|
loopRunning = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG((CLOG_DEBUG "launched in session %i (cmd: %s)",
|
LOG((CLOG_DEBUG "launched in session %i (cmd: %s)",
|
||||||
sessionId, cmd.c_str()));
|
sessionId, cmd.c_str()));
|
||||||
launched = true;
|
launched = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for session change every second
|
// check for session change every second
|
||||||
ARCH->sleep(1);
|
ARCH->sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (launched) {
|
if (launched) {
|
||||||
// HACK: kill just in case process it has survived somehow
|
// HACK: kill just in case process it has survived somehow
|
||||||
TerminateProcess(pi.hProcess, kExitSuccess);
|
TerminateProcess(pi.hProcess, kExitSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
return kExitSuccess;
|
return kExitSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CMSWindowsRelauncher::getCommand()
|
std::string CMSWindowsRelauncher::getCommand()
|
||||||
{
|
{
|
||||||
// seems like a fairly convoluted way to get the process name
|
// seems like a fairly convoluted way to get the process name
|
||||||
const char* launchName = ARCH->util().app().argsBase().m_pname;
|
const char* launchName = ARCH->util().app().argsBase().m_pname;
|
||||||
std::string args = ((CArchDaemonWindows&)ARCH->daemon()).commandLine();
|
std::string args = ((CArchDaemonWindows&)ARCH->daemon()).commandLine();
|
||||||
|
|
||||||
// build up a full command line
|
// build up a full command line
|
||||||
std::stringstream cmdTemp;
|
std::stringstream cmdTemp;
|
||||||
cmdTemp << launchName << /*" --debug-data session-" << sessionId <<*/ args;
|
cmdTemp << launchName << /*" --debug-data session-" << sessionId <<*/ args;
|
||||||
|
|
||||||
std::string cmd = cmdTemp.str();
|
std::string cmd = cmdTemp.str();
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
std::string find = "--relaunch";
|
std::string find = "--relaunch";
|
||||||
while((i = cmd.find(find)) != std::string::npos) {
|
while((i = cmd.find(find)) != std::string::npos) {
|
||||||
cmd.replace(i, find.length(), "");
|
cmd.replace(i, find.length(), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2010 The Synergy+ Project
|
* Copyright (C) 2010 The Synergy+ Project
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#pragma once
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <Windows.h>
|
||||||
class CThread;
|
#include <string>
|
||||||
|
|
||||||
class CMSWindowsRelauncher {
|
class CThread;
|
||||||
public:
|
|
||||||
CMSWindowsRelauncher();
|
class CMSWindowsRelauncher {
|
||||||
virtual ~CMSWindowsRelauncher();
|
public:
|
||||||
void startAsync();
|
CMSWindowsRelauncher();
|
||||||
CThread* m_thread;
|
virtual ~CMSWindowsRelauncher();
|
||||||
void startThread(void*);
|
void startAsync();
|
||||||
BOOL winlogonInSession(DWORD sessionId, PHANDLE process);
|
CThread* m_thread;
|
||||||
DWORD getSessionId();
|
void startThread(void*);
|
||||||
HANDLE getCurrentUserToken(DWORD sessionId, LPSECURITY_ATTRIBUTES security);
|
BOOL winlogonInSession(DWORD sessionId, PHANDLE process);
|
||||||
int relaunchLoop();
|
DWORD getSessionId();
|
||||||
std::string getCommand();
|
HANDLE getCurrentUserToken(DWORD sessionId, LPSECURITY_ATTRIBUTES security);
|
||||||
};
|
int relaunchLoop();
|
||||||
|
std::string getCommand();
|
||||||
|
};
|
||||||
|
|
|
@ -19,25 +19,25 @@
|
||||||
#ifndef CSYNERGYHOOK_H
|
#ifndef CSYNERGYHOOK_H
|
||||||
#define CSYNERGYHOOK_H
|
#define CSYNERGYHOOK_H
|
||||||
|
|
||||||
// hack: vs2005 doesn't declare _WIN32_WINNT, so we need to hard code it.
|
// hack: vs2005 doesn't declare _WIN32_WINNT, so we need to hard code it.
|
||||||
// however, some say that this should be hard coded since it defines the
|
// however, some say that this should be hard coded since it defines the
|
||||||
// target system, but since this is suposed to compile on pre-XP, maybe
|
// target system, but since this is suposed to compile on pre-XP, maybe
|
||||||
// we should just leave it like this.
|
// we should just leave it like this.
|
||||||
#if _MSC_VER == 1400
|
#if _MSC_VER == 1400
|
||||||
#define _WIN32_WINNT 0x0400
|
#define _WIN32_WINNT 0x0400
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "BasicTypes.h"
|
#include "BasicTypes.h"
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
// fix: cmake defines the library name in lower case (synrgyhk_EXPORTS) as
|
// fix: cmake defines the library name in lower case (synrgyhk_EXPORTS) as
|
||||||
// opposed to upper case (SYNRGYHK_EXPORTS), so rather than figuring out
|
// opposed to upper case (SYNRGYHK_EXPORTS), so rather than figuring out
|
||||||
// how to change cmake's behaviour, it's easier to just change the code.
|
// how to change cmake's behaviour, it's easier to just change the code.
|
||||||
#if defined(synrgyhk_EXPORTS)
|
#if defined(synrgyhk_EXPORTS)
|
||||||
#define CSYNERGYHOOK_API __declspec(dllexport)
|
#define CSYNERGYHOOK_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define CSYNERGYHOOK_API __declspec(dllimport)
|
#define CSYNERGYHOOK_API __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SYNERGY_MSG_MARK WM_APP + 0x0011 // mark id; <unused>
|
#define SYNERGY_MSG_MARK WM_APP + 0x0011 // mark id; <unused>
|
||||||
|
|
|
@ -160,8 +160,8 @@ private:
|
||||||
// unix daemon mode args
|
// unix daemon mode args
|
||||||
# define HELP_SYS_ARGS \
|
# define HELP_SYS_ARGS \
|
||||||
" [--daemon|--no-daemon]"
|
" [--daemon|--no-daemon]"
|
||||||
# define HELP_SYS_INFO \
|
# define HELP_SYS_INFO \
|
||||||
" -f, --no-daemon run in the foreground.\n" \
|
" -f, --no-daemon run in the foreground.\n" \
|
||||||
"* --daemon run as a daemon.\n"
|
"* --daemon run as a daemon.\n"
|
||||||
|
|
||||||
#elif SYSAPI_WIN32
|
#elif SYSAPI_WIN32
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
/*
|
/*
|
||||||
* synergy-plus -- mouse and keyboard sharing utility
|
* synergy-plus -- mouse and keyboard sharing utility
|
||||||
* Copyright (C) 2009 The Synergy+ Project
|
* Copyright (C) 2009 The Synergy+ Project
|
||||||
* Copyright (C) 2002 Chris Schoeneman
|
* Copyright (C) 2002 Chris Schoeneman
|
||||||
*
|
*
|
||||||
* This package is free software; you can redistribute it and/or
|
* This package is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* found in the file COPYING that should have accompanied this file.
|
* found in the file COPYING that should have accompanied this file.
|
||||||
*
|
*
|
||||||
* This package is distributed in the hope that it will be useful,
|
* This package is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "IInterface.h"
|
#include "IInterface.h"
|
||||||
|
|
||||||
class INode : IInterface {
|
class INode : IInterface {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue