mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
Merge pull request #11941 from blino/optional-channels
Fix build and run with optional channels
This commit is contained in:
@@ -41,20 +41,36 @@
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
#include <freerdp/server/audin.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPSND_SERVER)
|
||||
#include <freerdp/server/rdpsnd.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_CLIPRDR_SERVER)
|
||||
#include <freerdp/server/cliprdr.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_ECHO_SERVER)
|
||||
#include <freerdp/server/echo.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPDR_SERVER)
|
||||
#include <freerdp/server/rdpdr.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPEI_SERVER)
|
||||
#include <freerdp/server/rdpei.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_DRDYNVC_SERVER)
|
||||
#include <freerdp/server/drdynvc.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_REMDESK_SERVER)
|
||||
#include <freerdp/server/remdesk.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_ENCOMSP_SERVER)
|
||||
#include <freerdp/server/encomsp.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_RAIL_SERVER)
|
||||
#include <freerdp/server/rail.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_TELEMETRY_SERVER)
|
||||
#include <freerdp/server/telemetry.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPGFX_SERVER)
|
||||
#include <freerdp/server/rdpgfx.h>
|
||||
#endif
|
||||
@@ -90,20 +106,36 @@ void freerdp_channels_dummy(void)
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
audin_server_context* audin = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPSND_SERVER)
|
||||
RdpsndServerContext* rdpsnd = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_CLIPRDR_SERVER)
|
||||
CliprdrServerContext* cliprdr = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_ECHO_SERVER)
|
||||
echo_server_context* echo = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPDR_SERVER)
|
||||
RdpdrServerContext* rdpdr = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_DRDYNVC_SERVER)
|
||||
DrdynvcServerContext* drdynvc = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPEI_SERVER)
|
||||
RdpeiServerContext* rdpei = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_REMDESK_SERVER)
|
||||
RemdeskServerContext* remdesk = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_ENCOMSP_SERVER)
|
||||
EncomspServerContext* encomsp = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_RAIL_SERVER)
|
||||
RailServerContext* rail = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_TELEMETRY_SERVER)
|
||||
TelemetryServerContext* telemetry = NULL;
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPGFX_SERVER)
|
||||
RdpgfxServerContext* rdpgfx = NULL;
|
||||
#endif
|
||||
@@ -129,30 +161,46 @@ void freerdp_channels_dummy(void)
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
audin_server_context_free(audin);
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPSND_SERVER)
|
||||
rdpsnd = rdpsnd_server_context_new(NULL);
|
||||
rdpsnd_server_context_free(rdpsnd);
|
||||
#endif
|
||||
#if defined(CHANNEL_CLIPRDR_SERVER)
|
||||
cliprdr = cliprdr_server_context_new(NULL);
|
||||
cliprdr_server_context_free(cliprdr);
|
||||
#endif
|
||||
#if defined(CHANNEL_ECHO_SERVER)
|
||||
echo = echo_server_context_new(NULL);
|
||||
echo_server_context_free(echo);
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPDR_SERVER)
|
||||
rdpdr = rdpdr_server_context_new(NULL);
|
||||
rdpdr_server_context_free(rdpdr);
|
||||
#endif
|
||||
#if defined(CHANNEL_DRDYNVC_SERVER)
|
||||
drdynvc = drdynvc_server_context_new(NULL);
|
||||
drdynvc_server_context_free(drdynvc);
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPEI_SERVER)
|
||||
rdpei = rdpei_server_context_new(NULL);
|
||||
rdpei_server_context_free(rdpei);
|
||||
#endif
|
||||
#if defined(CHANNEL_REMDESK_SERVER)
|
||||
remdesk = remdesk_server_context_new(NULL);
|
||||
remdesk_server_context_free(remdesk);
|
||||
#endif
|
||||
#if defined(CHANNEL_ENCOMSP_SERVER)
|
||||
encomsp = encomsp_server_context_new(NULL);
|
||||
encomsp_server_context_free(encomsp);
|
||||
#endif
|
||||
#if defined(CHANNEL_RAIL_SERVER)
|
||||
rail = rail_server_context_new(NULL);
|
||||
rail_server_context_free(rail);
|
||||
#endif
|
||||
#if defined(CHANNEL_TELEMETRY_SERVER)
|
||||
telemetry = telemetry_server_context_new(NULL);
|
||||
telemetry_server_context_free(telemetry);
|
||||
#endif
|
||||
#if defined(CHANNEL_RDPGFX_SERVER)
|
||||
rdpgfx = rdpgfx_server_context_new(NULL);
|
||||
rdpgfx_server_context_free(rdpgfx);
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
|
||||
#include <freerdp/config.h>
|
||||
#include <freerdp/locale/keyboard.h>
|
||||
#if defined(CHANNEL_RDPEI_CLIENT)
|
||||
#include <freerdp/client/rdpei.h>
|
||||
#endif
|
||||
#include <uwac/uwac.h>
|
||||
|
||||
#include "wlfreerdp.h"
|
||||
|
||||
@@ -148,7 +148,7 @@ rdpContext* freerdp_client_context_new(const RDP_CLIENT_ENTRY_POINTS* pEntryPoin
|
||||
context = instance->context;
|
||||
context->instance = instance;
|
||||
|
||||
#if defined(WITH_CHANNELS)
|
||||
#if defined(WITH_CLIENT_CHANNELS)
|
||||
if (freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0) !=
|
||||
CHANNEL_RC_OK)
|
||||
goto out_fail2;
|
||||
@@ -1862,7 +1862,7 @@ static BOOL freerdp_handle_touch_up(rdpClientContext* cctx, const FreeRDP_TouchC
|
||||
}
|
||||
#else
|
||||
WLog_WARN(TAG, "Touch event detected but RDPEI support not compiled in. Recompile with "
|
||||
"-DWITH_CHANNELS=ON");
|
||||
"-DCHANNEL_RDPEI_CLIENT=ON");
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
@@ -1910,7 +1910,7 @@ static BOOL freerdp_handle_touch_down(rdpClientContext* cctx, const FreeRDP_Touc
|
||||
}
|
||||
#else
|
||||
WLog_WARN(TAG, "Touch event detected but RDPEI support not compiled in. Recompile with "
|
||||
"-DWITH_CHANNELS=ON");
|
||||
"-DCHANNEL_RDPEI_CLIENT=ON");
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
@@ -1955,7 +1955,7 @@ static BOOL freerdp_handle_touch_motion(rdpClientContext* cctx, const FreeRDP_To
|
||||
}
|
||||
#else
|
||||
WLog_WARN(TAG, "Touch event detected but RDPEI support not compiled in. Recompile with "
|
||||
"-DWITH_CHANNELS=ON");
|
||||
"-DCHANNEL_RDPEI_CLIENT=ON");
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
@@ -2098,6 +2098,7 @@ static BOOL freerdp_client_register_pen(rdpClientContext* cctx, UINT32 flags, IN
|
||||
|
||||
BOOL freerdp_client_handle_pen(rdpClientContext* cctx, UINT32 flags, INT32 deviceid, ...)
|
||||
{
|
||||
#if defined(CHANNEL_RDPEI_CLIENT)
|
||||
if ((flags & FREERDP_PEN_REGISTER) != 0)
|
||||
{
|
||||
va_list args;
|
||||
@@ -2248,6 +2249,11 @@ BOOL freerdp_client_handle_pen(rdpClientContext* cctx, UINT32 flags, INT32 devic
|
||||
}
|
||||
|
||||
WLog_WARN(TAG, "Invalid pen %" PRId32 " flags 0x%08" PRIx32, deviceid, flags);
|
||||
#else
|
||||
WLog_WARN(TAG, "Pen event detected but RDPEI support not compiled in. Recompile with "
|
||||
"-DCHANNEL_RDPEI_CLIENT=ON");
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2255,6 +2261,7 @@ BOOL freerdp_client_pen_cancel_all(rdpClientContext* cctx)
|
||||
{
|
||||
WINPR_ASSERT(cctx);
|
||||
|
||||
#if defined(CHANNEL_RDPEI_CLIENT)
|
||||
RdpeiClientContext* rdpei = cctx->rdpei;
|
||||
|
||||
if (!rdpei)
|
||||
@@ -2271,6 +2278,11 @@ BOOL freerdp_client_pen_cancel_all(rdpClientContext* cctx)
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
#else
|
||||
WLog_WARN(TAG, "Pen event detected but RDPEI support not compiled in. Recompile with "
|
||||
"-DCHANNEL_RDPEI_CLIENT=ON");
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL freerdp_client_is_pen(rdpClientContext* cctx, INT32 deviceid)
|
||||
|
||||
@@ -5972,28 +5972,54 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
||||
#if defined(CHANNEL_AINPUT_CLIENT)
|
||||
{ FreeRDP_BOOL_UNUSED, AINPUT_CHANNEL_NAME, NULL }, /* always loaded */
|
||||
#endif
|
||||
#ifdef CHANNEL_AUDIN_CLIENT
|
||||
{ FreeRDP_AudioCapture, AUDIN_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_RPDSND_CLIENT
|
||||
{ FreeRDP_AudioPlayback, RDPSND_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_RDPEI_CLIENT
|
||||
{ FreeRDP_MultiTouchInput, RDPEI_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_RDPGFX_CLIENT
|
||||
{ FreeRDP_SupportGraphicsPipeline, RDPGFX_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_ECHO_CLIENT
|
||||
{ FreeRDP_SupportEchoChannel, ECHO_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_SSHAGENT_CLIENT
|
||||
{ FreeRDP_SupportSSHAgentChannel, "sshagent", NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_DISP_CLIENT
|
||||
{ FreeRDP_SupportDisplayControl, DISP_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_GEOMETRY_CLIENT
|
||||
{ FreeRDP_SupportGeometryTracking, GEOMETRY_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_VIDEO_CLIENT
|
||||
{ FreeRDP_SupportVideoOptimized, VIDEO_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#ifdef CHANNEL_RDPEAR_CLIENT
|
||||
{ FreeRDP_RemoteCredentialGuard, RDPEAR_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
};
|
||||
|
||||
ChannelToLoad staticChannels[] = {
|
||||
#if defined(CHANNEL_RPDSND_CLIENT)
|
||||
{ FreeRDP_AudioPlayback, RDPSND_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#if defined(CHANNEL_CLIPRDR_CLIENT)
|
||||
{ FreeRDP_RedirectClipboard, CLIPRDR_SVC_CHANNEL_NAME, NULL },
|
||||
#endif
|
||||
#if defined(CHANNEL_ENCOMSP_CLIENT)
|
||||
{ FreeRDP_EncomspVirtualChannel, ENCOMSP_SVC_CHANNEL_NAME, settings },
|
||||
#endif
|
||||
#if defined(CHANNEL_REMDESK_CLIENT)
|
||||
{ FreeRDP_RemdeskVirtualChannel, REMDESK_SVC_CHANNEL_NAME, settings },
|
||||
#endif
|
||||
#if defined(CHANNEL_RAIL_CLIENT)
|
||||
{ FreeRDP_RemoteApplicationMode, RAIL_SVC_CHANNEL_NAME, settings }
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user