Merge pull request #511 from kiilerix/master

various polishing
This commit is contained in:
Marc-André Moreau 2012-03-22 13:43:55 -07:00
commit 0b44c2dc25
8 changed files with 169 additions and 114 deletions

View File

@ -87,9 +87,6 @@ if(MSVC)
endif()
# Include files
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
check_include_files(sys/socket.h HAVE_SYS_SOCKET_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(limits.h HAVE_LIMITS_H)
@ -125,9 +122,6 @@ if(NOT WIN32)
endif()
endif()
# Endian
test_big_endian(BIG_ENDIAN)
# Path to put FreeRDP data
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp")
set(FREERDP_KEYMAP_PATH "${FREERDP_DATA_PATH}/keymaps")

View File

@ -28,6 +28,7 @@
#include "xf_event.h"
#ifdef WITH_DEBUG_X11
static const char* const X11_EVENT_STRINGS[] =
{
"", "",
@ -66,6 +67,7 @@ static const char* const X11_EVENT_STRINGS[] =
"MappingNotify",
"GenericEvent",
};
#endif
void xf_send_mouse_motion_event(rdpInput* input, boolean down, uint32 button, uint16 x, uint16 y)
{
@ -382,6 +384,7 @@ boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app)
{
if (app)
{
DEBUG_X11("RAIL window closed");
rdpWindow* window;
rdpRail* rail = ((rdpContext*) xfi->context)->rail;
@ -396,6 +399,7 @@ boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app)
}
else
{
DEBUG_X11("Main window closed");
return false;
}
}
@ -663,7 +667,7 @@ boolean xf_event_process(freerdp* instance, XEvent* event)
}
if (event->type != MotionNotify)
DEBUG_X11("%s Event: wnd=0x%04X", X11_EVENT_STRINGS[event->type], (uint32) event->xany.window);
DEBUG_X11("%s Event(%d): wnd=0x%04X", X11_EVENT_STRINGS[event->type], event->type, (uint32) event->xany.window);
switch (event->type)
{

View File

@ -257,7 +257,7 @@ boolean xf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int
return true;
}
boolean xf_check_fds(freerdp* instance, fd_set* set)
boolean xf_process_x_events(freerdp* instance)
{
XEvent xevent;
xfInfo* xfi = ((xfContext*) instance->context)->xfi;
@ -1153,9 +1153,9 @@ int xfreerdp_run(freerdp* instance)
printf("Failed to check FreeRDP file descriptor\n");
break;
}
if (xf_check_fds(instance, &rfds_set) != true)
if (xf_process_x_events(instance) != true)
{
printf("Failed to check xfreerdp file descriptor\n");
printf("Closed from X\n");
break;
}
if (freerdp_channels_check_fds(channels, instance) != true)

View File

@ -1,26 +1,29 @@
option(WITH_DEBUG_TRANSPORT "Print transport debug messages." OFF)
option(WITH_DEBUG_CHANNELS "Print channel manager debug messages." OFF)
option(WITH_DEBUG_SVC "Print static virtual channel debug messages." OFF)
option(WITH_DEBUG_DVC "Print dynamic virtual channel debug messages." OFF)
option(WITH_DEBUG_KBD "Print keyboard related debug messages." OFF)
option(WITH_DEBUG_NLA "Print authentication related debug messages." OFF)
option(WITH_DEBUG_NEGO "Print negotiation related debug messages." OFF)
option(WITH_MANPAGES "Generate manpages." ON)
option(WITH_NEON "Enable NEON optimization for rfx decoder" OFF)
option(WITH_PROFILER "Compile profiler." OFF)
option(WITH_SSE2_TARGET "Allow compiler to generate SSE2 instructions." OFF)
option(WITH_SSE2 "Use SSE2 optimization." OFF)
option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." OFF)
option(WITH_DEBUG_LICENSE "Print license debug messages." OFF)
option(WITH_DEBUG_CHANNELS "Print channel manager debug messages." OFF)
option(WITH_DEBUG_CLIPRDR "Print clipboard redirection debug messages" OFF)
option(WITH_DEBUG_DVC "Print dynamic virtual channel debug messages." OFF)
option(WITH_DEBUG_GDI "Print graphics debug messages." OFF)
option(WITH_DEBUG_KBD "Print keyboard related debug messages." OFF)
option(WITH_DEBUG_LICENSE "Print license debug messages." OFF)
option(WITH_DEBUG_NEGO "Print negotiation related debug messages." OFF)
option(WITH_DEBUG_NLA "Print authentication related debug messages." OFF)
option(WITH_DEBUG_NTLM "Print NTLM debug messages" OFF)
option(WITH_DEBUG_ORDERS "Print drawing orders debug messages" OFF)
option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" OFF)
option(WITH_DEBUG_RDP "Print RDP debug messages" OFF)
option(WITH_DEBUG_REDIR "Redirection debug messages" OFF)
option(WITH_DEBUG_RFX "Print RemoteFX debug messages." OFF)
option(WITH_DEBUG_X11 "Print X11 Client debug messages" OFF)
option(WITH_DEBUG_SCARD "Print smartcard debug messages" OFF)
option(WITH_DEBUG_SVC "Print static virtual channel debug messages." OFF)
option(WITH_DEBUG_TRANSPORT "Print transport debug messages." OFF)
option(WITH_DEBUG_WND "Print window order debug messages" OFF)
option(WITH_DEBUG_X11_CLIPRDR "Print X11 clipboard redirection debug messages" OFF)
option(WITH_DEBUG_X11_LOCAL_MOVESIZE "Print X11 Client local movesize debug messages" OFF)
option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" OFF)
option(WITH_DEBUG_X11 "Print X11 Client debug messages" OFF)
option(WITH_DEBUG_XV "Print XVideo debug messages" OFF)
option(WITH_DEBUG_SCARD "Print smartcard debug messages" OFF)
option(WITH_DEBUG_ORDERS "Print drawing orders debug messages" OFF)
option(WITH_MANPAGES "Generate manpages." ON)
option(WITH_PROFILER "Compile profiler." OFF)
option(WITH_SSE2 "Use SSE2 optimization." OFF)
option(WITH_SSE2_TARGET "Allow compiler to generate SSE2 instructions." OFF)
option(WITH_DEBUG_REDIR "Redirection debug messages" OFF)
option(WITH_DEBUG_CLIPRDR "Print clipboard redirection debug messages" OFF)
option(WITH_DEBUG_WND "Print window order debug messages" OFF)
option(WITH_NEON "Enable NEON optimization for rfx decoder" OFF)

View File

@ -12,9 +12,6 @@
#define FREERDP_KEYMAP_PATH "${FREERDP_KEYMAP_PATH}"
/* Include files */
#cmakedefine HAVE_SYS_PARAM_H
#cmakedefine HAVE_SYS_SOCKET_H
#cmakedefine HAVE_NETDB_H
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_LIMITS_H
@ -24,34 +21,33 @@
#cmakedefine HAVE_TM_GMTOFF
/* Endian */
#cmakedefine BIG_ENDIAN
/* Options */
#cmakedefine WITH_DEBUG_TRANSPORT
#cmakedefine WITH_DEBUG_CHANNELS
#cmakedefine WITH_DEBUG_SVC
#cmakedefine WITH_DEBUG_DVC
#cmakedefine WITH_DEBUG_KBD
#cmakedefine WITH_DEBUG_NLA
#cmakedefine WITH_DEBUG_NEGO
#cmakedefine WITH_DEBUG_CERTIFICATE
#cmakedefine WITH_DEBUG_LICENSE
#cmakedefine WITH_DEBUG_GDI
#cmakedefine WITH_DEBUG_ASSERT
#cmakedefine WITH_DEBUG_RFX
#cmakedefine WITH_PROFILER
#cmakedefine WITH_SSE2
#cmakedefine WITH_SSE2_TARGET
#cmakedefine WITH_NEON
/* Debug */
#cmakedefine WITH_DEBUG_CERTIFICATE
#cmakedefine WITH_DEBUG_CHANNELS
#cmakedefine WITH_DEBUG_CLIPRDR
#cmakedefine WITH_DEBUG_DVC
#cmakedefine WITH_DEBUG_GDI
#cmakedefine WITH_DEBUG_KBD
#cmakedefine WITH_DEBUG_LICENSE
#cmakedefine WITH_DEBUG_NEGO
#cmakedefine WITH_DEBUG_NLA
#cmakedefine WITH_DEBUG_NTLM
#cmakedefine WITH_DEBUG_ORDERS
#cmakedefine WITH_DEBUG_RAIL
#cmakedefine WITH_DEBUG_RDP
#cmakedefine WITH_DEBUG_REDIR
#cmakedefine WITH_DEBUG_RFX
#cmakedefine WITH_DEBUG_SCARD
#cmakedefine WITH_DEBUG_SVC
#cmakedefine WITH_DEBUG_TRANSPORT
#cmakedefine WITH_DEBUG_WND
#cmakedefine WITH_DEBUG_X11
#cmakedefine WITH_DEBUG_X11_CLIPRDR
#cmakedefine WITH_DEBUG_X11_LOCAL_MOVESIZE
#cmakedefine WITH_DEBUG_RAIL
#cmakedefine WITH_DEBUG_XV
#cmakedefine WITH_DEBUG_SCARD
#cmakedefine WITH_DEBUG_ORDERS
#cmakedefine WITH_DEBUG_REDIR
#cmakedefine WITH_DEBUG_CLIPRDR
#cmakedefine WITH_DEBUG_WND
#endif

View File

@ -1,38 +1,51 @@
# cmake
# make package_source
# rpmbuild -ta freerdp-<...>.tar.gz
Summary: Remote Desktop Protocol functionality
Name: freerdp
Version: 1.0.0
Release: 1%{?dist}
License: Apache License 2.0
Group: Applications/Communications
URL: http://www.freerdp.com/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Name: freerdp
Version: 1.0.1
Release: 1%{?dist}
Summary: Remote Desktop Protocol functionality
Group: Applications/Communications
License: Apache License 2.0
URL: http://www.freerdp.com/
Source0: https://github.com/downloads/FreeRDP/FreeRDP/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
BuildRequires: xmlto
BuildRequires: openssl-devel
BuildRequires: libX11-devel, libXcursor-devel, libXext-devel, libXinerama-devel, libXdamage-devel, libXv-devel, libxkbfile-devel
BuildRequires: cups-devel
BuildRequires: alsa-lib-devel
BuildRequires: pcsc-lite-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXinerama-devel
BuildRequires: libXcursor-devel
BuildRequires: libXdamage-devel
BuildRequires: libXv-devel
BuildRequires: libxkbfile-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: cups-devel
BuildRequires: alsa-lib-devel
BuildRequires: pcsc-lite-devel
BuildRequires: desktop-file-utils
%description
FreeRDP is a free implementation of the Remote Desktop Protocol (RDP)
according to the Microsoft Open Specifications.
%package -n xfreerdp
Summary: Remote Desktop Protocol client
Group: Applications/Communications
Requires: %{name}-libs = %{version}-%{release}, %{name}-plugins-standard = %{version}-%{release}
%description -n xfreerdp
%package -n xfreerdp
Summary: Remote Desktop Protocol client
Group: Applications/Communications
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-plugins-standard = %{version}-%{release}
%description -n xfreerdp
FreeRDP is a free implementation of the Remote Desktop Protocol (RDP)
according to the Microsoft Open Specifications.
%package libs
Summary: Core libraries implementing the RDP protocol
Group: Applications/Communications
%description libs
%package libs
Summary: Core libraries implementing the RDP protocol
Group: Applications/Communications
%description libs
libfreerdp-core can be embedded in applications.
libfreerdp-channels and libfreerdp-kbd might be convenient to use in X
@ -40,68 +53,112 @@ applications together with libfreerdp-core.
libfreerdp-core can be extended with plugins handling RDP channels.
%package plugins-standard
Summary: Plugins for handling the standard RDP channels
Group: Applications/Communications
Requires: %{name}-libs = %{version}-%{release}
%description plugins-standard
%package plugins-standard
Summary: Plugins for handling the standard RDP channels
Group: Applications/Communications
Requires: %{name}-libs = %{version}-%{release}
%description plugins-standard
A set of plugins to the channel manager implementing the standard virtual
channels extending RDP core functionality. For instance, sounds, clipboard
sync, disk/printer redirection, etc.
%package devel
Summary: Libraries and header files for embedding and extending freerdp
Group: Applications/Communications
Requires: %{name}-libs = %{version}-%{release}
Requires: pkgconfig
%description devel
%package devel
Summary: Libraries and header files for embedding and extending freerdp
Group: Applications/Communications
Requires: %{name}-libs = %{version}-%{release}
Requires: pkgconfig
%description devel
Header files and unversioned libraries for libfreerdp-core, libfreerdp-channels,
libfreerdp-kbd, libfreerdp-cache, libfreerdp-codec, libfreerdp-rail,
libfreerdp-gdi and libfreerdp-utils.
%prep
%setup -q
cat << EOF > xfreerdp.desktop
[Desktop Entry]
Type=Application
Name=X FreeRDP
NoDisplay=true
Comment=Connect to RDP server and display remote desktop
Icon=%{name}
Exec=/usr/bin/xfreerdp
Terminal=false
Categories=Network;RemoteAccess;
EOF
%build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DWITH_PCSC=ON .
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DWITH_CUPS:BOOL=ON \
-DWITH_PCSC:BOOL=ON \
-DWITH_PULSEAUDIO:BOOL=ON \
-DWITH_X11:BOOL=ON \
-DWITH_XCURSOR:BOOL=ON \
-DWITH_XEXT:BOOL=ON \
-DWITH_XINERAMA:BOOL=ON \
-DWITH_XKBFILE:BOOL=ON \
-DWITH_XV:BOOL=ON \
-DWITH_ALSA:BOOL=ON \
-DWITH_CUNIT:BOOL=OFF \
-DWITH_DIRECTFB:BOOL=OFF \
-DWITH_FFMPEG:BOOL=OFF \
-DWITH_SSE2:BOOL=OFF \
.
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/{freerdp/,lib}*.{a,la} # FIXME: They shouldn't be installed in the first place
%post libs -p /sbin/ldconfig
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications xfreerdp.desktop
install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%postun libs -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%post
# This is no gtk application, but try to integrate nicely with GNOME if it is available
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files -n xfreerdp
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_bindir}/xfreerdp
%{_mandir}/*/*
%{_mandir}/man1/xfreerdp.*
%{_datadir}/applications/xfreerdp.desktop
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%files libs
%defattr(-,root,root)
%doc LICENSE README
%{_libdir}/lib*.so.*
%dir %{_libdir}/freerdp
%{_datadir}/freerdp/
%defattr(-,root,root,-)
%doc LICENSE README ChangeLog
%{_libdir}/lib%{name}-*.so.*
%dir %{_libdir}/%{name}/
%files plugins-standard
%defattr(-,root,root)
%{_libdir}/freerdp/*.so
%defattr(-,root,root,-)
%{_libdir}/%{name}/*
%files devel
%defattr(-,root,root)
%{_includedir}/freerdp/
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%defattr(-,root,root,-)
%{_includedir}/%{name}/
%{_libdir}/lib%{name}-*.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Tue Mar 16 2010 Mads Kiilerich <mads@kiilerich.com> - 0.0.1-1
- Initial "upstream" freerdp spec - made and tested for Fedora 12

View File

@ -1819,7 +1819,7 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (channelId != MCS_GLOBAL_CHANNEL_ID)
{
printf("channelId bad\n");
printf("expected MCS_GLOBAL_CHANNEL_ID %04x, got %04x\n", MCS_GLOBAL_CHANNEL_ID, channelId);
return false;
}
@ -1833,7 +1833,7 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (pduType != PDU_TYPE_DEMAND_ACTIVE)
{
printf("pduType bad\n");
printf("expected PDU_TYPE_DEMAND_ACTIVE %04x, got %04x\n", PDU_TYPE_DEMAND_ACTIVE, pduType);
return false;
}

View File

@ -235,6 +235,7 @@ boolean rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_
uint8 reason;
(void) per_read_enumerated(s, &reason, 0);
DEBUG_RDP("DisconnectProviderUltimatum from server, reason code 0x%02x\n", reason);
rdp->disconnect = true;
@ -497,8 +498,8 @@ boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
}
#ifdef WITH_DEBUG_RDP
if (type != DATA_PDU_TYPE_UPDATE)
printf("recv %s Data PDU (0x%02X), length:%d\n",
/* if (type != DATA_PDU_TYPE_UPDATE) */
DEBUG_RDP("recv %s Data PDU (0x%02X), length:%d",
type < ARRAY_SIZE(DATA_PDU_TYPE_STRINGS) ? DATA_PDU_TYPE_STRINGS[type] : "???", type, length);
#endif