channels: fix export of symbols on Windows

This commit is contained in:
Marc-André Moreau 2012-10-07 10:21:54 -04:00
parent f8b049630f
commit 3d98273185
15 changed files with 57 additions and 10 deletions

View File

@ -173,12 +173,23 @@ if(NOT WIN32)
endif()
endif()
if(WIN32)
set(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_PREFIX})
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX})
set(CMAKE_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX})
endif()
# Path to put FreeRDP data
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp")
set(FREERDP_KEYMAP_PATH "${FREERDP_DATA_PATH}/keymaps")
# Path to put plugins
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp")
if(WIN32)
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}")
else()
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp")
endif()
set(FREERDP_CLIENT_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/client")
set(FREERDP_SERVER_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/server")

View File

@ -25,6 +25,10 @@ set(${MODULE_PREFIX}_SRCS
cliprdr_main.c
cliprdr_main.h)
if(MSVC AND (NOT WITH_STATIC_PLUGINS))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -0,0 +1,3 @@
LIBRARY "cliprdr"
EXPORTS
VirtualChannelEntry @1

View File

@ -30,6 +30,10 @@ if(WIN32)
dirent.h)
endif()
if(MSVC AND (NOT WITH_STATIC_PLUGINS))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
include_directories(../../rdpdr/client)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
@ -45,3 +49,6 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -38,6 +38,8 @@
#include <time.h>
#include <sys/stat.h>
#include <winpr/crt.h>
#include <freerdp/utils/memory.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/unicode.h>
@ -112,7 +114,7 @@ static char* disk_file_combine_fullpath(const char* base_path, const char* path)
{
char* fullpath;
fullpath = xmalloc(strlen(base_path) + strlen(path) + 1);
fullpath = (char*) malloc(strlen(base_path) + strlen(path) + 1);
strcpy(fullpath, base_path);
strcat(fullpath, path);
disk_file_fix_path(fullpath);
@ -123,9 +125,9 @@ static char* disk_file_combine_fullpath(const char* base_path, const char* path)
static boolean disk_file_remove_dir(const char* path)
{
DIR* dir;
struct dirent* pdirent;
struct STAT st;
char* p;
struct STAT st;
struct dirent* pdirent;
boolean ret = true;
dir = opendir(path);
@ -143,8 +145,9 @@ static boolean disk_file_remove_dir(const char* path)
continue;
}
p = xmalloc(strlen(path) + strlen(pdirent->d_name) + 2);
p = (char*) malloc(strlen(path) + strlen(pdirent->d_name) + 2);
sprintf(p, "%s/%s", path, pdirent->d_name);
if (STAT(p, &st) != 0)
{
DEBUG_WARN("stat %s failed.", p);
@ -160,8 +163,11 @@ static boolean disk_file_remove_dir(const char* path)
ret = false;
}
else
{
ret = true;
xfree(p);
}
free(p);
if (!ret)
break;
@ -170,6 +176,7 @@ static boolean disk_file_remove_dir(const char* path)
}
closedir(dir);
if (ret)
{
if (rmdir(path) < 0)
@ -559,7 +566,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui
xfree(file->pattern);
if (path[0])
file->pattern = strdup(strrchr(path, '\\') + 1);
file->pattern = _strdup(strrchr(path, '\\') + 1);
else
file->pattern = NULL;
}

View File

@ -0,0 +1,3 @@
LIBRARY "disk"
EXPORTS
DeviceServiceEntry @1

View File

@ -35,3 +35,4 @@ endif()
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -55,3 +55,4 @@ endif()
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -30,6 +30,10 @@ set(${MODULE_PREFIX}_SRCS
rdpdr_main.c
rdpdr_main.h)
if(MSVC AND (NOT WITH_STATIC_PLUGINS))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -0,0 +1,3 @@
LIBRARY "rdpdr"
EXPORTS
VirtualChannelEntry @1

View File

@ -26,8 +26,8 @@
#include <stdlib.h>
#include <string.h>
#include <freerdp/constants.h>
#include <freerdp/types.h>
#include <freerdp/constants.h>
#include <freerdp/utils/memory.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/unicode.h>
@ -63,6 +63,7 @@ static void rdpdr_process_connect(rdpSvcPlugin* plugin)
{
devman_load_device_service(rdpdr->devman, data);
}
data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size);
}
}

View File

@ -26,6 +26,7 @@
#include "rdpdr_types.h"
typedef struct rdpdr_plugin rdpdrPlugin;
struct rdpdr_plugin
{
rdpSvcPlugin plugin;

View File

@ -37,3 +37,4 @@ endif()
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -38,3 +38,4 @@ target_link_libraries(${MODULE_NAME} ${PCSC_LIBRARIES})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -39,7 +39,7 @@ add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS})
if(WITH_MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp)
if(WITH_RDPDR)
if(WITH_RDPDR AND WITH_STATIC_PLUGINS)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rdpdr disk printer)
endif()
else()
@ -55,4 +55,3 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows")