wfreerdp: fix compilation on Windows

This commit is contained in:
Marc-André Moreau 2012-10-09 12:23:35 -04:00
parent 47c44ae3dd
commit fba82c1a23
5 changed files with 22 additions and 30 deletions

View File

@ -6,9 +6,6 @@ set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS]")
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
if(WIN32)
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
else()
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
endif()
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)

View File

@ -6,9 +6,5 @@ set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS] [MS-RDPEPC] [MS-RDPESC] [MS-RDPESP]")
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
if(WIN32)
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
else()
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
endif()
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)

View File

@ -36,12 +36,10 @@ set(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client)
if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
if(WITH_RDPDR AND STATIC_CHANNELS)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rdpdr disk printer)
endif()
else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core

View File

@ -43,6 +43,7 @@
#include <freerdp/utils/memory.h>
#include <freerdp/utils/load_plugin.h>
#include <freerdp/utils/svc_plugin.h>
#include <freerdp/client/channels.h>
#include <freerdp/channels/channels.h>
#include "wf_gdi.h"
@ -453,9 +454,21 @@ BOOL wf_check_fds(freerdp* instance)
int wf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data)
{
void* entry = NULL;
rdpChannels* channels = (rdpChannels*) user_data;
printf("loading plugin %s\n", name);
entry = freerdp_channels_find_static_virtual_channel_entry(name);
if (entry)
{
if (freerdp_channels_client_load(channels, settings, entry, plugin_data) == 0)
{
printf("loading channel %s (static)\n", name);
return 1;
}
}
printf("loading channel %s (plugin)\n", name);
freerdp_channels_load_plugin(channels, settings, name, plugin_data);
return 1;
@ -637,12 +650,6 @@ static DWORD WINAPI kbd_thread_func(LPVOID lpParam)
return (DWORD) NULL;
}
#ifdef WITH_RDPDR
DEFINE_SVC_PLUGIN_ENTRY(rdpdr) ;
DEFINE_DEV_PLUGIN_ENTRY(disk) ;
DEFINE_DEV_PLUGIN_ENTRY(printer) ;
#endif
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
@ -701,12 +708,6 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
instance->context->argc = __argc;
instance->context->argv = __argv;
#ifdef WITH_RDPDR
REGISTER_SVC_PLUGIN_ENTRY(rdpdr);
REGISTER_DEV_PLUGIN_ENTRY(disk);
REGISTER_DEV_PLUGIN_ENTRY(printer);
#endif
if (!CreateThread(NULL, 0, kbd_thread_func, NULL, 0, NULL))
printf("error creating keyboard handler thread");

View File

@ -22,9 +22,9 @@
#include <freerdp/api.h>
void* freerdp_channels_find_static_virtual_channel_entry(const char* name);
void* freerdp_channels_find_static_device_service_entry(const char* name);
void* freerdp_channels_find_static_entry(const char* name, const char* entry);
FREERDP_API void* freerdp_channels_find_static_virtual_channel_entry(const char* name);
FREERDP_API void* freerdp_channels_find_static_device_service_entry(const char* name);
FREERDP_API void* freerdp_channels_find_static_entry(const char* name, const char* entry);
#endif /* FREERDP_CHANNELS_CLIENT */