Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-261: Implement Spice protocol support. #394

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ DIST_SUBDIRS = \
src/pulse \
src/protocols/kubernetes \
src/protocols/rdp \
src/protocols/spice \
src/protocols/ssh \
src/protocols/telnet \
src/protocols/vnc
Expand Down Expand Up @@ -65,6 +66,10 @@ if ENABLE_RDP
SUBDIRS += src/protocols/rdp
endif

if ENABLE_SPICE
SUBDIRS += src/protocols/spice
endif

if ENABLE_SSH
SUBDIRS += src/protocols/ssh
endif
Expand Down
24 changes: 24 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,27 @@ then

fi

#
# spice-glib
#

have_spice_glib=disabled
AC_ARG_WITH([spice],
[AS_HELP_STRING([--with-spice],
[support SPICE @<:@default=check@:>@])],
[],
[with_spice=check])

if test "x$with_spice" != "xno"
then
have_spice_glib=yes
PKG_CHECK_MODULES([GLIB2], [glib-2.0],, [have_spice_glib=no])
PKG_CHECK_MODULES([SPICE], [spice-client-glib-2.0],, [have_spice_glib=no])
fi

AM_CONDITIONAL([ENABLE_SPICE], [test "x${have_spice_glib}" = "xyes"])
AC_SUBST(SPICE_LIBS)


#
# FreeRDP 2 (libfreerdp2, libfreerdp-client2, and libwinpr2)
Expand Down Expand Up @@ -1188,6 +1209,7 @@ AC_CONFIG_FILES([Makefile
src/protocols/kubernetes/tests/Makefile
src/protocols/rdp/Makefile
src/protocols/rdp/tests/Makefile
src/protocols/spice/Makefile
src/protocols/ssh/Makefile
src/protocols/telnet/Makefile
src/protocols/vnc/Makefile])
Expand All @@ -1199,6 +1221,7 @@ AC_OUTPUT

AM_COND_IF([ENABLE_KUBERNETES], [build_kubernetes=yes], [build_kubernetes=no])
AM_COND_IF([ENABLE_RDP], [build_rdp=yes], [build_rdp=no])
AM_COND_IF([ENABLE_SPICE], [build_spice=yes], [build_spice=no])
AM_COND_IF([ENABLE_SSH], [build_ssh=yes], [build_ssh=no])
AM_COND_IF([ENABLE_TELNET], [build_telnet=yes], [build_telnet=no])
AM_COND_IF([ENABLE_VNC], [build_vnc=yes], [build_vnc=no])
Expand Down Expand Up @@ -1260,6 +1283,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION

Kubernetes .... ${build_kubernetes}
RDP ........... ${build_rdp}
SPICE ......... ${build_spice}
SSH ........... ${build_ssh}
Telnet ........ ${build_telnet}
VNC ........... ${build_vnc}
Expand Down
139 changes: 139 additions & 0 deletions src/protocols/spice/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
#
# NOTE: Parts of this file (Makefile.am) are automatically transcluded verbatim
# into Makefile.in. Though the build system (GNU Autotools) automatically adds
# its own license boilerplate to the generated Makefile.in, that boilerplate
# does not apply to the transcluded portions of Makefile.am which are licensed
# to you by the ASF under the Apache License, Version 2.0, as described above.
#

AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4

lib_LTLIBRARIES = libguac-client-spice.la

nodist_libguac_client_spice_la_SOURCES = \
_generated_keymaps.c

libguac_client_spice_la_SOURCES = \
argv.c \
auth.c \
channels/audio.c \
channels/clipboard.c \
channels/cursor.c \
channels/display.c \
channels/file.c \
channels/file-download.c \
channels/file-ls.c \
channels/file-upload.c \
client.c \
decompose.c \
input.c \
keyboard.c \
keymap.c \
log.c \
settings.c \
spice.c \
user.c

noinst_HEADERS = \
argv.h \
auth.h \
channels/audio.h \
channels/clipboard.h \
channels/cursor.h \
channels/display.h \
channels/file.h \
channels/file-download.h \
channels/file-ls.h \
channels/file-upload.h \
client.h \
decompose.h \
input.h \
keyboard.h \
keymap.h \
log.h \
settings.h \
spice.h \
user.h

libguac_client_spice_la_CFLAGS = \
-Werror -Wall -pedantic -Iinclude \
@COMMON_INCLUDE@ \
@COMMON_SSH_INCLUDE@ \
@LIBGUAC_INCLUDE@ \
@GLIB2_CFLAGS@ \
@SPICE_CFLAGS@

libguac_client_spice_la_LDFLAGS = \
-version-info 0:0:0 \
@CAIRO_LIBS@ \
@GLIB2_LIBS@ \
@SPICE_LIBS@

libguac_client_spice_la_LIBADD = \
@COMMON_LTLIB@ \
@LIBGUAC_LTLIB@

# Optional SFTP support
if ENABLE_COMMON_SSH
libguac_client_spice_la_SOURCES += sftp.c
noinst_HEADERS += sftp.h
libguac_client_spice_la_LIBADD += @COMMON_SSH_LTLIB@
endif

#
# Autogenerated keymaps and channel wrapper functions
#

CLEANFILES = \
_generated_keymaps.c

BUILT_SOURCES = \
_generated_keymaps.c

spice_keymaps = \
$(srcdir)/keymaps/base.keymap \
$(srcdir)/keymaps/failsafe.keymap \
$(srcdir)/keymaps/de_de_qwertz.keymap \
$(srcdir)/keymaps/de_ch_qwertz.keymap \
$(srcdir)/keymaps/en_gb_qwerty.keymap \
$(srcdir)/keymaps/en_us_qwerty.keymap \
$(srcdir)/keymaps/es_es_qwerty.keymap \
$(srcdir)/keymaps/es_latam_qwerty.keymap \
$(srcdir)/keymaps/fr_be_azerty.keymap \
$(srcdir)/keymaps/fr_ca_qwerty.keymap \
$(srcdir)/keymaps/fr_ch_qwertz.keymap \
$(srcdir)/keymaps/fr_fr_azerty.keymap \
$(srcdir)/keymaps/hu_hu_qwertz.keymap \
$(srcdir)/keymaps/it_it_qwerty.keymap \
$(srcdir)/keymaps/ja_jp_qwerty.keymap \
$(srcdir)/keymaps/no_no_qwerty.keymap \
$(srcdir)/keymaps/pl_pl_qwerty.keymap \
$(srcdir)/keymaps/pt_br_qwerty.keymap \
$(srcdir)/keymaps/sv_se_qwerty.keymap \
$(srcdir)/keymaps/da_dk_qwerty.keymap \
$(srcdir)/keymaps/tr_tr_qwerty.keymap

_generated_keymaps.c: $(spice_keymaps) $(srcdir)/keymaps/generate.pl
$(AM_V_GEN) $(srcdir)/keymaps/generate.pl $(spice_keymaps)

EXTRA_DIST = \
$(spice_keymaps) \
keymaps/generate.pl
Loading