diff --git a/.gitignore b/.gitignore index 0ede3a3194..722c54cdae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ +*.a *.o *.lo *.la +*.so +*.mo *.gmo *.swp *.tar.gz @@ -14,7 +17,6 @@ Makefile.in aclocal.m4 _configs.sed config.h -config.h.in config.log config.status config.guess @@ -31,6 +33,18 @@ ltmain.sh */po/POTFILES */po/stamp-it +.project +.cproject +.settings + +CMakeFiles +CMakeCache.txt +cmake_install.cmake +install_manifest.txt + +remmina/remmina + +rfbint.h remmina/src/remmina remmina/desktop/remmina.desktop remmina-plugins/libvncserver/rfb/rfbconfig.h diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..f1ca8ffcc7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,108 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +cmake_minimum_required(VERSION 2.6) +set(CMAKE_COLOR_MAKEFILE ON) +project(Remmina C) + +include(CheckIncludeFiles) +include(CheckLibraryExists) +include(FindPkgConfig) +include(CheckCCompilerFlag) + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) + +include(FindOptionalPackage) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") +endif() + +if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR "lib") +endif() + +if(NOT DEFINED CMAKE_INSTALL_BINDIR) + set(CMAKE_INSTALL_BINDIR "bin") +endif() + +if(NOT BUILD_SHARED_LIBS) + set(BUILD_SHARED_LIBS ON) +endif() + +if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + CHECK_C_COMPILER_FLAG(-Wno-unused-result Wno-unused-result) + if(Wno-unused-result) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result") + endif() + CHECK_C_COMPILER_FLAG(-Wno-unused-but-set-variable Wno-unused-but-set-variable) + if(Wno-unused-but-set-variable) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable") + endif() + CHECK_C_COMPILER_FLAG(-Wno-unused-function Wno-unused-function) + if(Wno-unused-function) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") + endif() +endif() + +check_include_files(sys/param.h HAVE_SYS_PARAM_H) +check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) +check_include_files(arpa/inet.h HAVE_ARPA_INET_H) +check_include_files(netinet/in.h HAVE_NETINET_IN_H) +check_include_files(termios.h HAVE_TERMIOS_H) +check_include_files(netdb.h HAVE_NETDB_H) +check_include_files(fcntl.h HAVE_FCNTL_H) +check_include_files(unistd.h HAVE_UNISTD_H) +check_include_files(sys/un.h HAVE_SYS_UN_H) +check_include_files(errno.h HAVE_ERRNO_H) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/include) + +set(REMMINA_VERSION "0.9.99.1") +set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share/remmina") +set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") +set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) + +find_suggested_package(PTHREAD) +if(PTHREAD_FOUND) + add_definitions(-DHAVE_PTHREAD) +endif() + +find_suggested_package(GCRYPT) +if(GCRYPT_FOUND) + add_definitions(-DHAVE_LIBGCRYPT) +endif() + +find_suggested_package(AVAHI) +if(AVAHI_FOUND) + add_definitions(-DHAVE_LIBAVAHI_UI) + add_definitions(-DHAVE_LIBAVAHI_CLIENT) +endif() + +find_required_package(GTK3) +if(GTK3_FOUND) + add_subdirectory(remmina) + add_subdirectory(remmina-plugins) + add_subdirectory(remmina-plugins-gnome) +endif() diff --git a/cmake/FindAPPINDICATOR.cmake b/cmake/FindAPPINDICATOR.cmake new file mode 100644 index 0000000000..49d7967082 --- /dev/null +++ b/cmake/FindAPPINDICATOR.cmake @@ -0,0 +1,38 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +pkg_check_modules(PC_APPINDICATOR appindicator3-0.1) + +find_path(APPINDICATOR_INCLUDE_DIR NAMES libappindicator/app-indicator.h + HINTS ${PC_APPINDICATOR_INCLUDEDIR} ${PC_APPINDICATOR_INCLUDE_DIRS} + PATH_SUFFIXES libappindicator-0.1) + +find_library(APPINDICATOR_LIBRARY NAMES appindicator3) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(APPINDICATOR DEFAULT_MSG APPINDICATOR_LIBRARY APPINDICATOR_INCLUDE_DIR) + +if(APPINDICATOR_FOUND) + set(APPINDICATOR_LIBRARIES ${APPINDICATOR_LIBRARY}) + set(APPINDICATOR_INCLUDE_DIRS ${APPINDICATOR_INCLUDE_DIR}) +endif() + +mark_as_advanced(APPINDICATOR_INCLUDE_DIR APPINDICATOR_LIBRARY) + diff --git a/cmake/FindAVAHI.cmake b/cmake/FindAVAHI.cmake new file mode 100644 index 0000000000..9eb2423bb5 --- /dev/null +++ b/cmake/FindAVAHI.cmake @@ -0,0 +1,37 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_package(PkgConfig) +pkg_check_modules(PC_AVAHI avahi-ui-gtk3>=0.6.30 avahi-client>=0.6.30) + +find_path(AVAHI_INCLUDE_DIR avahi-ui/avahi-ui.h + HINTS ${PC_AVAHI_INCLUDEDIR} ${PC_AVAHI_INCLUDE_DIRS}) + +find_library(AVAHI_LIBRARY NAMES avahi-ui-gtk3 + HINTS ${PC_AVAHI_LIBDIR} ${PC_AVAHI_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(AVAHI DEFAULT_MSG AVAHI_LIBRARY AVAHI_INCLUDE_DIR) + +set(AVAHI_LIBRARIES ${AVAHI_LIBRARY}) +set(AVAHI_INCLUDE_DIRS ${AVAHI_INCLUDE_DIR}) + +mark_as_advanced(AVAHI_INCLUDE_DIR AVAHI_LIBRARY) + diff --git a/cmake/FindFREERDP.cmake b/cmake/FindFREERDP.cmake new file mode 100644 index 0000000000..f7140b845c --- /dev/null +++ b/cmake/FindFREERDP.cmake @@ -0,0 +1,53 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_package(PkgConfig) +pkg_check_modules(PC_FREERDP freerdp>=1.0) +set(FREERDP_DEFINITIONS ${PC_FREERDP_CFLAGS_OTHER}) + +find_path(FREERDP_INCLUDE_DIR NAMES freerdp/freerdp.h + HINTS ${PC_FREERDP_INCLUDEDIR} ${PC_FREERDP_INCLUDE_DIRS}) + +find_library(FREERDP_LIBRARY NAMES freerdp-core + HINTS ${PC_FREERDP_LIBDIR} ${PC_FREERDP_LIBRARY_DIRS}) + +find_library(FREERDP_GDI_LIBRARY NAMES freerdp-gdi + HINTS ${PC_FREERDP_LIBDIR} ${PC_FREERDP_LIBRARY_DIRS}) + +find_library(FREERDP_KBD_LIBRARY NAMES freerdp-kbd + HINTS ${PC_FREERDP_LIBDIR} ${PC_FREERDP_LIBRARY_DIRS}) + +find_library(FREERDP_RAIL_LIBRARY NAMES freerdp-rail + HINTS ${PC_FREERDP_LIBDIR} ${PC_FREERDP_LIBRARY_DIRS}) + +find_library(FREERDP_CODEC_LIBRARY NAMES freerdp-codec + HINTS ${PC_FREERDP_LIBDIR} ${PC_FREERDP_LIBRARY_DIRS}) + +find_library(FREERDP_CHANNELS_LIBRARY NAMES freerdp-channels + HINTS ${PC_FREERDP_LIBDIR} ${PC_FREERDP_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(FREERDP DEFAULT_MSG FREERDP_LIBRARY FREERDP_INCLUDE_DIR) + +set(FREERDP_LIBRARIES ${FREERDP_LIBRARY} ${FREERDP_GDI_LIBRARY} ${FREERDP_KBD_LIBRARY} ${FREERDP_RAIL_LIBRARY} ${FREERDP_CODEC_LIBRARY} ${FREERDP_CHANNELS_LIBRARY}) +set(FREERDP_INCLUDE_DIRS ${FREERDP_INCLUDE_DIR}) + +mark_as_advanced(FREERDP_INCLUDE_DIR FREERDP_LIBRARY) + diff --git a/cmake/FindGCRYPT.cmake b/cmake/FindGCRYPT.cmake new file mode 100644 index 0000000000..ee70170234 --- /dev/null +++ b/cmake/FindGCRYPT.cmake @@ -0,0 +1,32 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h) + +find_library(GCRYPT_LIBRARY NAMES gcrypt) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(GCRYPT DEFAULT_MSG GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR) + +set(GCRYPT_LIBRARIES ${GCRYPT_LIBRARY}) +set(GCRYPT_INCLUDE_DIRS ${GCRYPT_INCLUDE_DIR}) + +mark_as_advanced(GCRYPT_INCLUDE_DIR GCRYPT_LIBRARY) + diff --git a/cmake/FindGNOMEKEYRING.cmake b/cmake/FindGNOMEKEYRING.cmake new file mode 100644 index 0000000000..c66f3e4c07 --- /dev/null +++ b/cmake/FindGNOMEKEYRING.cmake @@ -0,0 +1,35 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_path(GNOMEKEYRING_INCLUDE_DIR NAMES gnome-keyring.h + PATH_SUFFIXES gnome-keyring-1) + +find_library(GNOMEKEYRING_LIBRARY NAMES gnome-keyring) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(GNOMEKEYRING DEFAULT_MSG GNOMEKEYRING_LIBRARY GNOMEKEYRING_INCLUDE_DIR) + +if(GNOMEKEYRING_FOUND) + set(GNOMEKEYRING_LIBRARIES ${GNOMEKEYRING_LIBRARY}) + set(GNOMEKEYRING_INCLUDE_DIRS ${GNOMEKEYRING_INCLUDE_DIR}) +endif() + +mark_as_advanced(GNOMEKEYRING_INCLUDE_DIR GNOMEKEYRING_LIBRARY) + diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake new file mode 100644 index 0000000000..3cabc78548 --- /dev/null +++ b/cmake/FindGTK3.cmake @@ -0,0 +1,104 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +# Gtk + +pkg_check_modules(PC_GTK3 REQUIRED gtk+-3.0) + +find_path(GTK3_INCLUDE_DIR NAMES gtk/gtk.h + PATH_SUFFIXES gtk-3.0) + +find_library(GTK3_LIBRARY NAMES gtk-3) + +# Gdk + +find_library(GDK3_LIBRARY NAMES gdk-3) + +# Gdk-Pixbuf + +pkg_check_modules(PC_GDKPIXBUF REQUIRED gdk-pixbuf-2.0) + +find_path(GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h + HINTS ${PC_GDKPIXBUF_INCLUDEDIR} ${PC_GDKPIXBUF_INCLUDE_DIRS} + PATH_SUFFIXES gdk-pixbuf-2.0) + +find_library(GDKPIXBUF_LIBRARY NAMES gdk-3 + HINTS ${PC_GDKPIXBUF_LIBDIR} ${PC_GDKPIXBUF_LIBRARY_DIRS}) + +# Glib + +pkg_check_modules(PC_GLIB2 REQUIRED glib-2.0) + +find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h + HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} + PATH_SUFFIXES glib-2.0) + +find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h + HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} + PATH_SUFFIXES glib-2.0/include) + +set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) + +find_library(GLIB2_LIBRARY NAMES glib-2.0) + +# Pango + +pkg_check_modules(PC_PANGO REQUIRED pango) + +find_path(PANGO_INCLUDE_DIR pango/pango.h + HINTS ${PC_PANGO_INCLUDEDIR} ${PC_PANGO_INCLUDE_DIRS} + PATH_SUFFIXES pango-1.0) + +find_library(PANGO_LIBRARY NAMES pango-1.0 + HINTS ${PC_PANGO_LIBDIR} ${PC_PANGO_LIBRARY_DIRS}) + +# Cairo + +set(CAIRO_DEFINITIONS ${PC_CAIRO_CXXFLAGS_OTHER}) + +find_path(CAIRO_INCLUDE_DIR cairo.h + HINTS ${PC_CAIRO_INCLUDEDIR} ${PC_CAIRO_INCLUDE_DIRS} + PATH_SUFFIXES cairo) + +find_library(CAIRO_LIBRARY NAMES cairo + HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS}) + +# Atk + +pkg_check_modules(PC_ATK REQUIRED atk) + +find_path(ATK_INCLUDE_DIR atk/atk.h + HINTS ${PC_ATK_INCLUDEDIR} ${PC_ATK_INCLUDE_DIRS} + PATH_SUFFIXES atk-1.0) + +find_library(ATK_LIBRARY NAMES atk-1.0 + HINTS ${PC_ATK_LIBDIR} ${PC_ATK_LIBRARY_DIRS}) + +# Finalize + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(GTK3 DEFAULT_MSG GTK3_LIBRARY GTK3_INCLUDE_DIR) + +set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) +set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) + +mark_as_advanced(GTK3_INCLUDE_DIR GTK3_LIBRARY) + + diff --git a/cmake/FindLIBSSH.cmake b/cmake/FindLIBSSH.cmake new file mode 100644 index 0000000000..cb9d48a42b --- /dev/null +++ b/cmake/FindLIBSSH.cmake @@ -0,0 +1,38 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_package(PkgConfig) +pkg_check_modules(PC_LIBSSH libssh>=0.4) +set(LIBSSH_DEFINITIONS ${PC_LIBSSH_CFLAGS_OTHER}) + +find_path(LIBSSH_INCLUDE_DIR NAMES libssh/libssh.h + HINTS ${PC_LIBSSH_INCLUDEDIR} ${PC_LIBSSH_INCLUDE_DIRS}) + +find_library(LIBSSH_LIBRARY NAMES ssh + HINTS ${PC_LIBSSH_LIBDIR} ${PC_LIBSSH_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(LIBSSH DEFAULT_MSG LIBSSH_LIBRARY LIBSSH_INCLUDE_DIR) + +set(LIBSSH_LIBRARIES ${LIBSSH_LIBRARY}) +set(LIBSSH_INCLUDE_DIRS ${LIBSSH_INCLUDE_DIR}) + +mark_as_advanced(LIBSSH_INCLUDE_DIR LIBSSH_LIBRARY) + diff --git a/cmake/FindOptionalPackage.cmake b/cmake/FindOptionalPackage.cmake new file mode 100644 index 0000000000..3e543bdc44 --- /dev/null +++ b/cmake/FindOptionalPackage.cmake @@ -0,0 +1,51 @@ +# - FindOptionalPackage +# Enable or disable optional packages. Also force optional packages. +# +# This module defines the following macros: +# find_required_package : find a required package, can not be disabled +# find_suggested_package : find a suggested package - required but can be disabled +# find_optional_package : find an optional package - required only if enabled +# + +#============================================================================= +# Copyright 2011 Nils Andresen +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +macro(find_required_package _normal_package) + find_package(${_normal_package} REQUIRED) +endmacro(find_required_package) + +macro(find_suggested_package _normal_package) + string(TOUPPER ${_normal_package} _upper_package) + option(WITH_${_upper_package} "Add dependency to ${_normal_package} - recommended" ON) + + if(WITH_${_upper_package}) + message(STATUS "Finding suggested package ${_normal_package}.") + message(STATUS " Disable this using \"-DWITH_${_upper_package}=OFF\".") + find_package(${_normal_package} REQUIRED) + endif(WITH_${_upper_package}) +endmacro(find_suggested_package) + +macro(find_optional_package _normal_package) + string(TOUPPER ${_normal_package} _upper_package) + option(WITH_${_upper_package} "Add dependency to ${_normal_package}" OFF) + + if(WITH_${_upper_package}) + find_package(${_normal_package} REQUIRED) + else(WITH_${_upper_package}) + message(STATUS "Skipping optional package ${_normal_package}.") + message(STATUS " Enable this using \"-DWITH_${_upper_package}=ON\".") + endif(WITH_${_upper_package}) +endmacro(find_optional_package) diff --git a/cmake/FindPTHREAD.cmake b/cmake/FindPTHREAD.cmake new file mode 100644 index 0000000000..07ebe6c868 --- /dev/null +++ b/cmake/FindPTHREAD.cmake @@ -0,0 +1,38 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_package(PkgConfig) +pkg_check_modules(PC_PTHREAD pthread) +set(PTHREAD_DEFINITIONS ${PC_PTHREAD_CFLAGS_OTHER}) + +find_path(PTHREAD_INCLUDE_DIR NAMES pthread.h + HINTS ${PC_PTHREAD_INCLUDEDIR} ${PC_PTHREAD_INCLUDE_DIRS}) + +find_library(PTHREAD_LIBRARY NAMES pthread + HINTS ${PC_PTHREAD_LIBDIR} ${PC_PTHREAD_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(PTHREAD DEFAULT_MSG PTHREAD_LIBRARY PTHREAD_INCLUDE_DIR) + +set(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY}) +set(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR}) + +mark_as_advanced(PTHREAD_INCLUDE_DIR PTHREAD_LIBRARY) + diff --git a/cmake/FindTELEPATHY.cmake b/cmake/FindTELEPATHY.cmake new file mode 100644 index 0000000000..4e4c99cf8b --- /dev/null +++ b/cmake/FindTELEPATHY.cmake @@ -0,0 +1,38 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_package(PkgConfig) +pkg_check_modules(PC_TELEPATHY telepathy-glib) +set(TELEPATHY_DEFINITIONS ${PC_TELEPATHY_CFLAGS_OTHER}) + +find_path(TELEPATHY_INCLUDE_DIR NAMES telepathy-glib/telepathy-glib.h + HINTS ${PC_TELEPATHY_INCLUDEDIR} ${PC_TELEPATHY_INCLUDE_DIRS} + PATH_SUFFIXES telepathy-1.0) + +find_library(TELEPATHY_LIBRARY NAMES telepathy-glib) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(TELEPATHY DEFAULT_MSG TELEPATHY_LIBRARY TELEPATHY_INCLUDE_DIR) + +set(TELEPATHY_LIBRARIES ${TELEPATHY_LIBRARY}) +set(TELEPATHY_INCLUDE_DIRS ${TELEPATHY_INCLUDE_DIR}) + +mark_as_advanced(TELEPATHY_INCLUDE_DIR TELEPATHY_LIBRARY) + diff --git a/cmake/FindVTE.cmake b/cmake/FindVTE.cmake new file mode 100644 index 0000000000..d19d8adc81 --- /dev/null +++ b/cmake/FindVTE.cmake @@ -0,0 +1,36 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +pkg_check_modules(PC_VTE vte-2.90) + +find_path(VTE_INCLUDE_DIR NAMES vte/vte.h + HINTS ${PC_VTE_INCLUDEDIR} ${PC_VTE_INCLUDE_DIRS} + PATH_SUFFIXES vte-2.90) + +find_library(VTE_LIBRARY NAMES vte) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(VTE DEFAULT_MSG VTE_LIBRARY VTE_INCLUDE_DIR) + +set(VTE_LIBRARIES ${VTE_LIBRARY}) +set(VTE_INCLUDE_DIRS ${VTE_INCLUDE_DIR}) + +mark_as_advanced(VTE_INCLUDE_DIR VTE_LIBRARY) + diff --git a/cmake/FindXKBFILE.cmake b/cmake/FindXKBFILE.cmake new file mode 100644 index 0000000000..965b385b90 --- /dev/null +++ b/cmake/FindXKBFILE.cmake @@ -0,0 +1,38 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_package(PkgConfig) +pkg_check_modules(PC_XKBFILE xkbfile) + +find_path(XKBFILE_INCLUDE_DIR NAMES XKBfile.h + HINTS ${PC_XKBFILE_INCLUDEDIR} ${PC_XKBFILE_INCLUDE_DIRS} + PATH_SUFFIXES X11/extensions) + +find_library(XKBFILE_LIBRARY NAMES xkbfile + HINTS ${PC_XKBFILE_LIBDIR} ${PC_XKBFILE_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(XKBFILE DEFAULT_MSG XKBFILE_LIBRARY XKBFILE_INCLUDE_DIR) + +set(XKBFILE_LIBRARIES ${XKBFILE_LIBRARY}) +set(XKBFILE_INCLUDE_DIRS ${XKBFILE_INCLUDE_DIR}) + +mark_as_advanced(XKBFILE_INCLUDE_DIR XKBFILE_LIBRARY) + diff --git a/cmake/GETTEXT.cmake b/cmake/GETTEXT.cmake new file mode 100644 index 0000000000..d920a45b15 --- /dev/null +++ b/cmake/GETTEXT.cmake @@ -0,0 +1,35 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +find_suggested_package(Gettext) + +function(gettext po_dir package_name) + set(mo_files) + file(GLOB po_files ${po_dir}/*.po) + foreach(po_file ${po_files}) + get_filename_component(lang ${po_file} NAME_WE) + set(mo_file ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + add_custom_command(OUTPUT ${mo_file} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo_file} ${po_file} DEPENDS ${po_file}) + install(FILES ${mo_file} DESTINATION share/locale/${lang}/LC_MESSAGES RENAME ${package_name}.mo) + set(mo_files ${mo_files} ${mo_file}) + endforeach() + set(translations-target "${package_name}-translations") + add_custom_target(${translations-target} ALL DEPENDS ${mo_files}) +endfunction() + diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000000..93c93458ec --- /dev/null +++ b/config.h.in @@ -0,0 +1,23 @@ +#ifndef __CONFIG_H +#define __CONFIG_H + +#cmakedefine HAVE_SYS_PARAM_H +#cmakedefine HAVE_SYS_SOCKET_H +#cmakedefine HAVE_ARPA_INET_H +#cmakedefine HAVE_NETINET_IN_H +#cmakedefine HAVE_TERMIOS_H +#cmakedefine HAVE_NETDB_H +#cmakedefine HAVE_FCNTL_H +#cmakedefine HAVE_UNISTD_H +#cmakedefine HAVE_SYS_UN_H +#cmakedefine HAVE_ERRNO_H + +#define remmina "remmina" +#define VERSION "${REMMINA_VERSION}" +#define GETTEXT_PACKAGE remmina + +#define REMMINA_DATADIR "${REMMINA_DATADIR}" +#define REMMINA_LOCALEDIR "${REMMINA_LOCALEDIR}" +#define REMMINA_PLUGINDIR "${REMMINA_PLUGINDIR}" + +#endif diff --git a/remmina-plugins-gnome/CMakeLists.txt b/remmina-plugins-gnome/CMakeLists.txt new file mode 100644 index 0000000000..832416827c --- /dev/null +++ b/remmina-plugins-gnome/CMakeLists.txt @@ -0,0 +1,40 @@ +# remmina-plugins-gnome - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(REMMINA_PLUGINS_GNOME_SRCS + src/remminaplugingkeyring.c + ) + +add_library(remmina-plugins-gnome ${REMMINA_PLUGINS_GNOME_SRCS}) +set_target_properties(remmina-plugins-gnome PROPERTIES PREFIX "") + +find_required_package(GTK3) +if(GTK3_FOUND) + include_directories(${GTK3_INCLUDE_DIRS}) + target_link_libraries(remmina-plugins-gnome ${GTK3_LIBRARY_DIRS}) +endif() + +find_required_package(GNOMEKEYRING) +if(GNOMEKEYRING_FOUND) + include_directories(${GNOMEKEYRING_INCLUDE_DIRS}) + target_link_libraries(remmina-plugins-gnome ${GNOMEKEYRING_LIBRARIES}) +endif() + +install(TARGETS remmina-plugins-gnome DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina-plugins-gnome/Makefile.am b/remmina-plugins-gnome/Makefile.am deleted file mode 100644 index ebd7cef874..0000000000 --- a/remmina-plugins-gnome/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -## Process this file with automake to produce Makefile.in -SUBDIRS = src - - diff --git a/remmina-plugins-gnome/autogen.sh b/remmina-plugins-gnome/autogen.sh deleted file mode 100755 index 1d4eed04e0..0000000000 --- a/remmina-plugins-gnome/autogen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -aclocal -autoheader --force -libtoolize -c --automake --force -automake --add-missing --copy --include-deps -autoconf - -rm -rf autom4te.cache - diff --git a/remmina-plugins-gnome/configure.ac b/remmina-plugins-gnome/configure.ac deleted file mode 100644 index ec7ae64cd4..0000000000 --- a/remmina-plugins-gnome/configure.ac +++ /dev/null @@ -1,66 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.60) -AC_INIT(remmina-plugins-gnome, 0.9.99.1) -AM_INIT_AUTOMAKE -AC_CONFIG_SRCDIR([src/remminaplugingkeyring.c]) -AC_CONFIG_HEADER([config.h]) - -# Checks for programs. -AC_ISC_POSIX -AC_PROG_CC -AC_PROG_LIBTOOL -AC_PROG_INSTALL -AC_PROG_MAKE_SET - -# Only use -Wall if we have gcc -if test "x$GCC" = "xyes"; then - if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then - CFLAGS="$CFLAGS -Wall" - fi -fi - -remmina_plugindir='${libdir}/remmina/plugins' -AC_SUBST(remmina_plugindir) - -# Checks for libraries. -PKG_CHECK_MODULES(REMMINA_PLUGINS_GNOME, [ - glib-2.0 >= 2.20.0 - gtk+-2.0 >= 2.16.0 - gnome-keyring-1 >= 2.28.0 -]) -AC_SUBST(REMMINA_PLUGINS_GNOME_LIBS) -AC_SUBST(REMMINA_PLUGINS_GNOME_CFLAGS) - -# Check remmina executable -if test "x$prefix" = "xNONE"; then - remminabin=$ac_default_prefix/bin/remmina -else - remminabin=$prefix/bin/remmina -fi -AC_CHECK_FILE($remminabin, - [remminabin_found="yes"], - [remminabin_found="no. (If you are packaging remmina-plugins-gnome, please make sure it uses the same prefix as remmina and ignore this)"]) - -# Checks for header files. - -# Checks for typedefs, structures, and compiler characteristics. - -# Checks for library functions. - -AC_CONFIG_FILES([ -Makefile -src/Makefile -]) - -AC_OUTPUT - -echo -echo "remmina-plugins-gnome configure result:" -echo -echo "* Remmina main program: $remminabin_found" -echo -echo "Type \"make\" to compile remmina-plugins-gnome." -echo - diff --git a/remmina-plugins-gnome/src/Makefile.am b/remmina-plugins-gnome/src/Makefile.am deleted file mode 100644 index 3b3fab1137..0000000000 --- a/remmina-plugins-gnome/src/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Process this file with automake to produce Makefile.in -plugindir = $(remmina_plugindir) - -plugin_LTLIBRARIES = remmina-plugin-gkeyring.la - -remmina_plugin_gkeyring_la_SOURCES = \ - remminaplugingkeyring.c - -remmina_plugin_gkeyring_la_CFLAGS = @REMMINA_PLUGINS_GNOME_CFLAGS@ - -remmina_plugin_gkeyring_la_LDFLAGS = -avoid-version -module - -remmina_plugin_gkeyring_la_LIBADD = @REMMINA_PLUGINS_GNOME_LIBS@ - diff --git a/remmina-plugins/CMakeLists.txt b/remmina-plugins/CMakeLists.txt new file mode 100644 index 0000000000..9ed97cb1c1 --- /dev/null +++ b/remmina-plugins/CMakeLists.txt @@ -0,0 +1,61 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +include_directories(${CMAKE_SOURCE_DIR}/remmina-plugins) + +find_required_package(GTK3) +if(GTK3_FOUND) + set(REMMINA_COMMON_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS}) + set(REMMINA_COMMON_LIBRARIES ${GTK3_LIBRARIES}) +endif() + +find_suggested_package(LIBSSH) +if(LIBSSH_FOUND) + add_definitions(-DHAVE_LIBSSH) + include_directories(${SSH_INCLUDE_DIRS}) + target_link_libraries(remmina ${SSH_LIBRARIES}) +endif() + +find_required_package(XKBFILE) + +if(LIBSSH_FOUND AND XKBFILE_FOUND) + add_subdirectory(nx) +endif() + +add_subdirectory(xdmcp) + +find_suggested_package(FREERDP) +if(FREERDP_FOUND) + add_subdirectory(rdp) +endif() + +find_suggested_package(TELEPATHY) +if(TELEPATHY_FOUND) + add_subdirectory(telepathy) +endif() + +find_suggested_package(ZLIB) + +if(ZLIB_FOUND) + add_subdirectory(libvncserver) + add_subdirectory(vnc) +endif() + +add_subdirectory(po) + diff --git a/remmina-plugins/Makefile.am b/remmina-plugins/Makefile.am deleted file mode 100644 index 79d88c7825..0000000000 --- a/remmina-plugins/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -## Process this file with automake to produce Makefile.in -SUBDIRS = @REMMINA_PLUGINS_SUBDIRS@ - -EXTRA_DIST = README.LibVNCServer diff --git a/remmina-plugins/README.LibVNCServer b/remmina-plugins/README.LibVNCServer index 0d4e8f3b3c..a6215d99f3 100644 --- a/remmina-plugins/README.LibVNCServer +++ b/remmina-plugins/README.LibVNCServer @@ -4,7 +4,7 @@ Project web: http://sourceforge.net/projects/libvncserver Authors: Johannes Schindelin, Karl J. Runge License: GPL -Remmina redistributes libvncclient related codes originally from LibVNCServer project. All souce files under libvncserver/* should follow these rules: +Remmina redistributes libvncclient related codes originally from LibVNCServer project. All sources under libvncserver/* should follow these rules: o Remmina only maintains Makefile.am. All other files remain untouched o Remmina can synchronize it with LibVNCServer project any time o All fixes and new features should be accepted by LibVNCServer project first diff --git a/remmina-plugins/acinclude.m4 b/remmina-plugins/acinclude.m4 deleted file mode 100644 index ac8bd8193b..0000000000 --- a/remmina-plugins/acinclude.m4 +++ /dev/null @@ -1,215 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_prefix_config_h.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])] -# -# DESCRIPTION -# -# This is a new variant from ac_prefix_config_ this one will use a -# lowercase-prefix if the config-define was starting with a -# lowercase-char, e.g. "#define const", "#define restrict", or "#define -# off_t", (and this one can live in another directory, e.g. -# testpkg/config.h therefore I decided to move the output-header to be the -# first arg) -# -# takes the usual config.h generated header file; looks for each of the -# generated "#define SOMEDEF" lines, and prefixes the defined name (ie. -# makes it "#define PREFIX_SOMEDEF". The result is written to the output -# config.header file. The PREFIX is converted to uppercase for the -# conversions. -# -# Defaults: -# -# OUTPUT-HEADER = $PACKAGE-config.h -# PREFIX = $PACKAGE -# ORIG-HEADER, from AM_CONFIG_HEADER(config.h) -# -# Your configure.ac script should contain both macros in this order, and -# unlike the earlier variations of this prefix-macro it is okay to place -# the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation. -# -# Example: -# -# AC_INIT(config.h.in) # config.h.in as created by "autoheader" -# AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE -# AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in -# AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it.. -# AC_MEMORY_H # makes "#undef NEED_MEMORY_H" -# AC_C_CONST_H # makes "#undef const" -# AC_OUTPUT(Makefile) # creates the "config.h" now -# # and also mylib/_config.h -# -# if the argument to AX_PREFIX_CONFIG_H would have been omitted then the -# default outputfile would have been called simply "testpkg-config.h", but -# even under the name "mylib/_config.h" it contains prefix-defines like -# -# #ifndef TESTPKG_VERSION -# #define TESTPKG_VERSION "0.1.1" -# #endif -# #ifndef TESTPKG_NEED_MEMORY_H -# #define TESTPKG_NEED_MEMORY_H 1 -# #endif -# #ifndef _testpkg_const -# #define _testpkg_const _const -# #endif -# -# and this "mylib/_config.h" can be installed along with other -# header-files, which is most convenient when creating a shared library -# (that has some headers) where some functionality is dependent on the -# OS-features detected at compile-time. No need to invent some -# "mylib-confdefs.h.in" manually. :-) -# -# Note that some AC_DEFINEs that end up in the config.h file are actually -# self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the AC_TYPE_OFF_T -# say that they "will define inline|const|off_t if the system does not do -# it by itself". You might want to clean up about these - consider an -# extra mylib/conf.h that reads something like: -# -# #include -# #ifndef _testpkg_const -# #define _testpkg_const const -# #endif -# -# and then start using _testpkg_const in the header files. That is also a -# good thing to differentiate whether some library-user has starting to -# take up with a different compiler, so perhaps it could read something -# like this: -# -# #ifdef _MSC_VER -# #include -# #else -# #include -# #endif -# #ifndef _testpkg_const -# #define _testpkg_const const -# #endif -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2008 Marten Svantesson -# Copyright (c) 2008 Gerald Point -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl -AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl -AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl -AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl -AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl -AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl -AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl -AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl -AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl -m4_pushdef([_script],[conftest.prefix])dnl -m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl -_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)` -_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"` -_PKG=`echo ifelse($2, , $PACKAGE, $2)` -_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"` -_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"` -_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'` -if test ".$_INP" = "."; then - for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue - case "$ac_file" in - *.h) _INP=$ac_file ;; - *) - esac - test ".$_INP" != "." && break - done -fi -if test ".$_INP" = "."; then - case "$_OUT" in - */*) _INP=`basename "$_OUT"` - ;; - *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"` - ;; - *) _INP=config.h - ;; - esac -fi -if test -z "$_PKG" ; then - AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H]) -else - if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then - _INP="$srcdir/$_INP" - fi fi - AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines) - if test -f $_INP ; then - echo "s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script - echo "s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script - echo "s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script - echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script - echo "@%:@endif/" >>_script - echo "s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script - echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script - echo "@%:@endif/" >> _script - # now executing _script on _DEF input to create _OUT output file - echo "@%:@ifndef $_DEF" >$tmp/pconfig.h - echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h - echo ' ' >>$tmp/pconfig.h - echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h - - sed -f _script $_INP >>$tmp/pconfig.h - echo ' ' >>$tmp/pconfig.h - echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h - echo "@%:@endif" >>$tmp/pconfig.h - if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then - AC_MSG_NOTICE([$_OUT is unchanged]) - else - ac_dir=`AS_DIRNAME(["$_OUT"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f "$_OUT" - mv $tmp/pconfig.h "$_OUT" - fi - cp _script _configs.sed - else - AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT]) - fi - rm -f conftest.* -fi -m4_popdef([_symbol])dnl -m4_popdef([_script])dnl -AS_VAR_POPDEF([_INP])dnl -AS_VAR_POPDEF([_UPP])dnl -AS_VAR_POPDEF([_LOW])dnl -AS_VAR_POPDEF([_PKG])dnl -AS_VAR_POPDEF([_DEF])dnl -AS_VAR_POPDEF([_OUT])dnl -],[PACKAGE="$PACKAGE"])]) - -dnl implementation note: a bug report (31.5.2005) from Marten Svantesson points -dnl out a problem where `echo "\1"` results in a Control-A. The unix standard -dnl http://www.opengroup.org/onlinepubs/000095399/utilities/echo.html -dnl defines all backslash-sequences to be inherently non-portable asking -dnl for replacement mit printf. Some old systems had problems with that -dnl one either. However, the latest libtool (!) release does export an $ECHO -dnl (and $echo) that does the right thing - just one question is left: what -dnl was the first version to have it? Is it greater 2.58 ? diff --git a/remmina-plugins/autogen.sh b/remmina-plugins/autogen.sh deleted file mode 100755 index eb6d10f698..0000000000 --- a/remmina-plugins/autogen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh - -aclocal -autoheader --force -libtoolize -c --automake --force -intltoolize -c --automake --force -automake --add-missing --copy --include-deps -autoconf - -rm -rf autom4te.cache - diff --git a/remmina-plugins/common/Makefile.am b/remmina-plugins/common/Makefile.am deleted file mode 100644 index cc2708974f..0000000000 --- a/remmina-plugins/common/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -noinst_HEADERS = remminaplugincommon.h - diff --git a/remmina-plugins/configure.ac b/remmina-plugins/configure.ac deleted file mode 100644 index fb332a7474..0000000000 --- a/remmina-plugins/configure.ac +++ /dev/null @@ -1,280 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.60) -AC_INIT(remmina-plugins, 0.9.99.1) -AM_INIT_AUTOMAKE -AC_CONFIG_SRCDIR([common/remminaplugincommon.h]) -AC_CONFIG_HEADER([config.h]) - -# Checks for programs. -AC_ISC_POSIX -AC_PROG_CC -AC_PROG_LIBTOOL -AC_PROG_INSTALL -AC_PROG_MAKE_SET - -# Disable optimization if we enable debug -AC_ARG_ENABLE(debug, - [AS_HELP_STRING([--enable-debug], [Enable compiling in debug mode])], [ - if test "x$enableval" = "xyes"; then - CFLAGS="-g -O0" - fi] -) - -# Only use -Wall if we have gcc -if test "x$GCC" = "xyes"; then - if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then - CFLAGS="$CFLAGS -Wall" - fi -fi - -IT_PROG_INTLTOOL([0.35.0]) - -GETTEXT_PACKAGE=remmina-plugins -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package]) - -if test "x$USE_NLS" != "xno"; then - ALL_LINGUAS="bg cs da de el es eu fr hu id it kk lt nl pl pt_BR pt_PT ru sk sv th tr uk zh_CN" - nls_support="yes" -else - ALL_LINGUAS="" - nls_support="disabled." -fi - -AM_GLIB_GNU_GETTEXT - -remmina_localedir='${datadir}/locale' -AC_SUBST(remmina_localedir) - -remmina_plugindir='${libdir}/remmina/plugins' -AC_SUBST(remmina_plugindir) - -remmina_datadir='${datadir}/remmina' -AC_SUBST(remmina_datadir) - -# Checks for libraries. -PKG_CHECK_MODULES(REMMINA_PLUGINS, [ - gtk+-3.0 - remmina >= 0.9.99 -]) -AC_SUBST(REMMINA_PLUGINS_CFLAGS) -AC_SUBST(REMMINA_PLUGINS_LIBS) - -# Check libpthread -AC_CHECK_LIB(pthread, pthread_create, [ - AC_CHECK_HEADER(pthread.h, [ - pthread_support="yes" - AC_DEFINE([HAVE_PTHREAD], [1], [Define to 1 if you have the `pthread' library (-lpthread).]) - ], pthread_support="no. libpthread-dev required.") -],[ - pthread_support="no. libpthread required." -]) - -# Check libssh -AC_ARG_ENABLE(ssh, - [AS_HELP_STRING([--disable-ssh], [Disable SSH])], - [ssh_support=$enableval], - [ssh_support="yes"] -) -if test "x$ssh_support" != "xno"; then - if test "$pthread_support" = "yes"; then - AC_CHECK_LIB(ssh, ssh_options_set, [ - AC_CHECK_HEADER(libssh/libssh.h, [ - ssh_support="yes" - AC_DEFINE([HAVE_LIBSSH], [1], [Define to 1 if you have the `ssh' library (-lssh).]) - SSH_LIBS="-lssh" - AC_SUBST(SSH_LIBS) - ], ssh_support="no. libssh-dev required.") - ], ssh_support="no. libssh >= 0.4 required.") - else - ssh_support="no. Multi-threaded support required." - fi -else - ssh_support="disabled." -fi - -# Check libxkbfile -PKG_CHECK_MODULES(XKBFILE, [xkbfile], [xkbfile_support="yes"], [xkbfile_support="no. libxkbfile-dev required."]) - -# Check remmina executable -if test "x$prefix" = "xNONE"; then - remminabin=$ac_default_prefix/bin/remmina -else - remminabin=$prefix/bin/remmina -fi -AC_CHECK_FILE($remminabin, - [remminabin_found="yes"], - [remminabin_found="no. (If you are packaging the plugins, please make sure it uses the same prefix as remmina and ignore this)"]) - -REMMINA_PLUGINS_SUBDIRS="common po" - -# Check RDP dependencies -AC_ARG_ENABLE(rdp, - [AS_HELP_STRING([--disable-rdp], [Disable RDP])], - [rdp_plugin=$enableval], - [rdp_plugin="yes"] -) -if test "x$rdp_plugin" != "xno"; then - PKG_CHECK_MODULES(RDP, [freerdp], [ - REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS rdp" - ], [ - rdp_plugin="no. freerdp-dev rquired." - ]) -else - rdp_plugin="disabled." -fi - -# Check VNC dependencies -AC_ARG_ENABLE(vnc, - [AS_HELP_STRING([--disable-vnc], [Disable VNC])], - [vnc_plugin=$enableval], - [vnc_plugin="yes"] -) -if test "x$vnc_plugin" != "xno"; then - if test "x$vnc_plugin" = "xdl"; then - AC_CHECK_LIB(vncclient, rfbGetClient, [ - AC_CHECK_HEADER(rfb/rfbclient.h, [ - vnc_plugin="link to libvncclient externally" - VNC_CFLAGS="" - VNC_LIBS="-lvncclient" - AC_SUBST(VNC_CFLAGS) - AC_SUBST(VNC_LIBS) - AC_DEFINE([HAVE_LIBVNCCLIENT], [1], [Define to 1 if you have libvncclient.]) - REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS vnc" - ], vnc_plugin="no. libvncclient(libvncserver)-dev required.") - ],[ - vnc_plugin="no. libvncclient(libvncserver) required." - ]) - else - vnc_plugin="" - fi -else - vnc_plugin="disabled." -fi -if test "x$vnc_plugin" = "x"; then - AC_CHECK_LIB(z, deflate, , vnc_plugin="no. zlib required.") -fi -if test "x$vnc_plugin" = "x"; then - AC_CHECK_HEADER(zlib.h, , vnc_plugin="no. zlib-dev required.") -fi -if test "x$vnc_plugin" = "x"; then - AC_CHECK_LIB(jpeg, jpeg_CreateCompress, , vnc_plugin="no. libjpeg required.") -fi -if test "x$vnc_plugin" = "x"; then - AC_CHECK_HEADER(jpeglib.h, , vnc_plugin="no. libjpeg-dev required.") -fi -if test "x$vnc_plugin" = "x"; then - AM_PATH_LIBGCRYPT(1.4.0, , vnc_support="no. libgcrypt-dev required.") -fi -if test "x$vnc_plugin" = "x"; then - PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.4.0, , vnc_plugin="no. libgnutls-dev required.") -fi -if test "x$vnc_plugin" = "x"; then - AX_PREFIX_CONFIG_H([libvncserver/rfb/rfbconfig.h], [LIBVNCSERVER]) - REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS libvncserver vnc" - VNC_CFLAGS="-I../libvncserver $LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS" - VNC_LIBS="../libvncserver/libvncclient.la -ljpeg -lz $LIBGCRYPT_LIBS $GNUTLS_LIBS" - AC_SUBST(VNC_CFLAGS) - AC_SUBST(VNC_LIBS) - AC_DEFINE([WITH_CLIENT_GCRYPT], [1], [Enable support for gcrypt in libvncclient]) - AC_DEFINE([WITH_CLIENT_TLS], [1], [Enable support for gnutls in libvncclient]) - AC_DEFINE([HAVE_LIBVNCCLIENT], [1], [Define to 1 if you have libvncclient.]) - AC_DEFINE([IPv6], [1], [Enable support for IPv6 in libvncclient]) - vnc_plugin="yes" -fi - -# Check XDMCP dependencies -AC_ARG_ENABLE(xdmcp, - [AS_HELP_STRING([--disable-xdmcp], [Disable XDMCP])], - [xdmcp_plugin=$enableval], - [xdmcp_plugin="yes"] -) -if test "x$xdmcp_plugin" != "xno"; then - REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS xdmcp" -else - xdmcp_plugin="disabled." -fi - -# Check NX dependencies -if test "x$ssh_support" = "xyes"; then - if test "x$xkbfile_support" = "xyes"; then - AC_ARG_ENABLE(nx, - [AS_HELP_STRING([--disable-nx], [Disable NX])], - [nx_plugin=$enableval], - [nx_plugin="yes"] - ) - if test "x$nx_plugin" != "xno"; then - REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS nx" - else - nx_plugin="disabled." - fi - else - nx_plugin="no. libxkbfile required." - fi -else - nx_plugin="no. libssh required." -fi - -# Check Telepathy dependencies -AC_ARG_ENABLE(telepathy, - [AS_HELP_STRING([--disable-telepathy], [Disable Telepathy])], - [telepathy_plugin=$enableval], - [telepathy_plugin="yes"] -) -if test "x$telepathy_plugin" != "xno"; then - PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.9.0], [ - REMMINA_PLUGINS_SUBDIRS="$REMMINA_PLUGINS_SUBDIRS telepathy" - ], [ - telepathy_plugin="no. telepathy-glib-dev rquired." - ]) -else - telepathy_plugin="disabled." -fi - -# Checks for header files. -AC_CHECK_HEADERS_ONCE( - netdb.h - arpa/inet.h - netinet/in.h - sys/socket.h - sys/un.h - fcntl.h - errno.h -) - -AC_SUBST(REMMINA_PLUGINS_SUBDIRS) - -AC_CONFIG_FILES([ -Makefile -common/Makefile -po/Makefile.in -rdp/Makefile -libvncserver/Makefile -vnc/Makefile -xdmcp/Makefile -nx/Makefile -telepathy/Makefile -]) - -AC_OUTPUT - -echo -echo "Remmina-Plugins configure result:" -echo -echo "* Remmina main program: $remminabin_found" -echo "* NLS support: $nls_support" -echo "* Multi-threaded support: $pthread_support" -echo "* SSH support: $ssh_support" -echo "* XKB support: $xkbfile_support" -echo -echo "* RDP plugin: $rdp_plugin" -echo "* VNC plugin: $vnc_plugin" -echo "* XDMCP plugin: $xdmcp_plugin" -echo "* NX plugin: $nx_plugin" -echo "* Telepathy plugin: $telepathy_plugin" -echo -echo "Type \"make\" to compile remmina-plugins." -echo - diff --git a/remmina-plugins/libvncserver/CMakeLists.txt b/remmina-plugins/libvncserver/CMakeLists.txt new file mode 100644 index 0000000000..3b174ff657 --- /dev/null +++ b/remmina-plugins/libvncserver/CMakeLists.txt @@ -0,0 +1,108 @@ +cmake_minimum_required(VERSION 2.6) + +project(LibVNCServer) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckTypeSize) +include(TestBigEndian) + +set(PACKAGE_NAME "LibVNCServer") +set(FULL_PACKAGE_NAME "LibVNCServer") +set(PACKAGE_VERSION "0.9.8.2") +set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver") + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libvncserver ${CMAKE_CURRENT_SOURCE_DIR}/common) + +find_package(ZLIB) +find_package(JPEG) +find_package(GnuTLS) +find_package(Threads) +find_package(X11) +find_library(LIBGCRYPT_LIBRARIES gcrypt) + +if(Threads_FOUND) + option(TIGHTVNC_FILETRANSFER "Enable filetransfer" ON) +endif(Threads_FOUND) +if(ZLIB_FOUND) + set(LIBVNCSERVER_HAVE_LIBZ 1) +endif(ZLIB_FOUND) +if(JPEG_FOUND) + set(LIBVNCSERVER_HAVE_LIBJPEG 1) +endif(JPEG_FOUND) +option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON) +if(GNUTLS_FOUND) + set(LIBVNCSERVER_WITH_CLIENT_TLS 1) +endif(GNUTLS_FOUND) +if(LIBGCRYPT_LIBRARIES) + message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}") + set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1) +endif(LIBGCRYPT_LIBRARIES) + +check_include_file("fcntl.h" LIBVNCSERVER_HAVE_FCNTL_H) +check_include_file("netinet/in.h" LIBVNCSERVER_HAVE_NETINET_IN_H) +check_include_file("sys/socket.h" LIBVNCSERVER_HAVE_SYS_SOCKET_H) +check_include_file("sys/stat.h" LIBVNCSERVER_HAVE_SYS_STAT_H) +check_include_file("sys/time.h" LIBVNCSERVER_HAVE_SYS_TIME_H) +check_include_file("sys/types.h" LIBVNCSERVER_HAVE_SYS_TYPES_H) +check_include_file("sys/wait.h" LIBVNCSERVER_HAVE_SYS_WAIT_H) +check_include_file("unistd.h" LIBVNCSERVER_HAVE_UNISTD_H) + +# headers needed for check_type_size() +check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) +check_include_file("stdint.h" HAVE_STDINT_H) +check_include_file("stddef.h" HAVE_STDDEF_H) +check_include_file("sys/types.h" HAVE_SYS_TYPES_H) + +check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY) + +if(CMAKE_USE_PTHREADS_INIT) + set(LIBVNCSERVER_HAVE_LIBPTHREAD 1) +endif(CMAKE_USE_PTHREADS_INIT) +if(LIBVNCSERVER_HAVE_SYS_SOCKET_H) + # socklen_t + list(APPEND CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h") +endif(LIBVNCSERVER_HAVE_SYS_SOCKET_H) +if(HAVE_ARPA_INET_H) + # in_addr_t + list(APPEND CMAKE_EXTRA_INCLUDE_FILES "arpa/inet.h") +endif(HAVE_ARPA_INET_H) + +check_type_size(pid_t LIBVNCSERVER_PID_T) +check_type_size(size_t LIBVNCSERVER_SIZE_T) +check_type_size(socklen_t LIBVNCSERVER_SOCKLEN_T) +check_type_size(in_addr_t LIBVNCSERVER_IN_ADDR_T) + +if(NOT HAVE_LIBVNCSERVER_IN_ADDR_T) + set(LIBVNCSERVER_NEED_INADDR_T 1) +endif(NOT HAVE_LIBVNCSERVER_IN_ADDR_T) + +TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h) + +set(COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common) +set(LIBVNCCLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libvncclient) + +set(LIBVNCCLIENT_SOURCES + ${LIBVNCCLIENT_DIR}/cursor.c + ${LIBVNCCLIENT_DIR}/listen.c + ${LIBVNCCLIENT_DIR}/rfbproto.c + ${LIBVNCCLIENT_DIR}/sockets.c + ${LIBVNCCLIENT_DIR}/vncviewer.c + ${COMMON_DIR}/minilzo.c + ${LIBVNCCLIENT_DIR}/tls.c +) + +add_library(vncclient STATIC ${LIBVNCCLIENT_SOURCES}) + +if(WIN32) + set(ADDITIONAL_LIBS ws2_32) +endif(WIN32) + +target_link_libraries(vncclient + ${ADDITIONAL_LIBS} + ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES} + ${SDL_LIBRARY} +) diff --git a/remmina-plugins/libvncserver/Makefile.am b/remmina-plugins/libvncserver/Makefile.am deleted file mode 100644 index d41d5b3459..0000000000 --- a/remmina-plugins/libvncserver/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -noinst_LTLIBRARIES = libvncclient.la - -INCLUDES = $(GNUTLS_CFLAGS) - -libvncclient_la_SOURCES = \ - libvncclient/cursor.c \ - libvncclient/listen.c \ - common/lzoconf.h \ - common/minilzo.c \ - common/minilzo.h \ - libvncclient/rfbproto.c \ - libvncclient/sockets.c \ - libvncclient/tls.c \ - libvncclient/tls.h \ - libvncclient/tight.c \ - libvncclient/vncviewer.c \ - libvncclient/zlib.c \ - libvncclient/zrle.c - -libvncclient_la_CFLAGS = -I./common - -libvncclient_la_LIBADD = $(GNUTLS_LIBS) - -EXTRA_DIST = \ - libvncclient/corre.c \ - libvncclient/hextile.c \ - libvncclient/rre.c \ - libvncclient/ultra.c \ - common/d3des.c \ - common/d3des.h \ - common/vncauth.c \ - common/zywrletemplate.c - -DISTCLEANFILES = \ - rfb/rfbconfig.h - -noinst_HEADERS = \ - rfb/rfbclient.h \ - rfb/rfbconfig.h \ - rfb/rfbint.h \ - rfb/rfbproto.h \ - rfb/keysym.h - diff --git a/remmina-plugins/libvncserver/libvncclient.pc.in b/remmina-plugins/libvncserver/libvncclient.pc.in new file mode 100644 index 0000000000..143dc46c14 --- /dev/null +++ b/remmina-plugins/libvncserver/libvncclient.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: LibVNCClient +Description: A library for easy implementation of a VNC client. +Version: @VERSION@ +Requires: +Libs: -L${libdir} -lvncclient @LIBS@ @WSOCKLIB@ +Cflags: -I${includedir} + diff --git a/remmina-plugins/libvncserver/libvncclient/rfbproto.c b/remmina-plugins/libvncserver/libvncclient/rfbproto.c index d424b04e86..a7faab1b1b 100644 --- a/remmina-plugins/libvncserver/libvncclient/rfbproto.c +++ b/remmina-plugins/libvncserver/libvncclient/rfbproto.c @@ -569,8 +569,8 @@ ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth) rfbClientLog("%d) Received security type %d\n", loop, tAuth[loop]); if (flag) continue; if (tAuth[loop]==rfbVncAuth || tAuth[loop]==rfbNoAuth || - tAuth[loop]==rfbARD || - (!subAuth && (tAuth[loop]==rfbTLS || tAuth[loop]==rfbVeNCrypt))) + (tAuth[loop]==rfbARD && client->GetCredential) || + (!subAuth && (tAuth[loop]==rfbTLS || (tAuth[loop]==rfbVeNCrypt && client->GetCredential)))) { if (!subAuth && client->clientAuthSchemes) { diff --git a/remmina-plugins/libvncserver/libvncclient/tls.c b/remmina-plugins/libvncserver/libvncclient/tls.c index 5d293625bd..a926c8c500 100644 --- a/remmina-plugins/libvncserver/libvncclient/tls.c +++ b/remmina-plugins/libvncserver/libvncclient/tls.c @@ -31,8 +31,10 @@ #ifdef LIBVNCSERVER_WITH_CLIENT_TLS -static const char *rfbTLSPriority = "NORMAL:+DHE-DSS:+RSA:+DHE-RSA:+SRP"; -static const char *rfbAnonTLSPriority= "NORMAL:+ANON-DH"; +static const int rfbCertTypePriority[] = { GNUTLS_CRT_X509, 0 }; +static const int rfbProtoPriority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 }; +static const int rfbKXPriority[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0}; +static const int rfbKXAnon[] = {GNUTLS_KX_ANON_DH, 0}; #define DH_BITS 1024 static gnutls_dh_params_t rfbDHParams; @@ -131,7 +133,6 @@ static rfbBool InitializeTLSSession(rfbClient* client, rfbBool anonTLS) { int ret; - const char *p; if (client->tlsSession) return TRUE; @@ -141,10 +142,12 @@ InitializeTLSSession(rfbClient* client, rfbBool anonTLS) return FALSE; } - if ((ret = gnutls_priority_set_direct(client->tlsSession, - anonTLS ? rfbAnonTLSPriority : rfbTLSPriority, &p)) < 0) + if ((ret = gnutls_set_default_priority(client->tlsSession)) < 0 || + (ret = gnutls_kx_set_priority(client->tlsSession, anonTLS ? rfbKXAnon : rfbKXPriority)) < 0 || + (ret = gnutls_certificate_type_set_priority(client->tlsSession, rfbCertTypePriority)) < 0 || + (ret = gnutls_protocol_set_priority(client->tlsSession, rfbProtoPriority)) < 0) { - rfbClientLog("Warning: Failed to set TLS priority: %s (%s).\n", gnutls_strerror(ret), p); + rfbClientLog("Warning: Failed to set TLS priority: %s.\n", gnutls_strerror(ret)); } gnutls_transport_set_ptr(client->tlsSession, (gnutls_transport_ptr_t)client); diff --git a/remmina-plugins/libvncserver/rfb/default8x16.h b/remmina-plugins/libvncserver/rfb/default8x16.h new file mode 100644 index 0000000000..252f411496 --- /dev/null +++ b/remmina-plugins/libvncserver/rfb/default8x16.h @@ -0,0 +1,261 @@ +static unsigned char default8x16FontData[4096+1]={ +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0xff,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x6c,0xfe,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x18,0x3c,0x3c,0xe7,0xe7,0xe7,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x18,0x3c,0x7e,0xff,0xff,0x7e,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00,0x00,0x00, +0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff,0xff,0xff,0xff,0xff, +0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00,0x00,0x00,0x00,0x00, +0xff,0xff,0xff,0xff,0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff,0xff,0xff,0xff,0xff, +0x00,0x00,0x1e,0x0e,0x1a,0x32,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x66,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x3f,0x33,0x3f,0x30,0x30,0x30,0x30,0x70,0xf0,0xe0,0x00,0x00,0x00,0x00, +0x00,0x00,0x7f,0x63,0x7f,0x63,0x63,0x63,0x63,0x67,0xe7,0xe6,0xc0,0x00,0x00,0x00, +0x00,0x00,0x00,0x18,0x18,0xdb,0x3c,0xe7,0x3c,0xdb,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfe,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00, +0x00,0x02,0x06,0x0e,0x1e,0x3e,0xfe,0x3e,0x1e,0x0e,0x06,0x02,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00, +0x00,0x00,0x7f,0xdb,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x1b,0x1b,0x00,0x00,0x00,0x00, +0x00,0x7c,0xc6,0x60,0x38,0x6c,0xc6,0xc6,0x6c,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xfe,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7c,0x7c,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xfe,0xfe,0x7c,0x7c,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00,0x00, +0x18,0x18,0x7c,0xc6,0xc2,0xc0,0x7c,0x06,0x06,0x86,0xc6,0x7c,0x18,0x18,0x00,0x00, +0x00,0x00,0x00,0x00,0xc2,0xc6,0x0c,0x18,0x30,0x60,0xc6,0x86,0x00,0x00,0x00,0x00, +0x00,0x00,0x38,0x6c,0x6c,0x38,0x76,0xdc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00,0x00,0x00, +0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc6,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0x06,0x06,0x3c,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x0c,0x1e,0x00,0x00,0x00,0x00, +0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xfc,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x38,0x60,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0xfe,0xc6,0x06,0x06,0x0c,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x0c,0x78,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0x0c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,0x00,0x00, +0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xde,0xc6,0xc6,0x66,0x3a,0x00,0x00,0x00,0x00, +0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00, +0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, +0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0xc3,0xe7,0xff,0xff,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x00,0x00,0x00,0x00, +0x00,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xde,0x7c,0x0c,0x0e,0x00,0x00, +0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, +0x00,0x00,0x7c,0xc6,0xc6,0x60,0x38,0x0c,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0xff,0xdb,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x66,0x00,0x00,0x00,0x00, +0x00,0x00,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x3c,0x66,0xc3,0xc3,0x00,0x00,0x00,0x00, +0x00,0x00,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0xff,0xc3,0x86,0x0c,0x18,0x30,0x60,0xc1,0xc3,0xff,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0e,0x06,0x02,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,0x00,0x00, +0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00, +0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0xe0,0x60,0x60,0x78,0x6c,0x66,0x66,0x66,0x66,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x1c,0x0c,0x0c,0x3c,0x6c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,0x00, +0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00, +0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00, +0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xe6,0xff,0xdb,0xdb,0xdb,0xdb,0xdb,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00, +0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1e,0x00, +0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x66,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x10,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0x36,0x1c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xc3,0x66,0x3c,0x18,0x3c,0x66,0xc3,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0xf8,0x00, +0x00,0x00,0x00,0x00,0x00,0xfe,0xcc,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0e,0x00,0x00,0x00,0x00, +0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x70,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00, +0x00,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xfe,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x0c,0x06,0x7c,0x00,0x00, +0x00,0x00,0xcc,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x0c,0x18,0x30,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x10,0x38,0x6c,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0xcc,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x60,0x30,0x18,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x38,0x6c,0x38,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x3c,0x66,0x60,0x60,0x66,0x3c,0x0c,0x06,0x3c,0x00,0x00,0x00, +0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x18,0x3c,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0xc6,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x38,0x6c,0x38,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x18,0x30,0x60,0x00,0xfe,0x66,0x60,0x7c,0x60,0x60,0x66,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x6e,0x3b,0x1b,0x7e,0xd8,0xdc,0x77,0x00,0x00,0x00,0x00, +0x00,0x00,0x3e,0x6c,0xcc,0xcc,0xfe,0xcc,0xcc,0xcc,0xcc,0xce,0x00,0x00,0x00,0x00, +0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x30,0x78,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x60,0x30,0x18,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0xc6,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0x78,0x00, +0x00,0xc6,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x18,0x18,0x7e,0xc3,0xc0,0xc0,0xc0,0xc3,0x7e,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xe6,0xfc,0x00,0x00,0x00,0x00, +0x00,0x00,0xc3,0x66,0x3c,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0xfc,0x66,0x66,0x7c,0x62,0x66,0x6f,0x66,0x66,0x66,0xf3,0x00,0x00,0x00,0x00, +0x00,0x0e,0x1b,0x18,0x18,0x18,0x7e,0x18,0x18,0x18,0x18,0x18,0xd8,0x70,0x00,0x00, +0x00,0x18,0x30,0x60,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x0c,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +0x00,0x18,0x30,0x60,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x18,0x30,0x60,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0x76,0xdc,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, +0x76,0xdc,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x00,0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xc0,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00, +0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x60,0xce,0x9b,0x06,0x0c,0x1f,0x00,0x00, +0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x66,0xce,0x96,0x3e,0x06,0x06,0x00,0x00, +0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x36,0x6c,0xd8,0x6c,0x36,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xd8,0x6c,0x36,0x6c,0xd8,0x00,0x00,0x00,0x00,0x00,0x00, +0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44, +0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, +0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x18,0x18,0x18,0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +0x18,0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, +0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0xd8,0xd8,0xd8,0xdc,0x76,0x00,0x00,0x00,0x00, +0x00,0x00,0x78,0xcc,0xcc,0xcc,0xd8,0xcc,0xc6,0xc6,0xc6,0xcc,0x00,0x00,0x00,0x00, +0x00,0x00,0xfe,0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7e,0xd8,0xd8,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xc0,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x7e,0x18,0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00, +0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x6c,0x6c,0x6c,0xee,0x00,0x00,0x00,0x00, +0x00,0x00,0x1e,0x30,0x18,0x0c,0x3e,0x66,0x66,0x66,0x66,0x3c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x7e,0xdb,0xdb,0xdb,0x7e,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x03,0x06,0x7e,0xdb,0xdb,0xf3,0x7e,0x60,0xc0,0x00,0x00,0x00,0x00, +0x00,0x00,0x1c,0x30,0x60,0x60,0x7c,0x60,0x60,0x60,0x30,0x1c,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0xff,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00,0x7e,0x00,0x00,0x00,0x00, +0x00,0x00,0x0e,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x38,0x6c,0x6c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0xec,0x6c,0x6c,0x3c,0x1c,0x00,0x00,0x00,0x00, +0x00,0xd8,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; +static int default8x16FontMetaData[256*5+1]={ +0,8,16,0,0,16,8,16,0,0,32,8,16,0,0,48,8,16,0,0,64,8,16,0,0,80,8,16,0,0,96,8,16,0,0,112,8,16,0,0,128,8,16,0,0,144,8,16,0,0,160,8,16,0,0,176,8,16,0,0,192,8,16,0,0,208,8,16,0,0,224,8,16,0,0,240,8,16,0,0,256,8,16,0,0,272,8,16,0,0,288,8,16,0,0,304,8,16,0,0,320,8,16,0,0,336,8,16,0,0,352,8,16,0,0,368,8,16,0,0,384,8,16,0,0,400,8,16,0,0,416,8,16,0,0,432,8,16,0,0,448,8,16,0,0,464,8,16,0,0,480,8,16,0,0,496,8,16,0,0,512,8,16,0,0,528,8,16,0,0,544,8,16,0,0,560,8,16,0,0,576,8,16,0,0,592,8,16,0,0,608,8,16,0,0,624,8,16,0,0,640,8,16,0,0,656,8,16,0,0,672,8,16,0,0,688,8,16,0,0,704,8,16,0,0,720,8,16,0,0,736,8,16,0,0,752,8,16,0,0,768,8,16,0,0,784,8,16,0,0,800,8,16,0,0,816,8,16,0,0,832,8,16,0,0,848,8,16,0,0,864,8,16,0,0,880,8,16,0,0,896,8,16,0,0,912,8,16,0,0,928,8,16,0,0,944,8,16,0,0,960,8,16,0,0,976,8,16,0,0,992,8,16,0,0,1008,8,16,0,0,1024,8,16,0,0,1040,8,16,0,0,1056,8,16,0,0,1072,8,16,0,0,1088,8,16,0,0,1104,8,16,0,0,1120,8,16,0,0,1136,8,16,0,0,1152,8,16,0,0,1168,8,16,0,0,1184,8,16,0,0,1200,8,16,0,0,1216,8,16,0,0,1232,8,16,0,0,1248,8,16,0,0,1264,8,16,0,0,1280,8,16,0,0,1296,8,16,0,0,1312,8,16,0,0,1328,8,16,0,0,1344,8,16,0,0,1360,8,16,0,0,1376,8,16,0,0,1392,8,16,0,0,1408,8,16,0,0,1424,8,16,0,0,1440,8,16,0,0,1456,8,16,0,0,1472,8,16,0,0,1488,8,16,0,0,1504,8,16,0,0,1520,8,16,0,0,1536,8,16,0,0,1552,8,16,0,0,1568,8,16,0,0,1584,8,16,0,0,1600,8,16,0,0,1616,8,16,0,0,1632,8,16,0,0,1648,8,16,0,0,1664,8,16,0,0,1680,8,16,0,0,1696,8,16,0,0,1712,8,16,0,0,1728,8,16,0,0,1744,8,16,0,0,1760,8,16,0,0,1776,8,16,0,0,1792,8,16,0,0,1808,8,16,0,0,1824,8,16,0,0,1840,8,16,0,0,1856,8,16,0,0,1872,8,16,0,0,1888,8,16,0,0,1904,8,16,0,0,1920,8,16,0,0,1936,8,16,0,0,1952,8,16,0,0,1968,8,16,0,0,1984,8,16,0,0,2000,8,16,0,0,2016,8,16,0,0,2032,8,16,0,0,2048,8,16,0,0,2064,8,16,0,0,2080,8,16,0,0,2096,8,16,0,0,2112,8,16,0,0,2128,8,16,0,0,2144,8,16,0,0,2160,8,16,0,0,2176,8,16,0,0,2192,8,16,0,0,2208,8,16,0,0,2224,8,16,0,0,2240,8,16,0,0,2256,8,16,0,0,2272,8,16,0,0,2288,8,16,0,0,2304,8,16,0,0,2320,8,16,0,0,2336,8,16,0,0,2352,8,16,0,0,2368,8,16,0,0,2384,8,16,0,0,2400,8,16,0,0,2416,8,16,0,0,2432,8,16,0,0,2448,8,16,0,0,2464,8,16,0,0,2480,8,16,0,0,2496,8,16,0,0,2512,8,16,0,0,2528,8,16,0,0,2544,8,16,0,0,2560,8,16,0,0,2576,8,16,0,0,2592,8,16,0,0,2608,8,16,0,0,2624,8,16,0,0,2640,8,16,0,0,2656,8,16,0,0,2672,8,16,0,0,2688,8,16,0,0,2704,8,16,0,0,2720,8,16,0,0,2736,8,16,0,0,2752,8,16,0,0,2768,8,16,0,0,2784,8,16,0,0,2800,8,16,0,0,2816,8,16,0,0,2832,8,16,0,0,2848,8,16,0,0,2864,8,16,0,0,2880,8,16,0,0,2896,8,16,0,0,2912,8,16,0,0,2928,8,16,0,0,2944,8,16,0,0,2960,8,16,0,0,2976,8,16,0,0,2992,8,16,0,0,3008,8,16,0,0,3024,8,16,0,0,3040,8,16,0,0,3056,8,16,0,0,3072,8,16,0,0,3088,8,16,0,0,3104,8,16,0,0,3120,8,16,0,0,3136,8,16,0,0,3152,8,16,0,0,3168,8,16,0,0,3184,8,16,0,0,3200,8,16,0,0,3216,8,16,0,0,3232,8,16,0,0,3248,8,16,0,0,3264,8,16,0,0,3280,8,16,0,0,3296,8,16,0,0,3312,8,16,0,0,3328,8,16,0,0,3344,8,16,0,0,3360,8,16,0,0,3376,8,16,0,0,3392,8,16,0,0,3408,8,16,0,0,3424,8,16,0,0,3440,8,16,0,0,3456,8,16,0,0,3472,8,16,0,0,3488,8,16,0,0,3504,8,16,0,0,3520,8,16,0,0,3536,8,16,0,0,3552,8,16,0,0,3568,8,16,0,0,3584,8,16,0,0,3600,8,16,0,0,3616,8,16,0,0,3632,8,16,0,0,3648,8,16,0,0,3664,8,16,0,0,3680,8,16,0,0,3696,8,16,0,0,3712,8,16,0,0,3728,8,16,0,0,3744,8,16,0,0,3760,8,16,0,0,3776,8,16,0,0,3792,8,16,0,0,3808,8,16,0,0,3824,8,16,0,0,3840,8,16,0,0,3856,8,16,0,0,3872,8,16,0,0,3888,8,16,0,0,3904,8,16,0,0,3920,8,16,0,0,3936,8,16,0,0,3952,8,16,0,0,3968,8,16,0,0,3984,8,16,0,0,4000,8,16,0,0,4016,8,16,0,0,4032,8,16,0,0,4048,8,16,0,0,4064,8,16,0,0,4080,8,16,0,0,}; +static rfbFontData default8x16Font = { default8x16FontData, default8x16FontMetaData }; diff --git a/remmina-plugins/libvncserver/rfb/rfb.h b/remmina-plugins/libvncserver/rfb/rfb.h new file mode 100644 index 0000000000..7c15bd8966 --- /dev/null +++ b/remmina-plugins/libvncserver/rfb/rfb.h @@ -0,0 +1,1182 @@ +#ifndef RFB_H +#define RFB_H +/** + * @defgroup libvncserver_api LibVNCServer API Reference + * @{ + */ + +/** + * @file rfb.h + */ + +/* + * Copyright (C) 2005 Rohit Kumar , + * Johannes E. Schindelin + * Copyright (C) 2002 RealVNC Ltd. + * OSXvnc Copyright (C) 2001 Dan McGuirk . + * Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge. + * All Rights Reserved. + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This software 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 software; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ + +#if(defined __cplusplus) +extern "C" +{ +#endif + +#include +#include +#include +#include + +#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H +#include +#endif + +#ifdef __MINGW32__ +#undef SOCKET +#include +#endif + +#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +#include +#if 0 /* debugging */ +#define LOCK(mutex) (rfbLog("%s:%d LOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_lock(&(mutex))) +#define UNLOCK(mutex) (rfbLog("%s:%d UNLOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_unlock(&(mutex))) +#define MUTEX(mutex) pthread_mutex_t (mutex) +#define INIT_MUTEX(mutex) (rfbLog("%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_init(&(mutex),NULL)) +#define TINI_MUTEX(mutex) (rfbLog("%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex), pthread_mutex_destroy(&(mutex))) +#define TSIGNAL(cond) (rfbLog("%s:%d TSIGNAL(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_signal(&(cond))) +#define WAIT(cond,mutex) (rfbLog("%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex), pthread_cond_wait(&(cond),&(mutex))) +#define COND(cond) pthread_cond_t (cond) +#define INIT_COND(cond) (rfbLog("%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_init(&(cond),NULL)) +#define TINI_COND(cond) (rfbLog("%s:%d TINI_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_destroy(&(cond))) +#define IF_PTHREADS(x) x +#else +#if !NONETWORK +#define LOCK(mutex) pthread_mutex_lock(&(mutex)); +#define UNLOCK(mutex) pthread_mutex_unlock(&(mutex)); +#endif +#define MUTEX(mutex) pthread_mutex_t (mutex) +#define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL) +#define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex)) +#define TSIGNAL(cond) pthread_cond_signal(&(cond)) +#define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex)) +#define COND(cond) pthread_cond_t (cond) +#define INIT_COND(cond) pthread_cond_init(&(cond),NULL) +#define TINI_COND(cond) pthread_cond_destroy(&(cond)) +#define IF_PTHREADS(x) x +#endif +#else +#define LOCK(mutex) +#define UNLOCK(mutex) +#define MUTEX(mutex) +#define INIT_MUTEX(mutex) +#define TINI_MUTEX(mutex) +#define TSIGNAL(cond) +#define WAIT(cond,mutex) this_is_unsupported +#define COND(cond) +#define INIT_COND(cond) +#define TINI_COND(cond) +#define IF_PTHREADS(x) +#endif + +/* end of stuff for autoconf */ + +/* if you use pthreads, but don't define LIBVNCSERVER_HAVE_LIBPTHREAD, the structs + get all mixed up. So this gives a linker error reminding you to compile + the library and your application (at least the parts including rfb.h) + with the same support for pthreads. */ +#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +#ifdef LIBVNCSERVER_HAVE_LIBZ +#define rfbInitServer rfbInitServerWithPthreadsAndZRLE +#else +#define rfbInitServer rfbInitServerWithPthreadsButWithoutZRLE +#endif +#else +#ifdef LIBVNCSERVER_HAVE_LIBZ +#define rfbInitServer rfbInitServerWithoutPthreadsButWithZRLE +#else +#define rfbInitServer rfbInitServerWithoutPthreadsAndZRLE +#endif +#endif + +struct _rfbClientRec; +struct _rfbScreenInfo; +struct rfbCursor; + +enum rfbNewClientAction { + RFB_CLIENT_ACCEPT, + RFB_CLIENT_ON_HOLD, + RFB_CLIENT_REFUSE +}; + +enum rfbSocketState { + RFB_SOCKET_INIT, + RFB_SOCKET_READY, + RFB_SOCKET_SHUTDOWN +}; + +typedef void (*rfbKbdAddEventProcPtr) (rfbBool down, rfbKeySym keySym, struct _rfbClientRec* cl); +typedef void (*rfbKbdReleaseAllKeysProcPtr) (struct _rfbClientRec* cl); +typedef void (*rfbPtrAddEventProcPtr) (int buttonMask, int x, int y, struct _rfbClientRec* cl); +typedef void (*rfbSetXCutTextProcPtr) (char* str,int len, struct _rfbClientRec* cl); +typedef struct rfbCursor* (*rfbGetCursorProcPtr) (struct _rfbClientRec* pScreen); +typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl); +typedef rfbBool (*rfbPasswordCheckProcPtr)(struct _rfbClientRec* cl,const char* encryptedPassWord,int len); +typedef enum rfbNewClientAction (*rfbNewClientHookPtr)(struct _rfbClientRec* cl); +typedef void (*rfbDisplayHookPtr)(struct _rfbClientRec* cl); +typedef void (*rfbDisplayFinishedHookPtr)(struct _rfbClientRec* cl, int result); +/** support the capability to view the caps/num/scroll states of the X server */ +typedef int (*rfbGetKeyboardLedStateHookPtr)(struct _rfbScreenInfo* screen); +typedef rfbBool (*rfbXvpHookPtr)(struct _rfbClientRec* cl, uint8_t, uint8_t); +/** + * If x==1 and y==1 then set the whole display + * else find the window underneath x and y and set the framebuffer to the dimensions + * of that window + */ +typedef void (*rfbSetSingleWindowProcPtr) (struct _rfbClientRec* cl, int x, int y); +/** + * Status determines if the X11 server permits input from the local user + * status==0 or 1 + */ +typedef void (*rfbSetServerInputProcPtr) (struct _rfbClientRec* cl, int status); +/** + * Permit the server to allow or deny filetransfers. This is defaulted to deny + * It is called when a client initiates a connection to determine if it is permitted. + */ +typedef int (*rfbFileTransferPermitted) (struct _rfbClientRec* cl); +/** Handle the textchat messages */ +typedef void (*rfbSetTextChat) (struct _rfbClientRec* cl, int length, char *string); + +typedef struct { + uint32_t count; + rfbBool is16; /**< is the data format short? */ + union { + uint8_t* bytes; + uint16_t* shorts; + } data; /**< there have to be count*3 entries */ +} rfbColourMap; + +/** + * Security handling (RFB protocol version 3.7) + */ + +typedef struct _rfbSecurity { + uint8_t type; + void (*handler)(struct _rfbClientRec* cl); + struct _rfbSecurity* next; +} rfbSecurityHandler; + +/** + * Protocol extension handling. + */ + +typedef struct _rfbProtocolExtension { + /** returns FALSE if extension should be deactivated for client. + if newClient == NULL, it is always deactivated. */ + rfbBool (*newClient)(struct _rfbClientRec* client, void** data); + /** returns FALSE if extension should be deactivated for client. + if init == NULL, it stays activated. */ + rfbBool (*init)(struct _rfbClientRec* client, void* data); + /** if pseudoEncodings is not NULL, it contains a 0 terminated + list of the pseudo encodings handled by this extension. */ + int *pseudoEncodings; + /** returns TRUE if that pseudo encoding is handled by the extension. + encodingNumber==0 means "reset encodings". */ + rfbBool (*enablePseudoEncoding)(struct _rfbClientRec* client, + void** data, int encodingNumber); + /** returns TRUE if message was handled */ + rfbBool (*handleMessage)(struct _rfbClientRec* client, + void* data, + const rfbClientToServerMsg* message); + void (*close)(struct _rfbClientRec* client, void* data); + void (*usage)(void); + /** processArguments returns the number of handled arguments */ + int (*processArgument)(int argc, char *argv[]); + struct _rfbProtocolExtension* next; +} rfbProtocolExtension; + +typedef struct _rfbExtensionData { + rfbProtocolExtension* extension; + void* data; + struct _rfbExtensionData* next; +} rfbExtensionData; + +/** + * Per-screen (framebuffer) structure. There can be as many as you wish, + * each serving different clients. However, you have to call + * rfbProcessEvents for each of these. + */ + +typedef struct _rfbScreenInfo +{ + /** this structure has children that are scaled versions of this screen */ + struct _rfbScreenInfo *scaledScreenNext; + int scaledScreenRefCount; + + int width; + int paddedWidthInBytes; + int height; + int depth; + int bitsPerPixel; + int sizeInBytes; + + rfbPixel blackPixel; + rfbPixel whitePixel; + + /** + * some screen specific data can be put into a struct where screenData + * points to. You need this if you have more than one screen at the + * same time while using the same functions. + */ + void* screenData; + + /* additions by libvncserver */ + + rfbPixelFormat serverFormat; + rfbColourMap colourMap; /**< set this if rfbServerFormat.trueColour==FALSE */ + const char* desktopName; + char thisHost[255]; + + rfbBool autoPort; + int port; + SOCKET listenSock; + int maxSock; + int maxFd; +#ifdef __MINGW32__ + struct fd_set allFds; +#else + fd_set allFds; +#endif + + enum rfbSocketState socketState; + SOCKET inetdSock; + rfbBool inetdInitDone; + + int udpPort; + SOCKET udpSock; + struct _rfbClientRec* udpClient; + rfbBool udpSockConnected; + struct sockaddr_in udpRemoteAddr; + + int maxClientWait; + + /* http stuff */ + rfbBool httpInitDone; + rfbBool httpEnableProxyConnect; + int httpPort; + char* httpDir; + SOCKET httpListenSock; + SOCKET httpSock; + + rfbPasswordCheckProcPtr passwordCheck; + void* authPasswdData; + /** If rfbAuthPasswdData is given a list, this is the first + view only password. */ + int authPasswdFirstViewOnly; + + /** send only this many rectangles in one update */ + int maxRectsPerUpdate; + /** this is the amount of milliseconds to wait at least before sending + * an update. */ + int deferUpdateTime; +#ifdef TODELETE + char* screen; +#endif + rfbBool alwaysShared; + rfbBool neverShared; + rfbBool dontDisconnect; + struct _rfbClientRec* clientHead; + struct _rfbClientRec* pointerClient; /**< "Mutex" for pointer events */ + + + /* cursor */ + int cursorX, cursorY,underCursorBufferLen; + char* underCursorBuffer; + rfbBool dontConvertRichCursorToXCursor; + struct rfbCursor* cursor; + + /** + * the frameBuffer has to be supplied by the serving process. + * The buffer will not be freed by + */ + char* frameBuffer; + rfbKbdAddEventProcPtr kbdAddEvent; + rfbKbdReleaseAllKeysProcPtr kbdReleaseAllKeys; + rfbPtrAddEventProcPtr ptrAddEvent; + rfbSetXCutTextProcPtr setXCutText; + rfbGetCursorProcPtr getCursorPtr; + rfbSetTranslateFunctionProcPtr setTranslateFunction; + rfbSetSingleWindowProcPtr setSingleWindow; + rfbSetServerInputProcPtr setServerInput; + rfbFileTransferPermitted getFileTransferPermission; + rfbSetTextChat setTextChat; + + /** newClientHook is called just after a new client is created */ + rfbNewClientHookPtr newClientHook; + /** displayHook is called just before a frame buffer update */ + rfbDisplayHookPtr displayHook; + + /** These hooks are called to pass keyboard state back to the client */ + rfbGetKeyboardLedStateHookPtr getKeyboardLedStateHook; + +#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + MUTEX(cursorMutex); + rfbBool backgroundLoop; +#endif + + /** if TRUE, an ignoring signal handler is installed for SIGPIPE */ + rfbBool ignoreSIGPIPE; + + /** if not zero, only a slice of this height is processed every time + * an update should be sent. This should make working on a slow + * link more interactive. */ + int progressiveSliceHeight; + + in_addr_t listenInterface; + int deferPtrUpdateTime; + + /** handle as many input events as possible (default off) */ + rfbBool handleEventsEagerly; + + /** rfbEncodingServerIdentity */ + char *versionString; + + /** What does the server tell the new clients which version it supports */ + int protocolMajorVersion; + int protocolMinorVersion; + + /** command line authorization of file transfers */ + rfbBool permitFileTransfer; + + /** displayFinishedHook is called just after a frame buffer update */ + rfbDisplayFinishedHookPtr displayFinishedHook; + /** xvpHook is called to handle an xvp client message */ + rfbXvpHookPtr xvpHook; +} rfbScreenInfo, *rfbScreenInfoPtr; + + +/** + * rfbTranslateFnType is the type of translation functions. + */ + +typedef void (*rfbTranslateFnType)(char *table, rfbPixelFormat *in, + rfbPixelFormat *out, + char *iptr, char *optr, + int bytesBetweenInputLines, + int width, int height); + + +/* region stuff */ + +struct sraRegion; +typedef struct sraRegion* sraRegionPtr; + +/* + * Per-client structure. + */ + +typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl); + +typedef struct _rfbFileTransferData { + int fd; + int compressionEnabled; + int fileSize; + int numPackets; + int receiving; + int sending; +} rfbFileTransferData; + + +typedef struct _rfbStatList { + uint32_t type; + uint32_t sentCount; + uint32_t bytesSent; + uint32_t bytesSentIfRaw; + uint32_t rcvdCount; + uint32_t bytesRcvd; + uint32_t bytesRcvdIfRaw; + struct _rfbStatList *Next; +} rfbStatList; + +typedef struct _rfbClientRec { + + /** back pointer to the screen */ + rfbScreenInfoPtr screen; + + /** points to a scaled version of the screen buffer in cl->scaledScreenList */ + rfbScreenInfoPtr scaledScreen; + /** how did the client tell us it wanted the screen changed? Ultra style or palm style? */ + rfbBool PalmVNC; + + + /** private data. You should put any application client specific data + * into a struct and let clientData point to it. Don't forget to + * free the struct via clientGoneHook! + * + * This is useful if the IO functions have to behave client specific. + */ + void* clientData; + ClientGoneHookPtr clientGoneHook; + + SOCKET sock; + char *host; + + /* RFB protocol minor version number */ + int protocolMajorVersion; + int protocolMinorVersion; + +#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + pthread_t client_thread; +#endif + /** Possible client states: */ + enum { + RFB_PROTOCOL_VERSION, /**< establishing protocol version */ + RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */ + RFB_AUTHENTICATION, /**< authenticating */ + RFB_INITIALISATION, /**< sending initialisation messages */ + RFB_NORMAL /**< normal protocol messages */ + } state; + + rfbBool reverseConnection; + rfbBool onHold; + rfbBool readyForSetColourMapEntries; + rfbBool useCopyRect; + int preferredEncoding; + int correMaxWidth, correMaxHeight; + + rfbBool viewOnly; + + /* The following member is only used during VNC authentication */ + uint8_t authChallenge[CHALLENGESIZE]; + + /* The following members represent the update needed to get the client's + framebuffer from its present state to the current state of our + framebuffer. + + If the client does not accept CopyRect encoding then the update is + simply represented as the region of the screen which has been modified + (modifiedRegion). + + If the client does accept CopyRect encoding, then the update consists of + two parts. First we have a single copy from one region of the screen to + another (the destination of the copy is copyRegion), and second we have + the region of the screen which has been modified in some other way + (modifiedRegion). + + Although the copy is of a single region, this region may have many + rectangles. When sending an update, the copyRegion is always sent + before the modifiedRegion. This is because the modifiedRegion may + overlap parts of the screen which are in the source of the copy. + + In fact during normal processing, the modifiedRegion may even overlap + the destination copyRegion. Just before an update is sent we remove + from the copyRegion anything in the modifiedRegion. */ + + sraRegionPtr copyRegion; /**< the destination region of the copy */ + int copyDX, copyDY; /**< the translation by which the copy happens */ + + sraRegionPtr modifiedRegion; + + /** As part of the FramebufferUpdateRequest, a client can express interest + in a subrectangle of the whole framebuffer. This is stored in the + requestedRegion member. In the normal case this is the whole + framebuffer if the client is ready, empty if it's not. */ + + sraRegionPtr requestedRegion; + + /** The following member represents the state of the "deferred update" timer + - when the framebuffer is modified and the client is ready, in most + cases it is more efficient to defer sending the update by a few + milliseconds so that several changes to the framebuffer can be combined + into a single update. */ + + struct timeval startDeferring; + struct timeval startPtrDeferring; + int lastPtrX; + int lastPtrY; + int lastPtrButtons; + + /** translateFn points to the translation function which is used to copy + and translate a rectangle from the framebuffer to an output buffer. */ + + rfbTranslateFnType translateFn; + char *translateLookupTable; + rfbPixelFormat format; + + /** + * UPDATE_BUF_SIZE must be big enough to send at least one whole line of the + * framebuffer. So for a max screen width of say 2K with 32-bit pixels this + * means 8K minimum. + */ + +#define UPDATE_BUF_SIZE 30000 + + char updateBuf[UPDATE_BUF_SIZE]; + int ublen; + + /* statistics */ + struct _rfbStatList *statEncList; + struct _rfbStatList *statMsgList; + int rawBytesEquivalent; + int bytesSent; + +#ifdef LIBVNCSERVER_HAVE_LIBZ + /* zlib encoding -- necessary compression state info per client */ + + struct z_stream_s compStream; + rfbBool compStreamInited; + uint32_t zlibCompressLevel; + /** the quality level is also used by ZYWRLE */ + int tightQualityLevel; + +#ifdef LIBVNCSERVER_HAVE_LIBJPEG + /* tight encoding -- preserve zlib streams' state for each client */ + z_stream zsStruct[4]; + rfbBool zsActive[4]; + int zsLevel[4]; + int tightCompressLevel; +#endif +#endif + + /* Ultra Encoding support */ + rfbBool compStreamInitedLZO; + char *lzoWrkMem; + + rfbFileTransferData fileTransfer; + + int lastKeyboardLedState; /**< keep track of last value so we can send *change* events */ + rfbBool enableSupportedMessages; /**< client supports SupportedMessages encoding */ + rfbBool enableSupportedEncodings; /**< client supports SupportedEncodings encoding */ + rfbBool enableServerIdentity; /**< client supports ServerIdentity encoding */ + rfbBool enableKeyboardLedState; /**< client supports KeyboardState encoding */ + rfbBool enableLastRectEncoding; /**< client supports LastRect encoding */ + rfbBool enableCursorShapeUpdates; /**< client supports cursor shape updates */ + rfbBool enableCursorPosUpdates; /**< client supports cursor position updates */ + rfbBool useRichCursorEncoding; /**< rfbEncodingRichCursor is preferred */ + rfbBool cursorWasChanged; /**< cursor shape update should be sent */ + rfbBool cursorWasMoved; /**< cursor position update should be sent */ + int cursorX,cursorY; /**< the coordinates of the cursor, + if enableCursorShapeUpdates = FALSE */ + + rfbBool useNewFBSize; /**< client supports NewFBSize encoding */ + rfbBool newFBSizePending; /**< framebuffer size was changed */ + + struct _rfbClientRec *prev; + struct _rfbClientRec *next; + +#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + /** whenever a client is referenced, the refCount has to be incremented + and afterwards decremented, so that the client is not cleaned up + while being referenced. + Use the functions rfbIncrClientRef(cl) and rfbDecrClientRef(cl); + */ + int refCount; + MUTEX(refCountMutex); + COND(deleteCond); + + MUTEX(outputMutex); + MUTEX(updateMutex); + COND(updateCond); +#endif + +#ifdef LIBVNCSERVER_HAVE_LIBZ + void* zrleData; + int zywrleLevel; + int zywrleBuf[rfbZRLETileWidth * rfbZRLETileHeight]; +#endif + + /** if progressive updating is on, this variable holds the current + * y coordinate of the progressive slice. */ + int progressiveSliceY; + + rfbExtensionData* extensions; + + /** for threaded zrle */ + char *zrleBeforeBuf; + void *paletteHelper; + + /** for thread safety for rfbSendFBUpdate() */ +#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +#define LIBVNCSERVER_SEND_MUTEX + MUTEX(sendMutex); +#endif + + /* buffers to hold pixel data before and after encoding. + per-client for thread safety */ + char *beforeEncBuf; + int beforeEncBufSize; + char *afterEncBuf; + int afterEncBufSize; + int afterEncBufLen; +} rfbClientRec, *rfbClientPtr; + +/** + * This macro is used to test whether there is a framebuffer update needing to + * be sent to the client. + */ + +#define FB_UPDATE_PENDING(cl) \ + (((cl)->enableCursorShapeUpdates && (cl)->cursorWasChanged) || \ + (((cl)->enableCursorShapeUpdates == FALSE && \ + ((cl)->cursorX != (cl)->screen->cursorX || \ + (cl)->cursorY != (cl)->screen->cursorY))) || \ + ((cl)->useNewFBSize && (cl)->newFBSizePending) || \ + ((cl)->enableCursorPosUpdates && (cl)->cursorWasMoved) || \ + !sraRgnEmpty((cl)->copyRegion) || !sraRgnEmpty((cl)->modifiedRegion)) + +/* + * Macros for endian swapping. + */ + +#define Swap16(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) + +#define Swap24(l) ((((l) & 0xff) << 16) | (((l) >> 16) & 0xff) | \ + (((l) & 0x00ff00))) + +#define Swap32(l) (((l) >> 24) | \ + (((l) & 0x00ff0000) >> 8) | \ + (((l) & 0x0000ff00) << 8) | \ + ((l) << 24)) + + +extern char rfbEndianTest; + +#define Swap16IfLE(s) (rfbEndianTest ? Swap16(s) : (s)) +#define Swap24IfLE(l) (rfbEndianTest ? Swap24(l) : (l)) +#define Swap32IfLE(l) (rfbEndianTest ? Swap32(l) : (l)) + +/* UltraVNC uses some windows structures unmodified, so the viewer expects LittleEndian Data */ +#define Swap16IfBE(s) (rfbEndianTest ? (s) : Swap16(s)) +#define Swap24IfBE(l) (rfbEndianTest ? (l) : Swap24(l)) +#define Swap32IfBE(l) (rfbEndianTest ? (l) : Swap32(l)) + +/* sockets.c */ + +extern int rfbMaxClientWait; + +extern void rfbInitSockets(rfbScreenInfoPtr rfbScreen); +extern void rfbShutdownSockets(rfbScreenInfoPtr rfbScreen); +extern void rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen); +extern void rfbCloseClient(rfbClientPtr cl); +extern int rfbReadExact(rfbClientPtr cl, char *buf, int len); +extern int rfbReadExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout); +extern int rfbWriteExact(rfbClientPtr cl, const char *buf, int len); +extern int rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec); +extern int rfbConnect(rfbScreenInfoPtr rfbScreen, char* host, int port); +extern int rfbConnectToTcpAddr(char* host, int port); +extern int rfbListenOnTCPPort(int port, in_addr_t iface); +extern int rfbListenOnUDPPort(int port, in_addr_t iface); +extern int rfbStringToAddr(char* string,in_addr_t* addr); +extern rfbBool rfbSetNonBlocking(int sock); + +/* rfbserver.c */ + +/* Routines to iterate over the client list in a thread-safe way. + Only a single iterator can be in use at a time process-wide. */ +typedef struct rfbClientIterator *rfbClientIteratorPtr; + +extern void rfbClientListInit(rfbScreenInfoPtr rfbScreen); +extern rfbClientIteratorPtr rfbGetClientIterator(rfbScreenInfoPtr rfbScreen); +extern rfbClientPtr rfbClientIteratorNext(rfbClientIteratorPtr iterator); +extern void rfbReleaseClientIterator(rfbClientIteratorPtr iterator); +extern void rfbIncrClientRef(rfbClientPtr cl); +extern void rfbDecrClientRef(rfbClientPtr cl); + +extern void rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,int sock); +extern rfbClientPtr rfbNewClient(rfbScreenInfoPtr rfbScreen,int sock); +extern rfbClientPtr rfbNewUDPClient(rfbScreenInfoPtr rfbScreen); +extern rfbClientPtr rfbReverseConnection(rfbScreenInfoPtr rfbScreen,char *host, int port); +extern void rfbClientConnectionGone(rfbClientPtr cl); +extern void rfbProcessClientMessage(rfbClientPtr cl); +extern void rfbClientConnFailed(rfbClientPtr cl, char *reason); +extern void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,int sock); +extern void rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen); +extern rfbBool rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr updateRegion); +extern rfbBool rfbSendRectEncodingRaw(rfbClientPtr cl, int x,int y,int w,int h); +extern rfbBool rfbSendUpdateBuf(rfbClientPtr cl); +extern void rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len); +extern rfbBool rfbSendCopyRegion(rfbClientPtr cl,sraRegionPtr reg,int dx,int dy); +extern rfbBool rfbSendLastRectMarker(rfbClientPtr cl); +extern rfbBool rfbSendNewFBSize(rfbClientPtr cl, int w, int h); +extern rfbBool rfbSendSetColourMapEntries(rfbClientPtr cl, int firstColour, int nColours); +extern void rfbSendBell(rfbScreenInfoPtr rfbScreen); + +extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length); +extern rfbBool rfbSendFileTransferChunk(rfbClientPtr cl); +extern rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer); +extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer); +extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length); +extern rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length); + +void rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len); + +/* translate.c */ + +extern rfbBool rfbEconomicTranslate; + +extern void rfbTranslateNone(char *table, rfbPixelFormat *in, + rfbPixelFormat *out, + char *iptr, char *optr, + int bytesBetweenInputLines, + int width, int height); +extern rfbBool rfbSetTranslateFunction(rfbClientPtr cl); +extern rfbBool rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours); +extern void rfbSetClientColourMaps(rfbScreenInfoPtr rfbScreen, int firstColour, int nColours); + +/* httpd.c */ + +extern void rfbHttpInitSockets(rfbScreenInfoPtr rfbScreen); +extern void rfbHttpShutdownSockets(rfbScreenInfoPtr rfbScreen); +extern void rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen); + + + +/* auth.c */ + +extern void rfbAuthNewClient(rfbClientPtr cl); +extern void rfbProcessClientSecurityType(rfbClientPtr cl); +extern void rfbAuthProcessClientMessage(rfbClientPtr cl); +extern void rfbRegisterSecurityHandler(rfbSecurityHandler* handler); +extern void rfbUnregisterSecurityHandler(rfbSecurityHandler* handler); + +/* rre.c */ + +extern rfbBool rfbSendRectEncodingRRE(rfbClientPtr cl, int x,int y,int w,int h); + + +/* corre.c */ + +extern rfbBool rfbSendRectEncodingCoRRE(rfbClientPtr cl, int x,int y,int w,int h); + + +/* hextile.c */ + +extern rfbBool rfbSendRectEncodingHextile(rfbClientPtr cl, int x, int y, int w, + int h); + +/* ultra.c */ + +/* Set maximum ultra rectangle size in pixels. Always allow at least + * two scan lines. + */ +#define ULTRA_MAX_RECT_SIZE (128*256) +#define ULTRA_MAX_SIZE(min) ((( min * 2 ) > ULTRA_MAX_RECT_SIZE ) ? \ + ( min * 2 ) : ULTRA_MAX_RECT_SIZE ) + +extern rfbBool rfbSendRectEncodingUltra(rfbClientPtr cl, int x,int y,int w,int h); + + +#ifdef LIBVNCSERVER_HAVE_LIBZ +/* zlib.c */ + +/** Minimum zlib rectangle size in bytes. Anything smaller will + * not compress well due to overhead. + */ +#define VNC_ENCODE_ZLIB_MIN_COMP_SIZE (17) + +/* Set maximum zlib rectangle size in pixels. Always allow at least + * two scan lines. + */ +#define ZLIB_MAX_RECT_SIZE (128*256) +#define ZLIB_MAX_SIZE(min) ((( min * 2 ) > ZLIB_MAX_RECT_SIZE ) ? \ + ( min * 2 ) : ZLIB_MAX_RECT_SIZE ) + +extern rfbBool rfbSendRectEncodingZlib(rfbClientPtr cl, int x, int y, int w, + int h); + +#ifdef LIBVNCSERVER_HAVE_LIBJPEG +/* tight.c */ + +#define TIGHT_DEFAULT_COMPRESSION 6 + +extern rfbBool rfbTightDisableGradient; + +extern int rfbNumCodedRectsTight(rfbClientPtr cl, int x,int y,int w,int h); +extern rfbBool rfbSendRectEncodingTight(rfbClientPtr cl, int x,int y,int w,int h); + +#endif +#endif + + +/* cursor.c */ + +typedef struct rfbCursor { + /** set this to true if LibVNCServer has to free this cursor */ + rfbBool cleanup, cleanupSource, cleanupMask, cleanupRichSource; + unsigned char *source; /**< points to bits */ + unsigned char *mask; /**< points to bits */ + unsigned short width, height, xhot, yhot; /**< metrics */ + unsigned short foreRed, foreGreen, foreBlue; /**< device-independent colour */ + unsigned short backRed, backGreen, backBlue; /**< device-independent colour */ + unsigned char *richSource; /**< source bytes for a rich cursor */ + unsigned char *alphaSource; /**< source for alpha blending info */ + rfbBool alphaPreMultiplied; /**< if richSource already has alpha applied */ +} rfbCursor, *rfbCursorPtr; +extern unsigned char rfbReverseByte[0x100]; + +extern rfbBool rfbSendCursorShape(rfbClientPtr cl/*, rfbScreenInfoPtr pScreen*/); +extern rfbBool rfbSendCursorPos(rfbClientPtr cl); +extern void rfbConvertLSBCursorBitmapOrMask(int width,int height,unsigned char* bitmap); +extern rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskString); +extern char* rfbMakeMaskForXCursor(int width,int height,char* cursorString); +extern char* rfbMakeMaskFromAlphaSource(int width,int height,unsigned char* alphaSource); +extern void rfbMakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor); +extern void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor); +extern void rfbFreeCursor(rfbCursorPtr cursor); +extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c); + +/** cursor handling for the pointer */ +extern void rfbDefaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl); + +/* zrle.c */ +#ifdef LIBVNCSERVER_HAVE_LIBZ +extern rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w,int h); +#endif + +/* stats.c */ + +extern void rfbResetStats(rfbClientPtr cl); +extern void rfbPrintStats(rfbClientPtr cl); + +/* font.c */ + +typedef struct rfbFontData { + unsigned char* data; + /** + metaData is a 256*5 array: + for each character + (offset,width,height,x,y) + */ + int* metaData; +} rfbFontData,* rfbFontDataPtr; + +int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,rfbPixel colour); +void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,rfbPixel colour); +/** if colour==backColour, background is transparent */ +int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour); +void rfbDrawStringWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour); +int rfbWidthOfString(rfbFontDataPtr font,const char* string); +int rfbWidthOfChar(rfbFontDataPtr font,unsigned char c); +void rfbFontBBox(rfbFontDataPtr font,unsigned char c,int* x1,int* y1,int* x2,int* y2); +/** this returns the smallest box enclosing any character of font. */ +void rfbWholeFontBBox(rfbFontDataPtr font,int *x1, int *y1, int *x2, int *y2); + +/** dynamically load a linux console font (4096 bytes, 256 glyphs a 8x16 */ +rfbFontDataPtr rfbLoadConsoleFont(char *filename); +/** free a dynamically loaded font */ +void rfbFreeFont(rfbFontDataPtr font); + +/* draw.c */ + +void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col); +void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,rfbPixel col); +void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col); + +/* selbox.c */ + +/** this opens a modal select box. list is an array of strings, the end marked + with a NULL. + It returns the index in the list or -1 if cancelled or something else + wasn't kosher. */ +typedef void (*SelectionChangedHookPtr)(int _index); +extern int rfbSelectBox(rfbScreenInfoPtr rfbScreen, + rfbFontDataPtr font, char** list, + int x1, int y1, int x2, int y2, + rfbPixel foreColour, rfbPixel backColour, + int border,SelectionChangedHookPtr selChangedHook); + +/* cargs.c */ + +extern void rfbUsage(void); +extern void rfbPurgeArguments(int* argc,int* position,int count,char *argv[]); +extern rfbBool rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[]); +extern rfbBool rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[]); + +/* main.c */ + +extern void rfbLogEnable(int enabled); +typedef void (*rfbLogProc)(const char *format, ...); +extern rfbLogProc rfbLog, rfbErr; +extern void rfbLogPerror(const char *str); + +void rfbScheduleCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy); +void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy); + +void rfbDoCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy); +void rfbDoCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy); + +void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2); +void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion); +void rfbDoNothingWithClient(rfbClientPtr cl); +enum rfbNewClientAction defaultNewClientHook(rfbClientPtr cl); +void rfbRegisterProtocolExtension(rfbProtocolExtension* extension); +void rfbUnregisterProtocolExtension(rfbProtocolExtension* extension); +struct _rfbProtocolExtension* rfbGetExtensionIterator(); +void rfbReleaseExtensionIterator(); +rfbBool rfbEnableExtension(rfbClientPtr cl, rfbProtocolExtension* extension, + void* data); +rfbBool rfbDisableExtension(rfbClientPtr cl, rfbProtocolExtension* extension); +void* rfbGetExtensionClientData(rfbClientPtr cl, rfbProtocolExtension* extension); + +/** to check against plain passwords */ +rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len); + +/* functions to make a vnc server */ +extern rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv, + int width,int height,int bitsPerSample,int samplesPerPixel, + int bytesPerPixel); +extern void rfbInitServer(rfbScreenInfoPtr rfbScreen); +extern void rfbShutdownServer(rfbScreenInfoPtr rfbScreen,rfbBool disconnectClients); +extern void rfbNewFramebuffer(rfbScreenInfoPtr rfbScreen,char *framebuffer, + int width,int height, int bitsPerSample,int samplesPerPixel, + int bytesPerPixel); + +extern void rfbScreenCleanup(rfbScreenInfoPtr screenInfo); +extern void rfbSetServerVersionIdentity(rfbScreenInfoPtr screen, char *fmt, ...); + +/* functions to accept/refuse a client that has been put on hold + by a NewClientHookPtr function. Must not be called in other + situations. */ +extern void rfbStartOnHoldClient(rfbClientPtr cl); +extern void rfbRefuseOnHoldClient(rfbClientPtr cl); + +/* call one of these two functions to service the vnc clients. + usec are the microseconds the select on the fds waits. + if you are using the event loop, set this to some value > 0, so the + server doesn't get a high load just by listening. + rfbProcessEvents() returns TRUE if an update was pending. */ + +extern void rfbRunEventLoop(rfbScreenInfoPtr screenInfo, long usec, rfbBool runInBackground); +extern rfbBool rfbProcessEvents(rfbScreenInfoPtr screenInfo,long usec); +extern rfbBool rfbIsActive(rfbScreenInfoPtr screenInfo); + +/* TightVNC file transfer extension */ +void rfbRegisterTightVNCFileTransferExtension(); +void rfbUnregisterTightVNCFileTransferExtension(); + +/* Statistics */ +extern char *messageNameServer2Client(uint32_t type, char *buf, int len); +extern char *messageNameClient2Server(uint32_t type, char *buf, int len); +extern char *encodingName(uint32_t enc, char *buf, int len); + +extern rfbStatList *rfbStatLookupEncoding(rfbClientPtr cl, uint32_t type); +extern rfbStatList *rfbStatLookupMessage(rfbClientPtr cl, uint32_t type); + +/* Each call to rfbStatRecord* adds one to the rect count for that type */ +extern void rfbStatRecordEncodingSent(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +extern void rfbStatRecordEncodingSentAdd(rfbClientPtr cl, uint32_t type, int byteCount); /* Specifically for tight encoding */ +extern void rfbStatRecordEncodingRcvd(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +extern void rfbStatRecordMessageSent(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +extern void rfbStatRecordMessageRcvd(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +extern void rfbResetStats(rfbClientPtr cl); +extern void rfbPrintStats(rfbClientPtr cl); + +extern int rfbStatGetSentBytes(rfbClientPtr cl); +extern int rfbStatGetSentBytesIfRaw(rfbClientPtr cl); +extern int rfbStatGetRcvdBytes(rfbClientPtr cl); +extern int rfbStatGetRcvdBytesIfRaw(rfbClientPtr cl); +extern int rfbStatGetMessageCountSent(rfbClientPtr cl, uint32_t type); +extern int rfbStatGetMessageCountRcvd(rfbClientPtr cl, uint32_t type); +extern int rfbStatGetEncodingCountSent(rfbClientPtr cl, uint32_t type); +extern int rfbStatGetEncodingCountRcvd(rfbClientPtr cl, uint32_t type); + +/** Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/ +extern void rfbSetProtocolVersion(rfbScreenInfoPtr rfbScreen, int major_, int minor_); + +/** send a TextChat message to a client */ +extern rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer); + + + + +#if(defined __cplusplus) +} +#endif + +/** + * @} + */ + + +/** + @page libvncserver_doc LibVNCServer Documentation + @section create_server Creating a server instance + To make a server, you just have to initialise a server structure using the + function rfbGetScreen(), like + @code + rfbScreenInfoPtr screen = + rfbGetScreen(argc,argv,screenwidth,screenheight,8,3,bpp); + @endcode + where byte per pixel should be 1, 2 or 4. If performance doesn't matter, + you may try bpp=3 (internally one cannot use native data types in this + case; if you want to use this, look at pnmshow24.c). + + You then can set hooks and io functions (see @ref making_it_interactive) or other + options (see @ref server_options). + + And you allocate the frame buffer like this: + @code + screen->frameBuffer = (char*)malloc(screenwidth*screenheight*bpp); + @endcode + After that, you initialize the server, like + @code + rfbInitServer(screen); + @endcode + You can use a blocking event loop, a background (pthread based) event loop, + or implement your own using the rfbProcessEvents() function. + + @subsection server_options Optional Server Features + + These options have to be set between rfbGetScreen() and rfbInitServer(). + + If you already have a socket to talk to, just set rfbScreenInfo::inetdSock + (originally this is for inetd handling, but why not use it for your purpose?). + + To also start an HTTP server (running on port 5800+display_number), you have + to set rfbScreenInfo::httpDir to a directory containing vncviewer.jar and + index.vnc (like the included "classes" directory). + + @section making_it_interactive Making it interactive + + Whenever you draw something, you have to call + @code + rfbMarkRectAsModified(screen,x1,y1,x2,y2). + @endcode + This tells LibVNCServer to send updates to all connected clients. + + There exist the following IO functions as members of rfbScreen: + rfbScreenInfo::kbdAddEvent(), rfbScreenInfo::kbdReleaseAllKeys(), rfbScreenInfo::ptrAddEvent() and rfbScreenInfo::setXCutText() + + rfbScreenInfo::kbdAddEvent() + is called when a key is pressed. + rfbScreenInfo::kbdReleaseAllKeys() + is not called at all (maybe in the future). + rfbScreenInfo::ptrAddEvent() + is called when the mouse moves or a button is pressed. + WARNING: if you want to have proper cursor handling, call + rfbDefaultPtrAddEvent() + in your own function. This sets the coordinates of the cursor. + rfbScreenInfo::setXCutText() + is called when the selection changes. + + There are only two hooks: + rfbScreenInfo::newClientHook() + is called when a new client has connected. + rfbScreenInfo::displayHook() + is called just before a frame buffer update is sent. + + You can also override the following methods: + rfbScreenInfo::getCursorPtr() + This could be used to make an animated cursor (if you really want ...) + rfbScreenInfo::setTranslateFunction() + If you insist on colour maps or something more obscure, you have to + implement this. Default is a trueColour mapping. + + @section cursor_handling Cursor handling + + The screen holds a pointer + rfbScreenInfo::cursor + to the current cursor. Whenever you set it, remember that any dynamically + created cursor (like return value from rfbMakeXCursor()) is not free'd! + + The rfbCursor structure consists mainly of a mask and a source. The rfbCursor::mask + describes, which pixels are drawn for the cursor (a cursor needn't be + rectangular). The rfbCursor::source describes, which colour those pixels should have. + + The standard is an XCursor: a cursor with a foreground and a background + colour (stored in backRed,backGreen,backBlue and the same for foreground + in a range from 0-0xffff). Therefore, the arrays "mask" and "source" + contain pixels as single bits stored in bytes in MSB order. The rows are + padded, such that each row begins with a new byte (i.e. a 10x4 + cursor's mask has 2x4 bytes, because 2 bytes are needed to hold 10 bits). + + It is however very easy to make a cursor like this: + @code + char* cur=" " + " xx " + " x " + " "; + char* mask="xxxx" + "xxxx" + "xxxx" + "xxx "; + rfbCursorPtr c=rfbMakeXCursor(4,4,cur,mask); + @endcode + You can even set rfbCursor::mask to NULL in this call and LibVNCServer will calculate + a mask for you (dynamically, so you have to free it yourself). + + There is also an array named rfbCursor::richSource for colourful cursors. They have + the same format as the frameBuffer (i.e. if the server is 32 bit, + a 10x4 cursor has 4x10x4 bytes). + + @section screen_client_difference What is the difference between rfbScreenInfoPtr and rfbClientPtr? + + The rfbScreenInfoPtr is a pointer to a rfbScreenInfo structure, which + holds information about the server, like pixel format, io functions, + frame buffer etc. The rfbClientPtr is a pointer to an rfbClientRec structure, which holds + information about a client, like pixel format, socket of the + connection, etc. A server can have several clients, but needn't have any. So, if you + have a server and three clients are connected, you have one instance + of a rfbScreenInfo and three instances of rfbClientRec's. + + The rfbClientRec structure holds a member rfbClientRec::screen which points to the server. + So, to access the server from the client structure, you use client->screen. + + To access all clients from a server be sure to use the provided iterator + rfbGetClientIterator() + with + rfbClientIteratorNext() + and + rfbReleaseClientIterator() + to prevent thread clashes. + + @section example_code Example Code + + There are two documented examples included: + - example.c, a shared scribble sheet + - pnmshow.c, a program to show PNMs (pictures) over the net. + + The examples are not too well documented, but easy straight forward and a + good starting point. + + Try example.c: it outputs on which port it listens (default: 5900), so it is + display 0. To view, call @code vncviewer :0 @endcode + You should see a sheet with a gradient and "Hello World!" written on it. Try + to paint something. Note that everytime you click, there is some bigger blot, + whereas when you drag the mouse while clicked you draw a line. The size of the + blot depends on the mouse button you click. Open a second vncviewer with + the same parameters and watch it as you paint in the other window. This also + works over internet. You just have to know either the name or the IP of your + machine. Then it is @code vncviewer machine.where.example.runs.com:0 @endcode + or similar for the remote client. Now you are ready to type something. Be sure + that your mouse sits still, because everytime the mouse moves, the cursor is + reset to the position of the pointer! If you are done with that demo, press + the down or up arrows. If your viewer supports it, then the dimensions of the + sheet change. Just press Escape in the viewer. Note that the server still + runs, even if you closed both windows. When you reconnect now, everything you + painted and wrote is still there. You can press "Page Up" for a blank page. + + The demo pnmshow.c is much simpler: you either provide a filename as argument + or pipe a file through stdin. Note that the file has to be a raw pnm/ppm file, + i.e. a truecolour graphics. Only the Escape key is implemented. This may be + the best starting point if you want to learn how to use LibVNCServer. You + are confronted with the fact that the bytes per pixel can only be 8, 16 or 32. +*/ + +#endif diff --git a/remmina-plugins/libvncserver/rfb/rfbclient.h b/remmina-plugins/libvncserver/rfb/rfbclient.h index f3bd11d650..9b8f3c374a 100644 --- a/remmina-plugins/libvncserver/rfb/rfbclient.h +++ b/remmina-plugins/libvncserver/rfb/rfbclient.h @@ -192,9 +192,6 @@ typedef struct _rfbClient { rfbPixelFormat format; rfbServerInitMsg si; - /* listen.c */ - int listenSock; - /* sockets.c */ #define RFB_BUF_SIZE 8192 char buf[RFB_BUF_SIZE]; @@ -273,7 +270,6 @@ typedef struct _rfbClient { SoftCursorLockAreaProc SoftCursorLockArea; SoftCursorUnlockScreenProc SoftCursorUnlockScreen; GotFrameBufferUpdateProc GotFrameBufferUpdate; - FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate; /** the pointer returned by GetPassword will be freed after use! */ GetPasswordProc GetPassword; MallocFrameBufferProc MallocFrameBuffer; @@ -325,6 +321,11 @@ typedef struct _rfbClient { /** hook to handle xvp server messages */ HandleXvpMsgProc HandleXvpMsg; + + /* listen.c */ + int listenSock; + + FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate; } rfbClient; /* cursor.c */ diff --git a/remmina-plugins/libvncserver/rfb/rfbconfig.h.cmake b/remmina-plugins/libvncserver/rfb/rfbconfig.h.cmake new file mode 100644 index 0000000000..de898fcfa0 --- /dev/null +++ b/remmina-plugins/libvncserver/rfb/rfbconfig.h.cmake @@ -0,0 +1,95 @@ +#ifndef _RFB_RFBCONFIG_H +#cmakedefine _RFB_RFBCONFIG_H 1 + +/* rfb/rfbconfig.h. Generated automatically by cmake. */ + +/* Enable 24 bit per pixel in native framebuffer */ +#cmakedefine LIBVNCSERVER_ALLOW24BPP 1 + +/* work around when write() returns ENOENT but does not mean it */ +#cmakedefine LIBVNCSERVER_ENOENT_WORKAROUND 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#cmakedefine LIBVNCSERVER_HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `jpeg' library (-ljpeg). */ +#cmakedefine LIBVNCSERVER_HAVE_LIBJPEG 1 + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#cmakedefine LIBVNCSERVER_HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the `z' library (-lz). */ +#cmakedefine LIBVNCSERVER_HAVE_LIBZ 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#cmakedefine LIBVNCSERVER_HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_UNISTD_H 1 + +/* Need a typedef for in_addr_t */ +#cmakedefine LIBVNCSERVER_NEED_INADDR_T 1 + +/* Define to the full name and version of this package. */ +#define LIBVNCSERVER_PACKAGE_STRING "@FULL_PACKAGE_NAME@ @PACKAGE_VERSION@" + +/* Define to the version of this package. */ +#define LIBVNCSERVER_PACKAGE_VERSION "@PACKAGE_VERSION@" + +/* Define to 1 if libgcrypt is present */ +#cmakedefine LIBVNCSERVER_WITH_CLIENT_GCRYPT 1 + +/* Define to 1 if GnuTLS is present */ +#cmakedefine LIBVNCSERVER_WITH_CLIENT_TLS 1 + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +//#cmakedefine const @CMAKE_CONST@ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +//#ifndef __cplusplus +//#cmakedefine inline @CMAKE_INLINE@ +//#endif + +/* Define to `int' if does not define. */ +#cmakedefine HAVE_LIBVNCSERVER_PID_T 1 +#ifndef HAVE_LIBVNCSERVER_PID_T +typedef int pid_t; +#endif + +/* The type for size_t */ +#cmakedefine HAVE_LIBVNCSERVER_SIZE_T 1 +#ifndef HAVE_LIBVNCSERVER_SIZE_T +typedef int size_t; +#endif + +/* The type for socklen */ +#cmakedefine HAVE_LIBVNCSERVER_SOCKLEN_T 1 +#ifndef HAVE_LIBVNCSERVER_SOCKLEN_T +typedef int socklen_t; +#endif + +/* once: _RFB_RFBCONFIG_H */ +#endif diff --git a/remmina-plugins/libvncserver/rfb/rfbint.h b/remmina-plugins/libvncserver/rfb/rfbint.h deleted file mode 100644 index 232f167197..0000000000 --- a/remmina-plugins/libvncserver/rfb/rfbint.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _RFB_RFBINT_H -#define _RFB_RFBINT_H 1 -#ifndef _GENERATED_STDINT_H -#define _GENERATED_STDINT_H "LibVNCServer 0.9.8" -/* generated using a gnu compiler version gcc (Debian 4.4.5-8) 4.4.5 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ - -#include - - -/* system headers have good uint64_t */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -#endif - - /* once */ -#endif -#endif diff --git a/remmina-plugins/libvncserver/rfb/rfbint.h.cmake b/remmina-plugins/libvncserver/rfb/rfbint.h.cmake new file mode 100644 index 0000000000..17de6cde2d --- /dev/null +++ b/remmina-plugins/libvncserver/rfb/rfbint.h.cmake @@ -0,0 +1,4 @@ +#ifndef _RFB_RFBINT_H +#define _RFB_RFBINT_H 1 +/* empty ... */ +#endif diff --git a/remmina-plugins/libvncserver/rfb/rfbregion.h b/remmina-plugins/libvncserver/rfb/rfbregion.h new file mode 100644 index 0000000000..53da667487 --- /dev/null +++ b/remmina-plugins/libvncserver/rfb/rfbregion.h @@ -0,0 +1,65 @@ +#ifndef SRAREGION_H +#define SRAREGION_H + +/* -=- SRA - Simple Region Algorithm + * A simple rectangular region implementation. + * Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin + */ + +/* -=- sraRect */ + +typedef struct _rect { + int x1; + int y1; + int x2; + int y2; +} sraRect; + +typedef struct sraRegion sraRegion; + +/* -=- Region manipulation functions */ + +extern sraRegion *sraRgnCreate(); +extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2); +extern sraRegion *sraRgnCreateRgn(const sraRegion *src); + +extern void sraRgnDestroy(sraRegion *rgn); +extern void sraRgnMakeEmpty(sraRegion *rgn); +extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src); +extern void sraRgnOr(sraRegion *dst, const sraRegion *src); +extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src); + +extern void sraRgnOffset(sraRegion *dst, int dx, int dy); + +extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect, + unsigned long flags); + +extern unsigned long sraRgnCountRects(const sraRegion *rgn); +extern rfbBool sraRgnEmpty(const sraRegion *rgn); + +extern sraRegion *sraRgnBBox(const sraRegion *src); + +/* -=- rectangle iterator */ + +typedef struct sraRectangleIterator { + rfbBool reverseX,reverseY; + int ptrSize,ptrPos; + struct sraSpan** sPtrs; +} sraRectangleIterator; + +extern sraRectangleIterator *sraRgnGetIterator(sraRegion *s); +extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,rfbBool reverseX,rfbBool reverseY); +extern rfbBool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r); +extern void sraRgnReleaseIterator(sraRectangleIterator *i); + +void sraRgnPrint(const sraRegion *s); + +/* -=- Rectangle clipper (for speed) */ + +extern rfbBool sraClipRect(int *x, int *y, int *w, int *h, + int cx, int cy, int cw, int ch); + +extern rfbBool sraClipRect2(int *x, int *y, int *x2, int *y2, + int cx, int cy, int cx2, int cy2); + +#endif diff --git a/remmina-plugins/libvncserver/rfbconfig.h.in b/remmina-plugins/libvncserver/rfbconfig.h.in new file mode 100644 index 0000000000..cdd322bca7 --- /dev/null +++ b/remmina-plugins/libvncserver/rfbconfig.h.in @@ -0,0 +1,420 @@ +/* rfbconfig.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Enable 24 bit per pixel in native framebuffer */ +#undef ALLOW24BPP + +/* work around when write() returns ENOENT but does not mean it */ +#undef ENOENT_WORKAROUND + +/* Use ffmpeg (for vnc2mpg) */ +#undef FFMPEG + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Avahi/mDNS client build environment present */ +#undef HAVE_AVAHI + +/* Define to 1 if you have the `crypt' function. */ +#undef HAVE_CRYPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* DPMS extension build environment present */ +#undef HAVE_DPMS + +/* FBPM extension build environment present */ +#undef HAVE_FBPM + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `ftime' function. */ +#undef HAVE_FTIME + +/* Define to 1 if you have the `geteuid' function. */ +#undef HAVE_GETEUID + +/* Define to 1 if you have the `gethostbyname' function. */ +#undef HAVE_GETHOSTBYNAME + +/* Define to 1 if you have the `gethostname' function. */ +#undef HAVE_GETHOSTNAME + +/* Define to 1 if you have the `getpwnam' function. */ +#undef HAVE_GETPWNAM + +/* Define to 1 if you have the `getpwuid' function. */ +#undef HAVE_GETPWUID + +/* Define to 1 if you have the `getspnam' function. */ +#undef HAVE_GETSPNAM + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `getuid' function. */ +#undef HAVE_GETUID + +/* Define to 1 if you have the `grantpt' function. */ +#undef HAVE_GRANTPT + +/* Define to 1 if you have the `inet_ntoa' function. */ +#undef HAVE_INET_NTOA + +/* Define to 1 if you have the `initgroups' function. */ +#undef HAVE_INITGROUPS + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* IRIX XReadDisplay available */ +#undef HAVE_IRIX_XREADDISPLAY + +/* libcrypt library present */ +#undef HAVE_LIBCRYPT + +/* openssl libcrypto library present */ +#undef HAVE_LIBCRYPTO + +/* Define to 1 if you have the `cygipc' library (-lcygipc). */ +#undef HAVE_LIBCYGIPC + +/* Define to 1 if you have the `jpeg' library (-ljpeg). */ +#undef HAVE_LIBJPEG + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#undef HAVE_LIBPTHREAD + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* openssl libssl library present */ +#undef HAVE_LIBSSL + +/* XDAMAGE extension build environment present */ +#undef HAVE_LIBXDAMAGE + +/* XFIXES extension build environment present */ +#undef HAVE_LIBXFIXES + +/* XINERAMA extension build environment present */ +#undef HAVE_LIBXINERAMA + +/* XRANDR extension build environment present */ +#undef HAVE_LIBXRANDR + +/* DEC-XTRAP extension build environment present */ +#undef HAVE_LIBXTRAP + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* linux fb device build environment present */ +#undef HAVE_LINUX_FB_H + +/* linux/input.h present */ +#undef HAVE_LINUX_INPUT_H + +/* linux uinput device build environment present */ +#undef HAVE_LINUX_UINPUT_H + +/* video4linux build environment present */ +#undef HAVE_LINUX_VIDEODEV_H + +/* build MacOS X native display support */ +#undef HAVE_MACOSX_NATIVE_DISPLAY + +/* MacOS X OpenGL present */ +#undef HAVE_MACOSX_OPENGL_H + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `mkfifo' function. */ +#undef HAVE_MKFIFO + +/* Define to 1 if you have the `mmap' function. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PWD_H + +/* RECORD extension build environment present */ +#undef HAVE_RECORD + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `setegid' function. */ +#undef HAVE_SETEGID + +/* Define to 1 if you have the `seteuid' function. */ +#undef HAVE_SETEUID + +/* Define to 1 if you have the `setgid' function. */ +#undef HAVE_SETGID + +/* Define to 1 if you have the `setpgrp' function. */ +#undef HAVE_SETPGRP + +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID + +/* Define to 1 if you have the `setuid' function. */ +#undef HAVE_SETUID + +/* Define to 1 if you have the `setutxent' function. */ +#undef HAVE_SETUTXENT + +/* Define to 1 if you have the `shmat' function. */ +#undef HAVE_SHMAT + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* Solaris XReadScreen available */ +#undef HAVE_SOLARIS_XREADSCREEN + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +#undef HAVE_STAT_EMPTY_STRING_BUG + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strcspn' function. */ +#undef HAVE_STRCSPN + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Use the system libvncserver build environment for x11vnc. */ +#undef HAVE_SYSTEM_LIBVNCSERVER + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STROPTS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMEB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define to 1 if compiler supports __thread */ +#undef HAVE_TLS + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMPX_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define to 1 if you have the `waitpid' function. */ +#undef HAVE_WAITPID + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + +/* X11 build environment present */ +#undef HAVE_X11 + +/* open ssl X509_print_ex_fp available */ +#undef HAVE_X509_PRINT_EX_FP + +/* XKEYBOARD extension build environment present */ +#undef HAVE_XKEYBOARD + +/* MIT-SHM extension build environment present */ +#undef HAVE_XSHM + +/* XTEST extension build environment present */ +#undef HAVE_XTEST + +/* XTEST extension has XTestGrabControl */ +#undef HAVE_XTESTGRABCONTROL + +/* Enable IPv6 support */ +#undef IPv6 + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#undef LSTAT_FOLLOWS_SLASHED_SYMLINK + +/* Need a typedef for in_addr_t */ +#undef NEED_INADDR_T + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The number of bytes in type char */ +#undef SIZEOF_CHAR + +/* The number of bytes in type int */ +#undef SIZEOF_INT + +/* The number of bytes in type long */ +#undef SIZEOF_LONG + +/* The number of bytes in type short */ +#undef SIZEOF_SHORT + +/* The number of bytes in type void* */ +#undef SIZEOF_VOIDP + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Version number of package */ +#undef VERSION + +/* Enable support for libgcrypt in libvncclient */ +#undef WITH_CLIENT_GCRYPT + +/* Enable support for gnutls in libvncclient */ +#undef WITH_CLIENT_TLS + +/* Disable TightVNCFileTransfer protocol */ +#undef WITH_TIGHTVNC_FILETRANSFER + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* The type for socklen */ +#undef socklen_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork diff --git a/remmina-plugins/nx/CMakeLists.txt b/remmina-plugins/nx/CMakeLists.txt new file mode 100644 index 0000000000..90e19209d6 --- /dev/null +++ b/remmina-plugins/nx/CMakeLists.txt @@ -0,0 +1,36 @@ +# remmina-plugin-nx - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(REMMINA_PLUGIN_NX_SRCS + remminanxsession.c + remminanxsession.h + remminanxsessionmanager.c + remminanxsessionmanager.h + remminapluginnx.c + remminapluginnx.h + ) + +add_library(remmina-plugin-nx ${REMMINA_PLUGIN_NX_SRCS}) +set_target_properties(remmina-plugin-nx PROPERTIES PREFIX "") + +include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${XKBFILE_INCLUDE_DIRS} ${LIBSSH_INCLUDE_DIRS}) +target_link_libraries(remmina-plugin-nx ${REMMINA_COMMON_LIBRARIES} ${XKBFILE_LIBRARIES} ${LIBSSH_LIBRARIES}) + +install(TARGETS remmina-plugin-nx DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina-plugins/nx/Makefile.am b/remmina-plugins/nx/Makefile.am deleted file mode 100644 index 587202c956..0000000000 --- a/remmina-plugins/nx/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## Process this file with automake to produce Makefile.in -plugindir = $(remmina_plugindir) - -plugin_LTLIBRARIES = remmina-plugin-nx.la - -remmina_plugin_nx_la_SOURCES = \ - remminanxsession.c remminanxsession.h \ - remminapluginnx.c remminapluginnx.h \ - remminanxsessionmanager.c remminanxsessionmanager.h - -remmina_plugin_nx_la_CFLAGS = @XKBFILE_CFLAGS@ @REMMINA_PLUGINS_CFLAGS@ \ - -DREMMINA_LOCALEDIR=\"$(remmina_localedir)\" - -remmina_plugin_nx_la_LDFLAGS = -avoid-version -module - -remmina_plugin_nx_la_LIBADD = @SSH_LIBS@ @XKBFILE_LIBS@ @REMMINA_PLUGINS_LIBS@ - -appicon16emblemsdir = $(remmina_datadir)/icons/hicolor/16x16/emblems -appicon16emblems_DATA = \ - 16x16/emblems/remmina-nx.png - -appicon22emblemsdir = $(remmina_datadir)/icons/hicolor/22x22/emblems -appicon22emblems_DATA = \ - 22x22/emblems/remmina-nx.png - -EXTRA_DIST = \ - $(appicon16emblems_DATA) \ - $(appicon22emblems_DATA) - diff --git a/remmina-plugins/nx/remminanxsession.c b/remmina-plugins/nx/remminanxsession.c index 37b981d4c0..b64a363d1b 100644 --- a/remmina-plugins/nx/remminanxsession.c +++ b/remmina-plugins/nx/remminanxsession.c @@ -18,6 +18,8 @@ * Boston, MA 02111-1307, USA. */ +#include +#include #include "common/remminaplugincommon.h" #include #include diff --git a/remmina-plugins/nx/remminapluginnx.c b/remmina-plugins/nx/remminapluginnx.c index 2a92c41be2..2da950facd 100644 --- a/remmina-plugins/nx/remminapluginnx.c +++ b/remmina-plugins/nx/remminapluginnx.c @@ -18,6 +18,8 @@ * Boston, MA 02111-1307, USA. */ +#include +#include #include "common/remminaplugincommon.h" #include #include diff --git a/remmina-plugins/po/CMakeLists.txt b/remmina-plugins/po/CMakeLists.txt new file mode 100644 index 0000000000..f053bad57e --- /dev/null +++ b/remmina-plugins/po/CMakeLists.txt @@ -0,0 +1,22 @@ +# po/remmina-plugins - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +include(GETTEXT) +gettext(${CMAKE_CURRENT_SOURCE_DIR} "remmina-plugins") + diff --git a/remmina-plugins/rdp/CMakeLists.txt b/remmina-plugins/rdp/CMakeLists.txt new file mode 100644 index 0000000000..78148f686e --- /dev/null +++ b/remmina-plugins/rdp/CMakeLists.txt @@ -0,0 +1,43 @@ +# remmina-plugin-gtk - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(CMAKE_THREAD_PREFER_PTHREAD) +find_package(Threads) + +set(REMMINA_PLUGIN_RDP_SRCS + remminapluginrdp.c + remminapluginrdp.h + remminapluginrdpui.c + remminapluginrdpui.h + remminapluginrdpev.c + remminapluginrdpev.h + remminapluginrdpfile.c + remminapluginrdpfile.h + remminapluginrdpset.c + remminapluginrdpset.h + ) + +add_library(remmina-plugin-rdp ${REMMINA_PLUGIN_RDP_SRCS}) +set_target_properties(remmina-plugin-rdp PROPERTIES PREFIX "") + +include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${FREERDP_INCLUDE_DIRS}) +target_link_libraries(remmina-plugin-rdp ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES}) + +install(TARGETS remmina-plugin-rdp DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina-plugins/rdp/Makefile.am b/remmina-plugins/rdp/Makefile.am deleted file mode 100644 index 753ca1986e..0000000000 --- a/remmina-plugins/rdp/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -## Process this file with automake to produce Makefile.in -plugindir = $(remmina_plugindir) - -plugin_LTLIBRARIES = remmina-plugin-rdp.la - -remmina_plugin_rdp_la_SOURCES = \ - remminapluginrdp.c remminapluginrdp.h \ - remminapluginrdpui.c remminapluginrdpui.h \ - remminapluginrdpev.c remminapluginrdpev.h \ - remminapluginrdpfile.c remminapluginrdpfile.h \ - remminapluginrdpset.c remminapluginrdpset.h - -remmina_plugin_rdp_la_CFLAGS = @REMMINA_PLUGINS_CFLAGS@ @RDP_CFLAGS@ \ - -DREMMINA_LOCALEDIR=\"$(remmina_localedir)\" - -remmina_plugin_rdp_la_LDFLAGS = -avoid-version -module - -remmina_plugin_rdp_la_LIBADD = @REMMINA_PLUGINS_LIBS@ @RDP_LIBS@ - -appicon16emblemsdir = $(remmina_datadir)/icons/hicolor/16x16/emblems -appicon16emblems_DATA = \ - 16x16/emblems/remmina-rdp.png \ - 16x16/emblems/remmina-rdp-ssh.png - -appicon22emblemsdir = $(remmina_datadir)/icons/hicolor/22x22/emblems -appicon22emblems_DATA = \ - 22x22/emblems/remmina-rdp.png \ - 22x22/emblems/remmina-rdp-ssh.png - -EXTRA_DIST = \ - $(appicon16emblems_DATA) \ - $(appicon22emblems_DATA) - - diff --git a/remmina-plugins/rdp/remminapluginrdp.c b/remmina-plugins/rdp/remminapluginrdp.c index de4fba965c..5ecae24f13 100644 --- a/remmina-plugins/rdp/remminapluginrdp.c +++ b/remmina-plugins/rdp/remminapluginrdp.c @@ -24,6 +24,8 @@ #include "remminapluginrdpfile.h" #include "remminapluginrdpset.h" +#include +#include #include #define REMMINA_PLUGIN_RDP_FEATURE_TOOL_REFRESH 1 diff --git a/remmina-plugins/telepathy/CMakeLists.txt b/remmina-plugins/telepathy/CMakeLists.txt new file mode 100644 index 0000000000..6b5caa9288 --- /dev/null +++ b/remmina-plugins/telepathy/CMakeLists.txt @@ -0,0 +1,33 @@ +# remmina-plugin-telepathy - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(REMMINA_PLUGIN_TELEPATHY_SRCS + remminaplugintelepathy.c + ) + +add_library(remmina-plugin-telepathy ${REMMINA_PLUGIN_TELEPATHY_SRCS}) +set_target_properties(remmina-plugin-telepathy PROPERTIES PREFIX "") + +find_required_package(GTK3) + +include_directories(${REMMINA_COMMON_INCLUDE_DIRS}) +target_link_libraries(remmina-plugin-telepathy ${REMMINA_COMMON_LIBRARIES}) + +install(TARGETS remmina-plugin-telepathy DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina-plugins/telepathy/Makefile.am b/remmina-plugins/telepathy/Makefile.am deleted file mode 100644 index 2d3dff635a..0000000000 --- a/remmina-plugins/telepathy/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -## Process this file with automake to produce Makefile.in -plugindir = $(remmina_plugindir) - -plugin_LTLIBRARIES = remmina-plugin-telepathy.la - -remmina_plugin_telepathy_la_SOURCES = \ - remminaplugintelepathy.c \ - remminatphandler.c remminatphandler.h \ - remminatpchannelhandler.c remminatpchannelhandler.h - -remmina_plugin_telepathy_la_CFLAGS = @TELEPATHY_CFLAGS@ @REMMINA_PLUGINS_CFLAGS@ \ - -DREMMINA_LOCALEDIR=\"$(remmina_localedir)\" - -remmina_plugin_telepathy_la_LDFLAGS = -avoid-version -module - -remmina_plugin_telepathy_la_LIBADD = @TELEPATHY_LIBS@ @REMMINA_PLUGINS_LIBS@ - -clientdir = $(datarootdir)/telepathy/clients -client_DATA = Remmina.client - -servicedir = $(datadir)/dbus-1/services -service_in_file = org.freedesktop.Telepathy.Client.Remmina.service.in -service_DATA = $(service_in_file:.service.in=.service) - -$(service_DATA): $(service_in_file) - sed -e "s,\@bindir\@,$(bindir),g" < $< > $@ - -EXTRA_DIST = \ - $(client_DATA) \ - $(service_in_file) - -DISTCLEANFILES = $(service_DATA) - diff --git a/remmina-plugins/vnc/CMakeLists.txt b/remmina-plugins/vnc/CMakeLists.txt new file mode 100644 index 0000000000..73ca302786 --- /dev/null +++ b/remmina-plugins/vnc/CMakeLists.txt @@ -0,0 +1,34 @@ +# remmina-plugin-vnc - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(LIBVNCSERVER_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../libvncserver) +set(LIBVNCSERVER_LIBRARIES vncclient) + +set(REMMINA_PLUGIN_VNC_SRCS + remminapluginvnc.c + ) + +add_library(remmina-plugin-vnc ${REMMINA_PLUGIN_VNC_SRCS}) +set_target_properties(remmina-plugin-vnc PROPERTIES PREFIX "") + +include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${LIBVNCSERVER_INCLUDE_DIRS}) +target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES}) + +install(TARGETS remmina-plugin-vnc DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina-plugins/vnc/Makefile.am b/remmina-plugins/vnc/Makefile.am deleted file mode 100644 index 050783f8a9..0000000000 --- a/remmina-plugins/vnc/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -## Process this file with automake to produce Makefile.in -plugindir = $(remmina_plugindir) - -plugin_LTLIBRARIES = remmina-plugin-vnc.la - -remmina_plugin_vnc_la_SOURCES = remminapluginvnc.c - -remmina_plugin_vnc_la_CFLAGS = @VNC_CFLAGS@ @REMMINA_PLUGINS_CFLAGS@ \ - -DREMMINA_LOCALEDIR=\"$(remmina_localedir)\" - -remmina_plugin_vnc_la_LDFLAGS = -avoid-version -module - -remmina_plugin_vnc_la_LIBADD = @VNC_LIBS@ @REMMINA_PLUGINS_LIBS@ - -appicon16emblemsdir = $(remmina_datadir)/icons/hicolor/16x16/emblems -appicon16emblems_DATA = \ - 16x16/emblems/remmina-vnc.png \ - 16x16/emblems/remmina-vnc-ssh.png - -appicon22emblemsdir = $(remmina_datadir)/icons/hicolor/22x22/emblems -appicon22emblems_DATA = \ - 22x22/emblems/remmina-vnc.png \ - 22x22/emblems/remmina-vnc-ssh.png - -EXTRA_DIST = \ - $(appicon16emblems_DATA) \ - $(appicon22emblems_DATA) - diff --git a/remmina-plugins/xdmcp/CMakeLists.txt b/remmina-plugins/xdmcp/CMakeLists.txt new file mode 100644 index 0000000000..bc588d9573 --- /dev/null +++ b/remmina-plugins/xdmcp/CMakeLists.txt @@ -0,0 +1,31 @@ +# remmina-plugin-xdmcp - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(REMMINA_PLUGIN_XDMCP_SRCS + remminapluginxdmcp.c + ) + +add_library(remmina-plugin-xdmcp ${REMMINA_PLUGIN_XDMCP_SRCS}) +set_target_properties(remmina-plugin-xdmcp PROPERTIES PREFIX "") + +include_directories(${REMMINA_COMMON_INCLUDE_DIRS}) +target_link_libraries(remmina-plugin-xdmcp ${REMMINA_COMMON_LIBRARIES}) + +install(TARGETS remmina-plugin-xdmcp DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina-plugins/xdmcp/Makefile.am b/remmina-plugins/xdmcp/Makefile.am deleted file mode 100644 index 2d83e5d4c8..0000000000 --- a/remmina-plugins/xdmcp/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -## Process this file with automake to produce Makefile.in -plugindir = $(remmina_plugindir) - -plugin_LTLIBRARIES = remmina-plugin-xdmcp.la - -remmina_plugin_xdmcp_la_SOURCES = remminapluginxdmcp.c - -remmina_plugin_xdmcp_la_CFLAGS = @REMMINA_PLUGINS_CFLAGS@ \ - -DREMMINA_LOCALEDIR=\"$(remmina_localedir)\" - -remmina_plugin_xdmcp_la_LDFLAGS = -avoid-version -module - -remmina_plugin_xdmcp_la_LIBADD = @REMMINA_PLUGINS_LIBS@ - -appicon16emblemsdir = $(remmina_datadir)/icons/hicolor/16x16/emblems -appicon16emblems_DATA = \ - 16x16/emblems/remmina-xdmcp.png \ - 16x16/emblems/remmina-xdmcp-ssh.png - -appicon22emblemsdir = $(remmina_datadir)/icons/hicolor/22x22/emblems -appicon22emblems_DATA = \ - 22x22/emblems/remmina-xdmcp.png \ - 22x22/emblems/remmina-xdmcp-ssh.png - -EXTRA_DIST = \ - $(appicon16emblems_DATA) \ - $(appicon22emblems_DATA) - diff --git a/remmina/CMakeLists.txt b/remmina/CMakeLists.txt new file mode 100644 index 0000000000..079befaa6e --- /dev/null +++ b/remmina/CMakeLists.txt @@ -0,0 +1,135 @@ +# src/remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(REMMINA_SRCS + src/remminaabout.c + src/remminaabout.h + src/remminaappletmenu.c + src/remminaappletmenu.h + src/remminaappletmenuitem.c + src/remminaappletmenuitem.h + src/remminaavahi.c + src/remminaavahi.h + src/remmina.c + src/remminachainbutton.c + src/remminachainbutton.h + src/remminachatwindow.c + src/remminachatwindow.h + src/remminaconnectionwindow.c + src/remminaconnectionwindow.h + src/remminacrypt.c + src/remminacrypt.h + src/remminaexec.c + src/remminaexec.h + src/remminafile.c + src/remminafileeditor.c + src/remminafileeditor.h + src/remminafile.h + src/remminafilemanager.c + src/remminafilemanager.h + src/remminaftpclient.c + src/remminaftpclient.h + src/remminaicon.c + src/remminaicon.h + src/remminainitdialog.c + src/remminainitdialog.h + src/remminakeychooser.c + src/remminakeychooser.h + src/remminalog.c + src/remminalog.h + src/remminamain.c + src/remminamain.h + src/remminamarshals.c + src/remminamarshals.h + src/remminamarshals.list + src/remminapluginmanager.c + src/remminapluginmanager.h + src/remminapref.c + src/remminaprefdialog.c + src/remminaprefdialog.h + src/remminapref.h + src/remminaprotocolwidget.c + src/remminaprotocolwidget.h + src/remminapublic.c + src/remminapublic.h + src/remminascaler.c + src/remminascaler.h + src/remminascrolledviewport.c + src/remminascrolledviewport.h + src/remminasftpclient.c + src/remminasftpclient.h + src/remminasftpplugin.c + src/remminasftpplugin.h + src/remminassh.c + src/remminassh.h + src/remminasshplugin.c + src/remminasshplugin.h + src/remminastringarray.c + src/remminastringarray.h + src/remminastringlist.c + src/remminastringlist.h + src/remminawidgetpool.c + src/remminawidgetpool.h + ) + +add_executable(remmina ${REMMINA_SRCS}) + +include_directories(${GTK3_INCLUDE_DIRS}) +target_link_libraries(remmina ${GTK3_LIBRARIES}) + +#find_suggested_package(LIBSSH) +#if(LIBSSH_FOUND) +# add_definitions(-DHAVE_LIBSSH) +# include_directories(${LIBSSH_INCLUDE_DIRS}) +# target_link_libraries(remmina ${LIBSSH_LIBRARIES}) +#endif() + +if(GCRYPT_FOUND) + include_directories(${GCRYPT_INCLUDE_DIRS}) + target_link_libraries(remmina ${GCRYPT_LIBRARIES}) +endif() + +if(AVAHI_FOUND) + include_directories(${AVAHI_INCLUDE_DIRS}) + target_link_libraries(remmina ${AVAHI_LIBRARIES}) +endif() + +find_suggested_package(VTE) +if(VTE_FOUND) + add_definitions(-DHAVE_LIBVTE) + include_directories(${VTE_INCLUDE_DIRS}) + target_link_libraries(remmina ${VTE_LIBRARIES}) +endif() + +find_suggested_package(APPINDICATOR) +if(APPINDICATOR_FOUND) + add_definitions(-DHAVE_LIBAPPINDICATOR) + include_directories(${APPINDICATOR_INCLUDE_DIRS}) + target_link_libraries(remmina ${APPINDICATOR_LIBRARIES}) +endif() + +add_subdirectory(po) +add_subdirectory(icons) +add_subdirectory(desktop) + +install(TARGETS remmina DESTINATION ${CMAKE_INSTALL_BINDIR}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/remmina.pc.in ${CMAKE_CURRENT_BINARY_DIR}/remmina.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/remmina.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + diff --git a/remmina/Makefile.am b/remmina/Makefile.am deleted file mode 100644 index 66dc9e7f4e..0000000000 --- a/remmina/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -## Process this file with automake to produce Makefile.in -SUBDIRS = @REMMINA_SUBDIRS@ - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = remmina.pc - diff --git a/remmina/autogen.sh b/remmina/autogen.sh deleted file mode 100755 index 3eec06ea70..0000000000 --- a/remmina/autogen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -aclocal -autoheader --force -intltoolize -c --automake --force -automake --add-missing --copy --include-deps -autoconf - -rm -rf autom4te.cache - diff --git a/remmina/configure.ac b/remmina/configure.ac deleted file mode 100644 index c3a5f13ebf..0000000000 --- a/remmina/configure.ac +++ /dev/null @@ -1,220 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.60) -AC_INIT(remmina, 0.9.99.1) -AM_INIT_AUTOMAKE -AM_CONFIG_HEADER([config.h]) -AC_CONFIG_SRCDIR([src/remmina.c]) - -# Checks for programs. -AC_ISC_POSIX -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_MAKE_SET - -# Disable optimization if we enable debug -AC_ARG_ENABLE(debug, - [AS_HELP_STRING([--enable-debug], [Enable compiling in debug mode])], [ - if test "x$enableval" = "xyes"; then - CFLAGS="-g -O0" - fi] -) - -# Only use -Wall if we have gcc -if test "x$GCC" = "xyes"; then - if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then - CFLAGS="$CFLAGS -Wall" - fi -fi - -IT_PROG_INTLTOOL([0.35.0]) - -GETTEXT_PACKAGE=remmina -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package]) - -if test "x$USE_NLS" != "xno"; then - ALL_LINGUAS="bg ca cs da de el es eu fr hu id it kk lt nl pl pt_BR pt_PT ru sk sv th tr uk zh_CN" - nls_support="yes" -else - ALL_LINGUAS="" - nls_support="disabled." -fi - -AM_GLIB_GNU_GETTEXT - -remmina_localedir='${datadir}/locale' -AC_SUBST(remmina_localedir) - -remmina_plugindir='${libdir}/remmina/plugins' -AC_SUBST(remmina_plugindir) - -REMMINA_SUBDIRS="include src po desktop icons" - -# Checks GTK+ version. -PKG_CHECK_MODULES(GTK, [ - gtk+-3.0 -]) -remmina_pkgs="gtk+-3.0" - -# Check libavahi-ui -AC_ARG_ENABLE(avahi, - [AS_HELP_STRING([--disable-avahi], [Disable Avahi])], - [avahi_support=$enableval], - [avahi_support="yes"] -) -if test "x$avahi_support" != "xno"; then - PKG_CHECK_MODULES(AVAHI_UI, - [ - avahi-ui-gtk3 >= 0.6.30 - avahi-client >= 0.6.30 - ], [ - avahi_support="yes" - remmina_pkgs="$remmina_pkgs avahi-ui-gtk3 avahi-client" - AC_DEFINE([HAVE_LIBAVAHI_UI], [1], [Define to 1 if you have the 'avahi-ui' library (-lavahi-ui).]) - AC_DEFINE([HAVE_LIBAVAHI_CLIENT], [1], [Define to 1 if you have the 'avahi-client' library (-lavahi-client).]) - ], avahi_support="no. libavahi-ui-gtk3-dev required." - ) -else - avahi_support="disabled." -fi - -# Check libvte -AC_ARG_ENABLE(vte, - [AS_HELP_STRING([--disable-vte], [Disable VTE (Terminal)])], - [vte_support=$enableval], - [vte_support="yes"] -) -if test "x$vte_support" != "xno"; then - PKG_CHECK_MODULES(VTE, - vte-2.90, [ - vte_support="yes" - remmina_pkgs="$remmina_pkgs vte-2.90" - AC_DEFINE([HAVE_LIBVTE], [1], [Define to 1 if you have the 'vte' library (-lvte).]) - ], vte_support="no. libvte-2.90-dev required." - ) -else - vte_support="disabled." -fi - -# Check libpthread (if found I assume GThread uses pthread) -AC_CHECK_LIB(pthread, pthread_create, [ - AC_CHECK_HEADER(pthread.h, [ - pthread_support="yes" - PKG_CHECK_MODULES(GTHREAD, [gthread-2.0 >= 2.14.0]) - remmina_pkgs="$remmina_pkgs gthread-2.0" - AC_DEFINE([HAVE_PTHREAD], [1], [Define to 1 if you have the `pthread' library (-lpthread).]) - ], pthread_support="no. libpthread-dev required.") -],[ - pthread_support="no. libpthread required." -]) - -# Check libssh -AC_ARG_ENABLE(ssh, - [AS_HELP_STRING([--disable-ssh], [Disable SSH])], - [ssh_support=$enableval], - [ssh_support="yes"] -) -if test "x$ssh_support" != "xno"; then - if test "$pthread_support" = "yes"; then - AC_CHECK_LIB(ssh, ssh_options_set, [ - AC_CHECK_HEADER(libssh/libssh.h, [ - ssh_support="yes" - AC_DEFINE([HAVE_LIBSSH], [1], [Define to 1 if you have the `ssh' library (-lssh).]) - LIBS="-lssh $LIBS" - ], ssh_support="no. libssh-dev required.") - ], ssh_support="no. libssh >= 0.4 required.") - else - ssh_support="no. Multi-threaded support required." - fi -else - ssh_support="disabled." -fi - -# Check libgcrypt -AC_ARG_ENABLE(gcrypt, - [AS_HELP_STRING([--disable-gcrypt], [Disable GCrypt])], - [gcrypt_support=$enableval], - [gcrypt_support="yes"] -) -if test "x$gcrypt_support" != "xno"; then - AM_PATH_LIBGCRYPT(1.4.0,[ - gcrypt_support="yes" - AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have the `gcrypt' library (-lgcrypt).]) - ],[ - gcrypt_support="no. libgcrypt-dev required." - ]) -else - gcrypt_support="disabled." -fi - -# Check libappindicator -AC_ARG_ENABLE(appindicator, - [AS_HELP_STRING([--disable-appindicator], [Disable application indicators])], - [appindicator_support=$enableval], - [appindicator_support="yes"] -) -if test "x$appindicator_support" != "xno"; then - PKG_CHECK_MODULES(APP_INDICATOR, - appindicator3-0.1, [ - appindicator_support="yes" - remmina_pkgs="$remmina_pkgs appindicator3-0.1" - AC_DEFINE([HAVE_LIBAPPINDICATOR], [1], [Define to 1 if you have the 'appindicator' library (-lappindicator).]) - ], appindicator_support="no. libappindicator3-dev required." - ) -else - appindicator_support="disabled." -fi - -# Merge all PKG checks here -PKG_CHECK_MODULES(REMMINA, [ - $remmina_pkgs -]) -AC_SUBST(REMMINA_CFLAGS) -AC_SUBST(REMMINA_LIBS) - -AC_SUBST(REMMINA_SUBDIRS) - -# Checks for header files. -AC_CHECK_HEADERS_ONCE( - netdb.h - arpa/inet.h - netinet/in.h - sys/socket.h - sys/un.h - fcntl.h - errno.h - termios.h -) - -# Checks for typedefs, structures, and compiler characteristics. - -# Checks for library functions. - -AC_CONFIG_FILES([ -Makefile -remmina.pc -include/Makefile -src/Makefile -po/Makefile.in -desktop/Makefile -icons/Makefile -]) - -AC_OUTPUT - -echo -echo "Remmina configure result:" -echo -echo "* NLS support: $nls_support" -echo "* Multi-threaded support: $pthread_support" -echo "* SSH support: $ssh_support" -echo "* Avahi support: $avahi_support" -echo "* Terminal support: $vte_support" -echo "* Encryption support: $gcrypt_support" -echo "* Application indicator support: $appindicator_support" -echo -echo "Type \"make\" to compile remmina." -echo - diff --git a/remmina/desktop/CMakeLists.txt b/remmina/desktop/CMakeLists.txt new file mode 100644 index 0000000000..c528fc53a5 --- /dev/null +++ b/remmina/desktop/CMakeLists.txt @@ -0,0 +1,40 @@ +# desktop/remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(ICON16_DIR "${REMMINA_DATADIR}/icons/hicolor/16x16/apps") +set(ICON22_DIR "${REMMINA_DATADIR}/icons/hicolor/22x22/apps") +set(ICON24_DIR "${REMMINA_DATADIR}/icons/hicolor/24x24/apps") +set(ICON32_DIR "${REMMINA_DATADIR}/icons/hicolor/32x32/apps") +set(ICON48_DIR "${REMMINA_DATADIR}/icons/hicolor/48x48/apps") +set(ICONSVG_DIR "${REMMINA_DATADIR}/icons/hicolor/scalable/apps") + +set(ICON16_DATA 16x16/apps/remmina.png) +set(ICON22_DATA 22x22/apps/remmina.png) +set(ICON24_DATA 24x24/apps/remmina.png) +set(ICON32_DATA 32x32/apps/remmina.png) +set(ICON48_DATA 48x48/apps/remmina.png) +set(ICONSVG_DATA scalable/apps/remmina.svg) + +install(FILES ${ICON16_DATA} DESTINATION ${ICON16_DIR}) +install(FILES ${ICON22_DATA} DESTINATION ${ICON22_DIR}) +install(FILES ${ICON24_DATA} DESTINATION ${ICON24_DIR}) +install(FILES ${ICON32_DATA} DESTINATION ${ICON32_DIR}) +install(FILES ${ICON48_DATA} DESTINATION ${ICON48_DIR}) +install(FILES ${ICONSVG_DATA} DESTINATION ${ICONSVG_DIR}) + diff --git a/remmina/desktop/Makefile.am b/remmina/desktop/Makefile.am deleted file mode 100644 index 98bf6c8994..0000000000 --- a/remmina/desktop/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -## Process this file with automake to produce Makefile.in - -desktopdir = $(datadir)/applications -desktop_in_files = remmina.desktop.in -desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) -@INTLTOOL_DESKTOP_RULE@ - -icon16dir = $(datadir)/icons/hicolor/16x16/apps -icon16_DATA = 16x16/apps/remmina.png -icon22dir = $(datadir)/icons/hicolor/22x22/apps -icon22_DATA = 22x22/apps/remmina.png -icon24dir = $(datadir)/icons/hicolor/24x24/apps -icon24_DATA = 24x24/apps/remmina.png -icon32dir = $(datadir)/icons/hicolor/32x32/apps -icon32_DATA = 32x32/apps/remmina.png -icon48dir = $(datadir)/icons/hicolor/48x48/apps -icon48_DATA = 48x48/apps/remmina.png -iconsvgdir = $(datadir)/icons/hicolor/scalable/apps -iconsvg_DATA = scalable/apps/remmina.svg -gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor -install-data-hook: update-icon-cache -uninstall-hook: update-icon-cache -update-icon-cache: - @-if test -z "$(DESTDIR)"; then \ - echo "Updating Gtk icon cache."; \ - $(gtk_update_icon_cache); \ - else \ - echo "*** Icon cache not updated. After (un)install, run this:"; \ - echo "*** $(gtk_update_icon_cache)"; \ - fi - -EXTRA_DIST = \ - $(desktop_in_files) \ - $(icon16_DATA) \ - $(icon22_DATA) \ - $(icon24_DATA) \ - $(icon32_DATA) \ - $(icon48_DATA) \ - $(iconsvg_DATA) -CLEANFILES = \ - $(desktop_DATA) - diff --git a/remmina/icons/CMakeLists.txt b/remmina/icons/CMakeLists.txt new file mode 100644 index 0000000000..c039475762 --- /dev/null +++ b/remmina/icons/CMakeLists.txt @@ -0,0 +1,53 @@ +# icons/remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +set(APPICON16_ACTIONS_DIR "${REMMINA_DATADIR}/icons/hicolor/16x16/actions") +set(APPICON16_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/16x16/emblems") +set(APPICON22_ACTIONS_DIR "${REMMINA_DATADIR}/icons/hicolor/22x22/actions") +set(APPICON22_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/22x22/emblems") + +set(APPICON16_ACTIONS_DATA + 16x16/actions/remmina-fit-window.png + 16x16/actions/remmina-scale.png + 16x16/actions/remmina-fullscreen.png + 16x16/actions/remmina-switch-page.png + 16x16/actions/remmina-pin-up.png + 16x16/actions/remmina-pin-down.png + ) + +set(APPICON16_EMBLEMS_DATA + 16x16/emblems/remmina-sftp.png + ) + +set(APPICON22_ACTIONS_DATA + 22x22/actions/remmina-fit-window.png + 22x22/actions/remmina-scale.png + 22x22/actions/remmina-fullscreen.png + 22x22/actions/remmina-switch-page.png + ) + +set(APPICON22_EMBLEMS_DATA + 22x22/emblems/remmina-sftp.png + ) + +install(FILES ${APPICON16_ACTIONS_DATA} DESTINATION ${APPICON16_ACTIONS_DIR}) +install(FILES ${APPICON16_EMBLEMS_DATA} DESTINATION ${APPICON16_EMBLEMS_DIR}) +install(FILES ${APPICON22_ACTIONS_DATA} DESTINATION ${APPICON22_ACTIONS_DIR}) +install(FILES ${APPICON22_EMBLEMS_DATA} DESTINATION ${APPICON22_EMBLEMS_DIR}) + diff --git a/remmina/icons/Makefile.am b/remmina/icons/Makefile.am deleted file mode 100644 index 42cb31bbe0..0000000000 --- a/remmina/icons/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -## Process this file with automake to produce Makefile.in - -appicon16actionsdir = ${pkgdatadir}/icons/hicolor/16x16/actions -appicon16actions_DATA = \ - 16x16/actions/remmina-fit-window.png \ - 16x16/actions/remmina-scale.png \ - 16x16/actions/remmina-fullscreen.png \ - 16x16/actions/remmina-switch-page.png \ - 16x16/actions/remmina-pin-up.png \ - 16x16/actions/remmina-pin-down.png - -appicon16emblemsdir = ${pkgdatadir}/icons/hicolor/16x16/emblems -appicon16emblems_DATA = \ - 16x16/emblems/remmina-sftp.png - -appicon22actionsdir = ${pkgdatadir}/icons/hicolor/22x22/actions -appicon22actions_DATA = \ - 22x22/actions/remmina-fit-window.png \ - 22x22/actions/remmina-scale.png \ - 22x22/actions/remmina-fullscreen.png \ - 22x22/actions/remmina-switch-page.png - -appicon22emblemsdir = ${pkgdatadir}/icons/hicolor/22x22/emblems -appicon22emblems_DATA = \ - 22x22/emblems/remmina-sftp.png - -EXTRA_DIST = \ - $(appicon16actions_DATA) \ - $(appicon16emblems_DATA) \ - $(appicon22actions_DATA) \ - $(appicon22emblems_DATA) - diff --git a/remmina/include/Makefile.am b/remmina/include/Makefile.am deleted file mode 100644 index b0efde3e0c..0000000000 --- a/remmina/include/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# plugin development files -includedir = $(prefix)/include/remmina -include_HEADERS = remmina/plugin.h remmina/types.h - diff --git a/remmina/po/CMakeLists.txt b/remmina/po/CMakeLists.txt new file mode 100644 index 0000000000..452e8c34db --- /dev/null +++ b/remmina/po/CMakeLists.txt @@ -0,0 +1,22 @@ +# po/remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307, USA. + +include(GETTEXT) +gettext(${CMAKE_CURRENT_SOURCE_DIR} "remmina") + diff --git a/remmina/src/Makefile.am b/remmina/src/Makefile.am deleted file mode 100644 index 0fb50a7809..0000000000 --- a/remmina/src/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -## Process this file with automake to produce Makefile.in -bin_PROGRAMS = remmina - -INCLUDES = -I$(top_srcdir)/include \ - @REMMINA_CFLAGS@ @LIBGCRYPT_CFLAGS@ \ - -DREMMINA_LOCALEDIR=\"$(remmina_localedir)\" \ - -DREMMINA_PLUGINDIR=\"$(remmina_plugindir)\" \ - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ - -DREMMINA_DATADIR=\"$(pkgdatadir)\" - -remmina_SOURCES = remmina.c \ - remminamain.h remminamain.c \ - remminapublic.h remminapublic.c \ - remminafile.h remminafile.c \ - remminafilemanager.h remminafilemanager.c \ - remminafileeditor.h remminafileeditor.c \ - remminascrolledviewport.h remminascrolledviewport.c \ - remminaconnectionwindow.h remminaconnectionwindow.c \ - remminaprotocolwidget.h remminaprotocolwidget.c \ - remminainitdialog.h remminainitdialog.c \ - remminaabout.h remminaabout.c \ - remminapref.h remminapref.c \ - remminastringarray.h remminastringarray.c \ - remminastringlist.h remminastringlist.c \ - remminaprefdialog.h remminaprefdialog.c \ - remminassh.h remminassh.c \ - remminasshplugin.h remminasshplugin.c \ - remminachatwindow.h remminachatwindow.c \ - remminamarshals.h remminamarshals.c \ - remminaftpclient.h remminaftpclient.c \ - remminasftpclient.h remminasftpclient.c \ - remminasftpplugin.h remminasftpplugin.c \ - remminacrypt.h remminacrypt.c \ - remminachainbutton.h remminachainbutton.c \ - remminascaler.h remminascaler.c \ - remminawidgetpool.h remminawidgetpool.c \ - remminapluginmanager.h remminapluginmanager.c \ - remminalog.h remminalog.c \ - remminakeychooser.h remminakeychooser.c \ - remminaexec.h remminaexec.c \ - remminaicon.h remminaicon.c \ - remminaavahi.h remminaavahi.c \ - remminaappletmenuitem.h remminaappletmenuitem.c \ - remminaappletmenu.h remminaappletmenu.c - -remmina_LDADD = @REMMINA_LIBS@ @LIBGCRYPT_LIBS@ - -EXTRA_DIST = remminamarshals.list -