mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
[cmake] add explicit instructions to turn off unmaintained modules
* Add detailed CMake warning to disable unmaintained modules * Add sample shadow subsystem implementation * Allow building shadow server with dummy subsystem
This commit is contained in:
parent
13cacd5010
commit
e3c93573f3
@ -26,7 +26,10 @@ endif()
|
|||||||
|
|
||||||
if(FREERDP_VENDOR AND WITH_CLIENT)
|
if(FREERDP_VENDOR AND WITH_CLIENT)
|
||||||
if(WIN32 AND NOT UWP)
|
if(WIN32 AND NOT UWP)
|
||||||
add_subdirectory(Windows)
|
option(WITH_CLIENT_WINDOWS "Build native windows client" ON)
|
||||||
|
if(WITH_CLIENT_WINDOWS)
|
||||||
|
add_subdirectory(Windows)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
if(WITH_SAMPLE)
|
if(WITH_SAMPLE)
|
||||||
add_subdirectory(Sample)
|
add_subdirectory(Sample)
|
||||||
@ -47,10 +50,13 @@ if(FREERDP_VENDOR AND WITH_CLIENT)
|
|||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(IOS)
|
if(IOS)
|
||||||
if(NOT WITHOUT_FREERDP_3x_DEPRECATED)
|
option(WITH_CLIENT_IOS "Build native iOS client" ON)
|
||||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/iOS")
|
if(WITH_CLIENT_IOS)
|
||||||
message(STATUS "Adding iOS client")
|
if(NOT WITHOUT_FREERDP_3x_DEPRECATED)
|
||||||
add_subdirectory(iOS)
|
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/iOS")
|
||||||
|
message(STATUS "Adding iOS client")
|
||||||
|
add_subdirectory(iOS)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
set(MODULE_NAME "wlfreerdp")
|
set(MODULE_NAME "wlfreerdp")
|
||||||
set(MODULE_PREFIX "FREERDP_CLIENT_WAYLAND")
|
set(MODULE_PREFIX "FREERDP_CLIENT_WAYLAND")
|
||||||
|
|
||||||
|
include(WarnUnmaintained)
|
||||||
|
warn_unmaintained(${MODULE_NAME} "-DWITH_CLIENT_WAYLAND=OFF")
|
||||||
|
|
||||||
include_directories(SYSTEM ${WAYLAND_INCLUDE_DIR})
|
include_directories(SYSTEM ${WAYLAND_INCLUDE_DIR})
|
||||||
|
|
||||||
set(${MODULE_PREFIX}_SRCS
|
set(${MODULE_PREFIX}_SRCS
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
set(MODULE_NAME "wfreerdp-client")
|
set(MODULE_NAME "wfreerdp-client")
|
||||||
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS_CONTROL")
|
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS_CONTROL")
|
||||||
|
|
||||||
|
include(WarnUnmaintained)
|
||||||
|
warn_unmaintained(${MODULE_NAME} "-DWITH_CLIENT_WINDOWS=OFF")
|
||||||
|
|
||||||
set(${MODULE_PREFIX}_SRCS
|
set(${MODULE_PREFIX}_SRCS
|
||||||
wf_gdi.c
|
wf_gdi.c
|
||||||
wf_gdi.h
|
wf_gdi.h
|
||||||
|
@ -28,6 +28,9 @@ message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}")
|
|||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_CURRENT_SOURCE_DIR}/../../cmake/)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_CURRENT_SOURCE_DIR}/../../cmake/)
|
||||||
include(CommonConfigOptions)
|
include(CommonConfigOptions)
|
||||||
|
|
||||||
|
include(WarnUnmaintained)
|
||||||
|
warn_unmaintained(${PROJECT_NAME} "-DWITH_CLIENT_IOS=OFF")
|
||||||
|
|
||||||
set(MODULE_NAME "iFreeRDP")
|
set(MODULE_NAME "iFreeRDP")
|
||||||
set(MODULE_PREFIX "IFREERDP_CLIENT")
|
set(MODULE_PREFIX "IFREERDP_CLIENT")
|
||||||
set(APP_TYPE MACOSX_BUNDLE)
|
set(APP_TYPE MACOSX_BUNDLE)
|
||||||
|
@ -11,4 +11,5 @@ macro(warn_unmaintained name)
|
|||||||
"[unmaintained] - don't hesitate to ask some questions. (replies might take some time depending on your timezone)"
|
"[unmaintained] - don't hesitate to ask some questions. (replies might take some time depending on your timezone)"
|
||||||
)
|
)
|
||||||
message(WARNING "[unmaintained] - if you intend using this component write us a message")
|
message(WARNING "[unmaintained] - if you intend using this component write us a message")
|
||||||
|
message(WARNING "[unmaintained] use ${ARGN} to disable")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
set(MODULE_NAME "mfreerdp-server")
|
set(MODULE_NAME "mfreerdp-server")
|
||||||
set(MODULE_PREFIX "FREERDP_SERVER_MAC")
|
set(MODULE_PREFIX "FREERDP_SERVER_MAC")
|
||||||
|
|
||||||
|
include(WarnUnmaintained)
|
||||||
|
warn_unmaintained(${MODULE_NAME} "-DWITH_PLATFORM_SERVER=OFF")
|
||||||
|
|
||||||
find_library(AUDIO_TOOL AudioToolbox)
|
find_library(AUDIO_TOOL AudioToolbox)
|
||||||
find_library(CORE_AUDIO CoreAudio)
|
find_library(CORE_AUDIO CoreAudio)
|
||||||
find_library(CORE_VIDEO CoreVideo)
|
find_library(CORE_VIDEO CoreVideo)
|
||||||
|
@ -19,7 +19,7 @@ set(MODULE_NAME "wfreerdp-server")
|
|||||||
set(MODULE_PREFIX "FREERDP_SERVER_WINDOWS")
|
set(MODULE_PREFIX "FREERDP_SERVER_WINDOWS")
|
||||||
|
|
||||||
include(WarnUnmaintained)
|
include(WarnUnmaintained)
|
||||||
warn_unmaintained(${MODULE_NAME})
|
warn_unmaintained(${MODULE_NAME} "-DWITH_PLATFORM_SERVER=OFF")
|
||||||
|
|
||||||
include_directories(.)
|
include_directories(.)
|
||||||
|
|
||||||
|
@ -92,12 +92,17 @@ set(MODULE_NAME "freerdp-shadow-subsystem")
|
|||||||
|
|
||||||
set(SRCS shadow_subsystem_builtin.c)
|
set(SRCS shadow_subsystem_builtin.c)
|
||||||
|
|
||||||
if(WIN32)
|
option(WITH_SHADOW_SUBSYSTEM "Build actual shadow platform subsystem implementation" ON)
|
||||||
add_subdirectory(Win)
|
if(WITH_SHADOW_SUBSYSTEM)
|
||||||
elseif(NOT APPLE)
|
if(WIN32)
|
||||||
add_subdirectory(X11)
|
add_subdirectory(Win)
|
||||||
elseif(APPLE AND NOT IOS)
|
elseif(NOT APPLE)
|
||||||
add_subdirectory(Mac)
|
add_subdirectory(X11)
|
||||||
|
elseif(APPLE AND NOT IOS)
|
||||||
|
add_subdirectory(Mac)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_subdirectory(Sample)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
addtargetwithresourcefile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" SRCS)
|
addtargetwithresourcefile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" SRCS)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
include(WarnUnmaintained)
|
include(WarnUnmaintained)
|
||||||
warn_unmaintained("mac shadow server subsystem")
|
warn_unmaintained("mac shadow server subsystem" "-DWITH_SHADOW_SUBSYSTEM=OFF")
|
||||||
|
|
||||||
find_library(IOKIT IOKit REQUIRED)
|
find_library(IOKIT IOKit REQUIRED)
|
||||||
find_library(IOSURFACE IOSurface REQUIRED)
|
find_library(IOSURFACE IOSurface REQUIRED)
|
||||||
|
1
server/shadow/Sample/CMakeLists.txt
Normal file
1
server/shadow/Sample/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
add_library(freerdp-shadow-subsystem-impl STATIC sample_shadow.c sample_shadow.h)
|
177
server/shadow/Sample/sample_shadow.c
Normal file
177
server/shadow/Sample/sample_shadow.c
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
/**
|
||||||
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||||
|
*
|
||||||
|
* Copyright 2025 Armin Novak <anovak@thincast.com>
|
||||||
|
* Copyright 2025 Thincast Technologies GmbH
|
||||||
|
*
|
||||||
|
* Licensed 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <winpr/crt.h>
|
||||||
|
#include <winpr/synch.h>
|
||||||
|
#include <winpr/sysinfo.h>
|
||||||
|
|
||||||
|
#include <freerdp/log.h>
|
||||||
|
#include <freerdp/codec/color.h>
|
||||||
|
#include <freerdp/codec/region.h>
|
||||||
|
#include <freerdp/server/server-common.h>
|
||||||
|
|
||||||
|
#include "sample_shadow.h"
|
||||||
|
|
||||||
|
#define TAG SERVER_TAG("shadow.sample")
|
||||||
|
|
||||||
|
static BOOL sample_shadow_input_synchronize_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
|
||||||
|
WINPR_ATTR_UNUSED rdpShadowClient* client,
|
||||||
|
WINPR_ATTR_UNUSED UINT32 flags)
|
||||||
|
{
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL sample_shadow_input_keyboard_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
|
||||||
|
WINPR_ATTR_UNUSED rdpShadowClient* client,
|
||||||
|
WINPR_ATTR_UNUSED UINT16 flags,
|
||||||
|
WINPR_ATTR_UNUSED UINT8 code)
|
||||||
|
{
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL sample_shadow_input_unicode_keyboard_event(
|
||||||
|
WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem, WINPR_ATTR_UNUSED rdpShadowClient* client,
|
||||||
|
WINPR_ATTR_UNUSED UINT16 flags, WINPR_ATTR_UNUSED UINT16 code)
|
||||||
|
{
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL sample_shadow_input_mouse_event(WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem,
|
||||||
|
WINPR_ATTR_UNUSED rdpShadowClient* client,
|
||||||
|
WINPR_ATTR_UNUSED UINT16 flags,
|
||||||
|
WINPR_ATTR_UNUSED UINT16 x, WINPR_ATTR_UNUSED UINT16 y)
|
||||||
|
{
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL sample_shadow_input_extended_mouse_event(
|
||||||
|
WINPR_ATTR_UNUSED rdpShadowSubsystem* subsystem, WINPR_ATTR_UNUSED rdpShadowClient* client,
|
||||||
|
WINPR_ATTR_UNUSED UINT16 flags, WINPR_ATTR_UNUSED UINT16 x, WINPR_ATTR_UNUSED UINT16 y)
|
||||||
|
{
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static UINT32 sample_shadow_enum_monitors(WINPR_ATTR_UNUSED MONITOR_DEF* monitors,
|
||||||
|
WINPR_ATTR_UNUSED UINT32 maxMonitors)
|
||||||
|
{
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sample_shadow_subsystem_init(rdpShadowSubsystem* arg)
|
||||||
|
{
|
||||||
|
sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
|
||||||
|
WINPR_ASSERT(subsystem);
|
||||||
|
|
||||||
|
subsystem->base.numMonitors = sample_shadow_enum_monitors(subsystem->base.monitors, 16);
|
||||||
|
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
|
||||||
|
MONITOR_DEF* virtualScreen = &(subsystem->base.virtualScreen);
|
||||||
|
virtualScreen->left = 0;
|
||||||
|
virtualScreen->top = 0;
|
||||||
|
virtualScreen->right = 0;
|
||||||
|
virtualScreen->bottom = 0;
|
||||||
|
virtualScreen->flags = 1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sample_shadow_subsystem_uninit(rdpShadowSubsystem* arg)
|
||||||
|
{
|
||||||
|
sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
|
||||||
|
|
||||||
|
if (!subsystem)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sample_shadow_subsystem_start(rdpShadowSubsystem* arg)
|
||||||
|
{
|
||||||
|
sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
|
||||||
|
|
||||||
|
if (!subsystem)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sample_shadow_subsystem_stop(rdpShadowSubsystem* arg)
|
||||||
|
{
|
||||||
|
sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
|
||||||
|
|
||||||
|
if (!subsystem)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
WLog_WARN(TAG, "TODO: Implement!");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sample_shadow_subsystem_free(rdpShadowSubsystem* arg)
|
||||||
|
{
|
||||||
|
sampleShadowSubsystem* subsystem = (sampleShadowSubsystem*)arg;
|
||||||
|
|
||||||
|
if (!subsystem)
|
||||||
|
return;
|
||||||
|
|
||||||
|
sample_shadow_subsystem_uninit(arg);
|
||||||
|
free(subsystem);
|
||||||
|
}
|
||||||
|
|
||||||
|
static rdpShadowSubsystem* sample_shadow_subsystem_new(void)
|
||||||
|
{
|
||||||
|
sampleShadowSubsystem* subsystem =
|
||||||
|
(sampleShadowSubsystem*)calloc(1, sizeof(sampleShadowSubsystem));
|
||||||
|
|
||||||
|
if (!subsystem)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
subsystem->base.SynchronizeEvent = sample_shadow_input_synchronize_event;
|
||||||
|
subsystem->base.KeyboardEvent = sample_shadow_input_keyboard_event;
|
||||||
|
subsystem->base.UnicodeKeyboardEvent = sample_shadow_input_unicode_keyboard_event;
|
||||||
|
subsystem->base.MouseEvent = sample_shadow_input_mouse_event;
|
||||||
|
subsystem->base.ExtendedMouseEvent = sample_shadow_input_extended_mouse_event;
|
||||||
|
return &subsystem->base;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* ShadowSubsystemName(void)
|
||||||
|
{
|
||||||
|
return "Sample";
|
||||||
|
}
|
||||||
|
|
||||||
|
int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
|
||||||
|
{
|
||||||
|
pEntryPoints->New = sample_shadow_subsystem_new;
|
||||||
|
pEntryPoints->Free = sample_shadow_subsystem_free;
|
||||||
|
pEntryPoints->Init = sample_shadow_subsystem_init;
|
||||||
|
pEntryPoints->Uninit = sample_shadow_subsystem_uninit;
|
||||||
|
pEntryPoints->Start = sample_shadow_subsystem_start;
|
||||||
|
pEntryPoints->Stop = sample_shadow_subsystem_stop;
|
||||||
|
pEntryPoints->EnumMonitors = sample_shadow_enum_monitors;
|
||||||
|
return 1;
|
||||||
|
}
|
43
server/shadow/Sample/sample_shadow.h
Normal file
43
server/shadow/Sample/sample_shadow.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||||
|
*
|
||||||
|
* Copyright 2025 Armin Novak <anovak@thincast.com>
|
||||||
|
* Copyright 2025 Thincast Technologies GmbH
|
||||||
|
*
|
||||||
|
* Licensed 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <freerdp/server/shadow.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct sample_shadow_subsystem sampleShadowSubsystem;
|
||||||
|
|
||||||
|
struct sample_shadow_subsystem
|
||||||
|
{
|
||||||
|
rdpShadowSubsystem base;
|
||||||
|
|
||||||
|
/* Additional platform specific stuff goes here */
|
||||||
|
};
|
||||||
|
|
||||||
|
FREERDP_API const char* ShadowSubsystemName(void);
|
||||||
|
FREERDP_API int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
include(WarnUnmaintained)
|
include(WarnUnmaintained)
|
||||||
warn_unmaintained("windows shadow server subsystem")
|
warn_unmaintained("windows shadow server subsystem" "-DWITH_SHADOW_SUBSYSTEM=OFF")
|
||||||
|
|
||||||
add_compile_definitions(WITH_SHADOW_WIN)
|
add_compile_definitions(WITH_SHADOW_WIN)
|
||||||
add_library(
|
add_library(
|
||||||
|
Loading…
Reference in New Issue
Block a user