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