Compare commits
3 Commits
d500b341ab
...
cb6ec47e5b
Author | SHA1 | Date |
---|---|---|
Alexander Zhirov | cb6ec47e5b | |
Alexander Zhirov | 5413299265 | |
Alexander Zhirov | c6471e47f9 |
|
@ -1,4 +1,5 @@
|
|||
/Debug
|
||||
/.settings
|
||||
/.vscode
|
||||
.project
|
||||
.cproject
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
project(xfree)
|
||||
#include_directories(/home/alexander/repositories/iup/include)
|
||||
include_directories(/root/iup/include)
|
||||
set(SOURCE_EXE
|
||||
address.c
|
||||
arguments.c
|
||||
concat.c
|
||||
db.c
|
||||
gui.c
|
||||
images.c
|
||||
monitor.c
|
||||
node_settings.c
|
||||
rxrandr_broker.c
|
||||
rxrandr.c
|
||||
settings.c
|
||||
xfreerdp.c
|
||||
xrdp.c
|
||||
)
|
||||
add_executable(xfree ${SOURCE_EXE})
|
||||
#target_link_libraries(xfree iup X11 Xrandr m /home/alexander/programming/c/iup/sqlite3.a)
|
||||
target_link_libraries(xfree
|
||||
gtk-3
|
||||
gdk-3
|
||||
pangocairo-1.0
|
||||
pango-1.0
|
||||
atk-1.0
|
||||
cairo-gobject
|
||||
cairo
|
||||
gdk_pixbuf-2.0
|
||||
gio-2.0
|
||||
gobject-2.0
|
||||
glib-2.0
|
||||
X11
|
||||
Xrandr
|
||||
m
|
||||
|
||||
dl
|
||||
pthread
|
||||
|
||||
/root/iup/lib/Linux515/libiup.a
|
||||
/root/SQLite/sqlite3.a
|
||||
)
|
||||
#target_link_libraries(xfree iup X11 Xrandr m sqlite3 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lX11 -lXrandr -lm)
|
|
@ -1,253 +0,0 @@
|
|||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# FreeRDP X11 Client
|
||||
#
|
||||
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
# Copyright 2013 Corey Clayton <can.of.tuna@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
set(MODULE_NAME "xfreerdp-client")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_X11_CONTROL")
|
||||
|
||||
include(FindDocBookXSL)
|
||||
include_directories(${X11_INCLUDE_DIRS})
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
include_directories(iup PRIVATE /root/iup/iup/source/include)
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
xf_gdi.c
|
||||
xf_gdi.h
|
||||
xf_gfx.c
|
||||
xf_gfx.h
|
||||
xf_rail.c
|
||||
xf_rail.h
|
||||
xf_input.c
|
||||
xf_input.h
|
||||
xf_event.c
|
||||
xf_event.h
|
||||
xf_floatbar.c
|
||||
xf_floatbar.h
|
||||
xf_input.c
|
||||
xf_input.h
|
||||
xf_channels.c
|
||||
xf_channels.h
|
||||
xf_cliprdr.c
|
||||
xf_cliprdr.h
|
||||
xf_monitor.c
|
||||
xf_monitor.h
|
||||
xf_disp.c
|
||||
xf_disp.h
|
||||
xf_graphics.c
|
||||
xf_graphics.h
|
||||
xf_keyboard.c
|
||||
xf_keyboard.h
|
||||
xf_video.c
|
||||
xf_video.h
|
||||
xf_window.c
|
||||
xf_window.h
|
||||
xf_client.c
|
||||
xf_client.h)
|
||||
|
||||
if (CHANNEL_TSMF_CLIENT)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS}
|
||||
xf_tsmf.c
|
||||
xf_tsmf.h)
|
||||
endif()
|
||||
|
||||
if(WITH_CLIENT_INTERFACE)
|
||||
if(CLIENT_INTERFACE_SHARED)
|
||||
add_library(${MODULE_NAME} SHARED ${${MODULE_PREFIX}_SRCS})
|
||||
if (WITH_LIBRARY_VERSIONING)
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
||||
endif()
|
||||
else()
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
endif()
|
||||
|
||||
else()
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/xfreerdp.c cli/images.c xfreerdp.h cli/arguments.c cli/concat.c cli/gui.c cli/node_settings.c cli/rxrandr_broker cli/rxrandr.c cli/settings.c cli/db.c cli/address.c cli/monitor.c cli/xrdp.c)
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "xfreerdp")
|
||||
include_directories(..)
|
||||
endif()
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS
|
||||
${X11_LIBRARIES})
|
||||
|
||||
if(WITH_MANPAGES)
|
||||
find_program(XSLTPROC_EXECUTABLE NAMES xsltproc)
|
||||
|
||||
if(DOCBOOKXSL_FOUND AND XSLTPROC_EXECUTABLE)
|
||||
|
||||
# We need the variable ${MAN_TODAY} to contain the current date in ISO
|
||||
# format to replace it in the configure_file step.
|
||||
include(today)
|
||||
|
||||
TODAY(MAN_TODAY)
|
||||
|
||||
configure_file(xfreerdp.1.xml.in xfreerdp.1.xml @ONLY IMMEDIATE)
|
||||
|
||||
# Compile the helper tool with default compiler settings.
|
||||
# We need the include paths though.
|
||||
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
|
||||
set(GENERATE_INCLUDES "")
|
||||
foreach(dir ${dirs})
|
||||
set(GENERATE_INCLUDES ${GENERATE_INCLUDES} -I${dir})
|
||||
endforeach(dir)
|
||||
|
||||
add_custom_command(OUTPUT xfreerdp.1
|
||||
COMMAND ${CMAKE_C_COMPILER} ${GENERATE_INCLUDES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/generate_argument_docbook.c
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/generate_argument_docbook
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/generate_argument_docbook
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp-channels.1.xml ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp-examples.1.xml ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp-envvar.1.xml ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${XSLTPROC_EXECUTABLE} ${DOCBOOKXSL_DIR}/manpages/docbook.xsl xfreerdp.1.xml
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/xfreerdp.1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp-examples.1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp-channels.1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xfreerdp-envvar.1.xml)
|
||||
|
||||
add_custom_target(xfreerdp.manpage ALL
|
||||
DEPENDS xfreerdp.1)
|
||||
|
||||
install_freerdp_man(${CMAKE_CURRENT_BINARY_DIR}/xfreerdp.1 1)
|
||||
else()
|
||||
message(WARNING "WITH_MANPAGES was set, but xsltproc was not found. man-pages will not be installed")
|
||||
endif()
|
||||
endif(WITH_MANPAGES)
|
||||
|
||||
set(XSHM_FEATURE_TYPE "REQUIRED")
|
||||
set(XSHM_FEATURE_PURPOSE "X11 shared memory")
|
||||
set(XSHM_FEATURE_DESCRIPTION "X11 shared memory extension")
|
||||
|
||||
set(XINERAMA_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XINERAMA_FEATURE_PURPOSE "multi-monitor")
|
||||
set(XINERAMA_FEATURE_DESCRIPTION "X11 multi-monitor extension")
|
||||
|
||||
set(XEXT_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XEXT_FEATURE_PURPOSE "X11 extension")
|
||||
set(XEXT_FEATURE_DESCRIPTION "X11 core extensions")
|
||||
|
||||
set(XCURSOR_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XCURSOR_FEATURE_PURPOSE "cursor")
|
||||
set(XCURSOR_FEATURE_DESCRIPTION "X11 cursor extension")
|
||||
|
||||
set(XV_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XV_FEATURE_PURPOSE "video")
|
||||
set(XV_FEATURE_DESCRIPTION "X11 video extension")
|
||||
|
||||
set(XI_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XI_FEATURE_PURPOSE "input")
|
||||
set(XI_FEATURE_DESCRIPTION "X11 input extension")
|
||||
|
||||
set(XRENDER_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XRENDER_FEATURE_PURPOSE "rendering")
|
||||
set(XRENDER_FEATURE_DESCRIPTION "X11 render extension")
|
||||
|
||||
set(XRANDR_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XRANDR_FEATURE_PURPOSE "tracking output configuration")
|
||||
set(XRANDR_FEATURE_DESCRIPTION "X11 randr extension")
|
||||
|
||||
set(XFIXES_FEATURE_TYPE "RECOMMENDED")
|
||||
set(XFIXES_FEATURE_PURPOSE "X11 xfixes extension")
|
||||
set(XFIXES_FEATURE_DESCRIPTION "Useful additions to the X11 core protocol")
|
||||
|
||||
find_feature(XShm ${XSHM_FEATURE_TYPE} ${XSHM_FEATURE_PURPOSE} ${XSHM_FEATURE_DESCRIPTION})
|
||||
find_feature(Xinerama ${XINERAMA_FEATURE_TYPE} ${XINERAMA_FEATURE_PURPOSE} ${XINERAMA_FEATURE_DESCRIPTION})
|
||||
find_feature(Xext ${XEXT_FEATURE_TYPE} ${XEXT_FEATURE_PURPOSE} ${XEXT_FEATURE_DESCRIPTION})
|
||||
find_feature(Xcursor ${XCURSOR_FEATURE_TYPE} ${XCURSOR_FEATURE_PURPOSE} ${XCURSOR_FEATURE_DESCRIPTION})
|
||||
find_feature(Xv ${XV_FEATURE_TYPE} ${XV_FEATURE_PURPOSE} ${XV_FEATURE_DESCRIPTION})
|
||||
find_feature(Xi ${XI_FEATURE_TYPE} ${XI_FEATURE_PURPOSE} ${XI_FEATURE_DESCRIPTION})
|
||||
find_feature(Xrender ${XRENDER_FEATURE_TYPE} ${XRENDER_FEATURE_PURPOSE} ${XRENDER_FEATURE_DESCRIPTION})
|
||||
find_feature(XRandR ${XRANDR_FEATURE_TYPE} ${XRANDR_FEATURE_PURPOSE} ${XRANDR_FEATURE_DESCRIPTION})
|
||||
find_feature(Xfixes ${XFIXES_FEATURE_TYPE} ${XFIXES_FEATURE_PURPOSE} ${XFIXES_FEATURE_DESCRIPTION})
|
||||
|
||||
if(WITH_XINERAMA)
|
||||
add_definitions(-DWITH_XINERAMA)
|
||||
include_directories(${XINERAMA_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XINERAMA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XEXT)
|
||||
add_definitions(-DWITH_XEXT)
|
||||
include_directories(${XEXT_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XEXT_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XCURSOR)
|
||||
add_definitions(-DWITH_XCURSOR)
|
||||
include_directories(${XCURSOR_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XCURSOR_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XV)
|
||||
add_definitions(-DWITH_XV)
|
||||
include_directories(${XV_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XV_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XI)
|
||||
add_definitions(-DWITH_XI)
|
||||
include_directories(${XI_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XI_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XRENDER)
|
||||
add_definitions(-DWITH_XRENDER)
|
||||
include_directories(${XRENDER_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XRENDER_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XRANDR)
|
||||
add_definitions(-DWITH_XRANDR)
|
||||
include_directories(${XRANDR_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XRANDR_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_XFIXES)
|
||||
add_definitions(-DWITH_XFIXES)
|
||||
include_directories(${XFIXES_INCLUDE_DIRS})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XFIXES_LIBRARIES})
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/resources)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client freerdp m)
|
||||
if (NOT APPLE)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS rt)
|
||||
endif()
|
||||
#target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS} iup /root/xfreerdp/source/client/X11/sqlite3.a)
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS} iup sqlite3)
|
||||
#target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS} iup Xrandr -L/home/alexander/programming/c/FreeRDP/client/X11/cli/sqlite3.a -lsqlite3)
|
||||
|
||||
if(WITH_IPP)
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${IPP_LIBRARY_LIST})
|
||||
endif()
|
||||
|
||||
if(WITH_CLIENT_INTERFACE)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
add_subdirectory(cli)
|
||||
else()
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/X11")
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# CMake-файлы для FreeRDP
|
||||
|
||||
Файлы основаны на [FreeRDP 2.8.0](https://github.com/FreeRDP/FreeRDP)
|
||||
|
||||
Необходимо поместить в каталог проекта `./client/X11`.
|
|
@ -1,2 +0,0 @@
|
|||
xfreerdp
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# FreeRDP X11 cmake build script
|
||||
#
|
||||
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
set(MODULE_NAME "xfreerdp-cli")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_X11")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
xfreerdp.c
|
||||
images.c,
|
||||
arguments.c,
|
||||
concat.c,
|
||||
gui.c,
|
||||
node_settings.c,
|
||||
rxrandr_broker.c,
|
||||
rxrandr.c,
|
||||
settings.c,
|
||||
db.c,
|
||||
address.c,
|
||||
monitor.c,
|
||||
xrdp.c
|
||||
)
|
||||
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "xfreerdp" RUNTIME_OUTPUT_DIRECTORY "..")
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} xfreerdp-client freerdp-client)
|
||||
|
||||
if(OPENBSD)
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ossaudio)
|
||||
else()
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
endif()
|
||||
|
||||
install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/X11")
|
||||
|
73
README.md
73
README.md
|
@ -1,11 +1,74 @@
|
|||
# GUI для FreeRDP
|
||||
|
||||
Надстройка для FreeRDP на основе библиотеки [`IUP`](https://www.tecgraf.puc-rio.br/iup/).
|
||||
|
||||
## Основное окно
|
||||
- Основано на базе [FreeRDP 2.9.0](https://github.com/FreeRDP/FreeRDP) ([локальная версия](http://git.belpig.ru/forks/FreeRDP))
|
||||
- Надстройка для FreeRDP на основе библиотеки [`IUP`](https://www.tecgraf.puc-rio.br/iup/).
|
||||
|
||||
![main.png](img/main.png)
|
||||
|
||||
## Окно настроек
|
||||
|
||||
![settings.png](img/settings.png)
|
||||
|
||||
## Сборка программы
|
||||
|
||||
- [xrandr.patch](xrandr.patch) - исправления поиска библиотеки `Xrandr`
|
||||
- [gui.patch](gui.patch) - включение использования GUI в оригинальный проект `freerdp`
|
||||
|
||||
### Подготовка
|
||||
|
||||
Скопировать файлы из [freerdp](freerdp/) в оригинальный проект `(2.9.0)`:
|
||||
|
||||
```sh
|
||||
cp -r GUI-FreeRDP/freerdp/* freerdp-2.9.0/
|
||||
```
|
||||
|
||||
Перейти в оригинальный каталог:
|
||||
|
||||
```sh
|
||||
cd freerdp-2.9.0
|
||||
```
|
||||
|
||||
Применить патчи:
|
||||
|
||||
```sh
|
||||
git apply ../GUI-FreeRDP/gui.patch
|
||||
git apply ../GUI-FreeRDP/xrandr.patch
|
||||
```
|
||||
|
||||
## Сборка
|
||||
|
||||
Параметр `WITH_COLOR_BUTTONS` отвечает за окрашивание кнопок.
|
||||
|
||||
Создать отдельный каталог `build`:
|
||||
|
||||
```sh
|
||||
mkdir build
|
||||
cd build
|
||||
```
|
||||
|
||||
и выполнить в нём сборку:
|
||||
|
||||
```sh
|
||||
cmake -B . -S .. \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DWITH_OSS=OFF \
|
||||
-DWITH_ALSA=OFF \
|
||||
-DWITH_PULSE=OFF \
|
||||
-DWITH_CUPS=OFF \
|
||||
-DWITH_PCSC=OFF \
|
||||
-DWITH_FFMPEG=OFF \
|
||||
-DWITH_OPENSSL=ON \
|
||||
-DWITH_XV=OFF \
|
||||
-DWITH_FUSE=OFF \
|
||||
-DWITH_SWSCALE=OFF \
|
||||
-DWITH_CAIRO=OFF \
|
||||
-DWITH_DSP_FFMPEG=OFF \
|
||||
-DWITH_FAAC=OFF \
|
||||
-DWITH_SSE2=ON \
|
||||
-DWITH_COLOR_BUTTONS=ON \
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
```
|
||||
|
||||
и компиляцию программы:
|
||||
|
||||
```sh
|
||||
make -j16
|
||||
```
|
||||
|
|
|
@ -18,21 +18,55 @@
|
|||
|
||||
#include "db.h"
|
||||
#include "xrdp.h"
|
||||
//#include "../xfreerdp.h"
|
||||
#include "../xfreerdp.h"
|
||||
|
||||
static int guiExit(Ihandle *self)
|
||||
{
|
||||
return IUP_CLOSE;
|
||||
}
|
||||
|
||||
int isEmptyFieldServerUser(Ihandle *self)
|
||||
{
|
||||
char *name = IupGetAttribute(self, "NAME");
|
||||
if (!strcmp(name, "SERVER"))
|
||||
return !strcmp(IupGetAttribute(IupGetDialogChild(self, "USER"), "LINEVALUE"), "\0");
|
||||
else
|
||||
return !strcmp(IupGetAttribute(IupGetDialogChild(self, "SERVER"), "VALUE"), "\0");
|
||||
}
|
||||
|
||||
static int activeBtnConnect(Ihandle *self, int c, char *value)
|
||||
{
|
||||
if (!strcmp(value, "\0") || isEmptyFieldServerUser(self))
|
||||
{
|
||||
IupSetInt(IupGetDialogChild(self, "CONNECT"), "ACTIVE", 0);
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "BGCOLOR", "49 54 61");
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "FGCOLOR", "238 238 238");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
IupSetInt(IupGetDialogChild(self, "CONNECT"), "ACTIVE", 1);
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
}
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int guiConnect(Ihandle *self)
|
||||
{
|
||||
char *host = IupGetAttribute(IupGetDialogChild(self, "SERVER"), "VALUE");
|
||||
char *login = IupGetAttribute(IupGetDialogChild(self, "USER"), "LINEVALUE");
|
||||
char *result = getHostIP(host);
|
||||
|
||||
if (!result)
|
||||
return IUP_DEFAULT;
|
||||
return IUP_IGNORE;
|
||||
|
||||
char *login = IupGetAttribute(IupGetDialogChild(self, "USER"), "LINEVALUE");
|
||||
|
||||
if (!strcmp(login, "\0"))
|
||||
return IUP_IGNORE;
|
||||
|
||||
setParameterValue(PARAMETER_SERVER, VALUE_SERVER, result);
|
||||
setParameterValue(PARAMETER_USERNAME, VALUE_USERNAME, login);
|
||||
|
@ -45,16 +79,19 @@ static int guiConnect(Ihandle *self)
|
|||
printf("%s\n", args.argv[i]);
|
||||
}
|
||||
|
||||
// if (free_rdp_connect(args.argc, args.argv) != XF_EXIT_DNS_NAME_NOT_FOUND)
|
||||
// {
|
||||
enum XF_EXIT_CODE xCode = free_rdp_connect(args.argc, args.argv);
|
||||
|
||||
if (!(xCode == XF_EXIT_DNS_NAME_NOT_FOUND || xCode == XF_EXIT_CONNECT_FAILED || xCode == XF_EXIT_TLS_CONNECT_FAILED))
|
||||
{
|
||||
IupSetAttribute(IupGetDialogChild(self, "PASSWORD"), "VALUE", "");
|
||||
|
||||
if (!dbAddServer(result, host))
|
||||
{
|
||||
dbInsertHistory(login, host);
|
||||
IupSetAttribute(IupGetDialogChild(self, "SERVER"), "APPENDITEM", host);
|
||||
}
|
||||
|
||||
dbInsertHistory(login, host);
|
||||
dbSetUserNameCurrent(login);
|
||||
// }
|
||||
}
|
||||
|
||||
freeArguments(&args);
|
||||
|
||||
|
@ -110,11 +147,13 @@ Ihandle* guiStart()
|
|||
|
||||
inputServer = IupList(NULL);
|
||||
IupSetAttribute(inputServer, "NAME", "SERVER");
|
||||
IupSetAttribute(inputServer, "TIP", "IP-адрес или имя удаленного сервера (обязательно)");
|
||||
IupSetAttribute(inputServer, "TIP", "IP-адрес или имя удаленного сервера\n(обязательное для заполнения поле)");
|
||||
createHostsList(inputServer);
|
||||
IupSetAttribute(inputServer, "SIZE", "100");
|
||||
IupSetAttribute(inputServer, "EDITBOX", "YES");
|
||||
IupSetAttribute(inputServer, "DROPDOWN", "YES");
|
||||
IupSetAttribute(inputServer, "MASK", "[A-Za-z0-9/./-]*");
|
||||
IupSetCallback(inputServer, "EDIT_CB", (Icallback) activeBtnConnect);
|
||||
hBoxServer = IupHbox(labelServer, inputServer, NULL);
|
||||
IupSetAttribute(hBoxServer, "MARGIN", "10x10");
|
||||
|
||||
|
@ -124,9 +163,11 @@ Ihandle* guiStart()
|
|||
IupSetAttribute(labelUser, "PADDING", "5");
|
||||
inputUser = IupText(NULL);
|
||||
IupSetAttribute(inputUser, "NAME", "USER");
|
||||
IupSetAttribute(inputUser, "TIP", "<домен>\\<имя пользователя> (обязательно)");
|
||||
IupSetAttribute(inputUser, "TIP", "<домен>\\<имя пользователя>\n<имя пользователя>@<домен>\n(обязательное для заполнения поле)");
|
||||
IupSetAttribute(inputUser, "VALUE", getSetValueCurrent(PARAMETER_USERNAME));
|
||||
IupSetAttribute(inputUser, "SIZE", "100");
|
||||
IupSetAttribute(inputUser, "MASK", "(/w|[/./\\/@/-])*");
|
||||
IupSetCallback(inputUser, "ACTION", (Icallback) activeBtnConnect);
|
||||
hBoxUser = IupHbox(labelUser, inputUser, NULL);
|
||||
IupSetAttribute(hBoxUser, "MARGIN", "10x0");
|
||||
|
||||
|
@ -147,21 +188,27 @@ Ihandle* guiStart()
|
|||
IupSetHandle("CONNECT", btnConnect);
|
||||
IupSetAttribute(btnConnect, "NAME", "CONNECT");
|
||||
IupSetAttribute(btnConnect, "TIP", "Выполнить подключение");
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnConnect, "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(btnConnect, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
btnClose = IupButton("Закрыть", NULL);
|
||||
IupSetHandle("CLOSE", btnClose);
|
||||
IupSetAttribute(btnClose, "NAME", "CLOSE");
|
||||
IupSetAttribute(btnClose, "TIP", "Закрыть FreeRDP");
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnClose, "BGCOLOR", "204 0 0");
|
||||
IupSetAttribute(btnClose, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
btnSettings = IupButton("Настройки", NULL);
|
||||
IupSetAttribute(btnSettings, "NAME", "SETTINGS");
|
||||
IupSetAttribute(btnSettings, "TIP", "Перейти в настройки");
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnSettings, "BGCOLOR", "0 136 204");
|
||||
IupSetAttribute(btnSettings, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
hBoxButtons = IupHbox(IupFill(), btnSettings, btnConnect, btnClose, IupFill(), NULL);
|
||||
IupSetAttribute(hBoxButtons, "ALIGNMENT", "ACENTER:ACENTER");
|
|
@ -368,14 +368,18 @@ static Ihandle* settingsHorizontalBoxButtons()
|
|||
btnSave = IupButton("Сохранить", NULL);
|
||||
IupSetAttribute(btnSave, "NAME", "SETTIGS_BTN_SAVE");
|
||||
IupSetAttribute(btnSave, "TIP", "Сохранить настройки");
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnSave, "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(btnSave, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
btnClose = IupButton("Закрыть", NULL);
|
||||
IupSetAttribute(btnClose, "NAME", "SETTIGS_BTN_CLOSE");
|
||||
IupSetAttribute(btnClose, "TIP", "Отменить изменения");
|
||||
#ifdef WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnClose, "BGCOLOR", "204 0 0");
|
||||
IupSetAttribute(btnClose, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
IupSetHandle("btnClosePointer", btnClose);
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/thread.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/client/cmdline.h>
|
||||
|
||||
#include "../xf_client.h"
|
||||
#include "../xfreerdp.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <iup.h>
|
||||
|
||||
#include "xrdp.h"
|
||||
|
||||
int free_rdp_connect(int argc, char **argv)
|
||||
{
|
||||
int rc = 1;
|
||||
int status;
|
||||
HANDLE thread;
|
||||
xfContext *xfc;
|
||||
DWORD dwExitCode;
|
||||
rdpContext *context;
|
||||
rdpSettings *settings;
|
||||
RDP_CLIENT_ENTRY_POINTS clientEntryPoints;
|
||||
|
||||
ZeroMemory(&clientEntryPoints, sizeof(RDP_CLIENT_ENTRY_POINTS));
|
||||
clientEntryPoints.Size = sizeof(RDP_CLIENT_ENTRY_POINTS);
|
||||
clientEntryPoints.Version = RDP_CLIENT_INTERFACE_VERSION;
|
||||
|
||||
RdpClientEntry(&clientEntryPoints);
|
||||
|
||||
context = freerdp_client_context_new(&clientEntryPoints);
|
||||
if (!context)
|
||||
return 1;
|
||||
|
||||
settings = context->settings;
|
||||
xfc = (xfContext*) context;
|
||||
|
||||
status = freerdp_client_settings_parse_command_line(context->settings, argc, argv, FALSE);
|
||||
if (status)
|
||||
{
|
||||
rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
|
||||
|
||||
if (settings->ListMonitors)
|
||||
xf_list_monitors(xfc);
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (freerdp_client_start(context) != 0)
|
||||
goto out;
|
||||
|
||||
thread = freerdp_client_get_thread(context);
|
||||
|
||||
WaitForSingleObject(thread, INFINITE);
|
||||
GetExitCodeThread(thread, &dwExitCode);
|
||||
rc = xf_exit_code_from_disconnect_reason(dwExitCode);
|
||||
|
||||
freerdp_client_stop(context);
|
||||
|
||||
out: freerdp_client_context_free(context);
|
||||
|
||||
return rc;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
find_path(IUP_INCLUDE_DIR NAMES iup.h
|
||||
PATHS /home/alexander/repositories/iup/include
|
||||
DOC "The IUP include directory"
|
||||
)
|
||||
|
||||
find_library(IUP_LIBRARY NAMES iup
|
||||
PATHS /home/alexander/repositories/iup
|
||||
DOC "The IUP library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IUP DEFAULT_MSG IUP_LIBRARY IUP_INCLUDE_DIR)
|
||||
|
||||
if(IUP_FOUND)
|
||||
set( IUP_LIBRARIES ${IUP_LIBRARY} )
|
||||
set( IUP_INCLUDE_DIRS ${IUP_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(IUP_INCLUDE_DIR IUP_LIBRARY)
|
|
@ -0,0 +1,19 @@
|
|||
find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h
|
||||
PATHS /usr/include
|
||||
DOC "The SQLITE include directory"
|
||||
)
|
||||
|
||||
find_library(SQLITE_LIBRARY NAMES sqlite3
|
||||
PATHS /usr/lib64
|
||||
DOC "The SQLITE library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLite DEFAULT_MSG SQLITE_LIBRARY SQLITE_INCLUDE_DIR)
|
||||
|
||||
if(SQLITE_FOUND)
|
||||
set( SQLITE_LIBRARIES ${SQLITE_LIBRARY} )
|
||||
set( SQLITE_INCLUDE_DIRS ${SQLITE_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARY)
|
|
@ -0,0 +1,200 @@
|
|||
diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt
|
||||
index 869652c..0588402 100644
|
||||
--- a/client/X11/CMakeLists.txt
|
||||
+++ b/client/X11/CMakeLists.txt
|
||||
@@ -57,6 +57,37 @@ set(${MODULE_PREFIX}_SRCS
|
||||
xf_client.c
|
||||
xf_client.h)
|
||||
|
||||
+set(${GUI_IUP}_SRCS
|
||||
+ cli/xfreerdp.c
|
||||
+ cli/images.c
|
||||
+ xfreerdp.h
|
||||
+ cli/xrdp.h
|
||||
+ cli/arguments.c
|
||||
+ cli/concat.c
|
||||
+ cli/gui.c
|
||||
+ cli/node_settings.c
|
||||
+ cli/rxrandr_broker.c
|
||||
+ cli/rxrandr.c
|
||||
+ cli/settings.c
|
||||
+ cli/db.c
|
||||
+ cli/address.c
|
||||
+ cli/monitor.c
|
||||
+ cli/xrdp.c)
|
||||
+
|
||||
+set(IUP_FEATURE_TYPE "REQUIRED")
|
||||
+set(IUP_FEATURE_PURPOSE "IUP extension")
|
||||
+set(IUP_FEATURE_DESCRIPTION "Multi-platform toolkit")
|
||||
+
|
||||
+include_directories(${IUP_INCLUDE_DIRS})
|
||||
+find_feature(IUP ${IUP_FEATURE_TYPE} ${IUP_FEATURE_PURPOSE} ${IUP_FEATURE_DESCRIPTION})
|
||||
+
|
||||
+set(SQLITE_FEATURE_TYPE "REQUIRED")
|
||||
+set(SQLITE_FEATURE_PURPOSE "SQLite extension")
|
||||
+set(SQLITE_FEATURE_DESCRIPTION "C-language library SQL database engine")
|
||||
+
|
||||
+include_directories(${SQLITE_INCLUDE_DIRS})
|
||||
+find_feature(SQLite ${SQLITE_FEATURE_TYPE} ${SQLITE_FEATURE_PURPOSE} ${SQLITE_FEATURE_DESCRIPTION})
|
||||
+
|
||||
if (CHANNEL_TSMF_CLIENT)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS}
|
||||
xf_tsmf.c
|
||||
@@ -74,7 +105,7 @@ if(WITH_CLIENT_INTERFACE)
|
||||
endif()
|
||||
|
||||
else()
|
||||
- set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/xfreerdp.c xfreerdp.h)
|
||||
+ set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${GUI_IUP}_SRCS})
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "xfreerdp")
|
||||
include_directories(..)
|
||||
@@ -226,13 +257,17 @@ if(WITH_XFIXES)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XFIXES_LIBRARIES})
|
||||
endif()
|
||||
|
||||
+if(WITH_COLOR_BUTTONS)
|
||||
+ add_definitions(-DWITH_COLOR_BUTTONS)
|
||||
+endif()
|
||||
+
|
||||
include_directories(${CMAKE_SOURCE_DIR}/resources)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client freerdp m)
|
||||
if (NOT APPLE)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS rt)
|
||||
endif()
|
||||
-target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS} ${IUP_LIBRARIES} ${SQLITE_LIBRARIES})
|
||||
|
||||
if(WITH_IPP)
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${IPP_LIBRARY_LIST})
|
||||
diff --git a/client/X11/cli/CMakeLists.txt b/client/X11/cli/CMakeLists.txt
|
||||
index 5f805c2..1e7d1c4 100644
|
||||
--- a/client/X11/cli/CMakeLists.txt
|
||||
+++ b/client/X11/cli/CMakeLists.txt
|
||||
@@ -19,7 +19,19 @@ set(MODULE_NAME "xfreerdp-cli")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_X11")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
- xfreerdp.c)
|
||||
+ xfreerdp.c
|
||||
+ images.c
|
||||
+ arguments.c
|
||||
+ concat.c
|
||||
+ gui.c
|
||||
+ node_settings.c
|
||||
+ rxrandr_broker.c
|
||||
+ rxrandr.c
|
||||
+ settings.c
|
||||
+ db.c
|
||||
+ address.c
|
||||
+ monitor.c
|
||||
+ xrdp.c)
|
||||
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "xfreerdp" RUNTIME_OUTPUT_DIRECTORY "..")
|
||||
diff --git a/client/X11/cli/xfreerdp.c b/client/X11/cli/xfreerdp.c
|
||||
index 8db4d39..abdf3ca 100644
|
||||
--- a/client/X11/cli/xfreerdp.c
|
||||
+++ b/client/X11/cli/xfreerdp.c
|
||||
@@ -1,85 +1,24 @@
|
||||
-/**
|
||||
- * FreeRDP: A Remote Desktop Protocol Implementation
|
||||
- * X11 Client
|
||||
- *
|
||||
- * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
- * Copyright 2012 HP Development Company, LLC
|
||||
- *
|
||||
- * 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 <stdlib.h>
|
||||
+#include "gui.h"
|
||||
+#include "arguments.h"
|
||||
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
-#include "config.h"
|
||||
-#endif
|
||||
+#include <stdio.h>
|
||||
|
||||
-#include <winpr/crt.h>
|
||||
-#include <winpr/synch.h>
|
||||
-#include <winpr/thread.h>
|
||||
-
|
||||
-#include <freerdp/freerdp.h>
|
||||
-#include <freerdp/client/cmdline.h>
|
||||
-
|
||||
-#include "../xf_client.h"
|
||||
-#include "../xfreerdp.h"
|
||||
-
|
||||
-int main(int argc, char* argv[])
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
- int rc = 1;
|
||||
- int status;
|
||||
- HANDLE thread;
|
||||
- xfContext* xfc;
|
||||
- DWORD dwExitCode;
|
||||
- rdpContext* context;
|
||||
- rdpSettings* settings;
|
||||
- RDP_CLIENT_ENTRY_POINTS clientEntryPoints;
|
||||
-
|
||||
- ZeroMemory(&clientEntryPoints, sizeof(RDP_CLIENT_ENTRY_POINTS));
|
||||
- clientEntryPoints.Size = sizeof(RDP_CLIENT_ENTRY_POINTS);
|
||||
- clientEntryPoints.Version = RDP_CLIENT_INTERFACE_VERSION;
|
||||
-
|
||||
- RdpClientEntry(&clientEntryPoints);
|
||||
-
|
||||
- context = freerdp_client_context_new(&clientEntryPoints);
|
||||
- if (!context)
|
||||
- return 1;
|
||||
-
|
||||
- settings = context->settings;
|
||||
- xfc = (xfContext*)context;
|
||||
-
|
||||
- status = freerdp_client_settings_parse_command_line(context->settings, argc, argv, FALSE);
|
||||
- if (status)
|
||||
- {
|
||||
- rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
|
||||
-
|
||||
- if (settings->ListMonitors)
|
||||
- xf_list_monitors(xfc);
|
||||
-
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if (freerdp_client_start(context) != 0)
|
||||
- goto out;
|
||||
+ if (argc > 1)
|
||||
+ settingsLoad(argv[1]);
|
||||
+ else
|
||||
+ settingsLoad("/etc/freerdp/freerdp.db");
|
||||
|
||||
- thread = freerdp_client_get_thread(context);
|
||||
+ IupOpen(&argc, &argv);
|
||||
|
||||
- WaitForSingleObject(thread, INFINITE);
|
||||
- GetExitCodeThread(thread, &dwExitCode);
|
||||
- rc = xf_exit_code_from_disconnect_reason(dwExitCode);
|
||||
+ IupShowXY(guiStart(), IUP_CENTER, IUP_CENTER);
|
||||
+ IupMainLoop();
|
||||
|
||||
- freerdp_client_stop(context);
|
||||
+ IupClose();
|
||||
|
||||
-out:
|
||||
- freerdp_client_context_free(context);
|
||||
+ settingsFree();
|
||||
|
||||
- return rc;
|
||||
+ return EXIT_SUCCESS;
|
||||
}
|
|
@ -0,0 +1,201 @@
|
|||
/flag (enables flag)
|
||||
/option:<value> (specifies option with value)
|
||||
+toggle -toggle (enables or disables toggle, where '/' is a synonym of '+')
|
||||
|
||||
/a:<addin>[,<options>] Addin
|
||||
/action-script:<file-name> Action script
|
||||
/admin Admin (or console) session
|
||||
+aero Enable desktop composition
|
||||
/app:<path> or ||<alias> Remote application program
|
||||
/app-cmd:<parameters> Remote application command-line parameters
|
||||
/app-file:<file-name> File to open with remote application
|
||||
/app-guid:<app-guid> Remote application GUID
|
||||
/app-icon:<icon-path> Remote application icon for user interface
|
||||
/app-name:<app-name> Remote application name for user interface
|
||||
/app-workdir:<workspace path> Remote application workspace path
|
||||
/assistance:<password> Remote assistance password
|
||||
/auto-request-control Automatically request remote assistance input control
|
||||
+async-channels Enable Asynchronous channels (experimental)
|
||||
+async-input Enable Asynchronous input
|
||||
+async-update Enable Asynchronous update
|
||||
/audio-mode:<mode> Audio output mode
|
||||
+auth-only Enable Authenticate only
|
||||
-authentication Disable Authentication (experimental)
|
||||
+auto-reconnect Enable Automatic reconnection
|
||||
/auto-reconnect-max-retries:<retries>
|
||||
Automatic reconnection maximum retries, 0 for unlimited [0,1000]
|
||||
+bitmap-cache Enable bitmap cache
|
||||
/bpp:<depth> Session bpp (color depth)
|
||||
/buildconfig Print the build configuration
|
||||
/cert:[deny,ignore,name:<name>,tofu,fingerprint:<hash>:<hash as hex>
|
||||
[,fingerprint:<hash>:<another hash>]]
|
||||
Certificate accept options. Use with care!
|
||||
* deny ... Automatically abort connection if the certificate does not match, no user interaction.
|
||||
* ignore ... Ignore the certificate checks altogether (overrules all other options)
|
||||
* name ... Use the alternate <name> instead of the certificate subject to match locally stored certificates
|
||||
* tofu ... Accept certificate unconditionally on first connect and deny on subsequent connections if the certificate does not match
|
||||
* fingerprints ... A list of certificate hashes that are accepted unconditionally for a connection
|
||||
/cert-deny [deprecated, use /cert:deny] Automatically abort connection for any certificate that can not be validated.
|
||||
/cert-ignore [deprecated, use /cert:ignore] Ignore certificate
|
||||
/cert-name:<name> [deprecated, use /cert:name:<name>] Certificate name
|
||||
/cert-tofu [deprecated, use /cert:tofu] Automatically accept certificate on first connect
|
||||
/client-build-number:<number> Client Build Number sent to server (influences smartcard behaviour, see [MS-RDPESC])
|
||||
/client-hostname:<name> Client Hostname to send to server
|
||||
-clipboard[:[use-selection:<atom>]]
|
||||
Disable Redirect clipboard.
|
||||
* use-selection:<atom> ... (X11) Specify which X selection to access. Default is CLIPBOARD. PRIMARY is the X-style middle-click selection.
|
||||
/codec-cache:[rfx|nsc|jpeg] Bitmap codec cache
|
||||
-compression Disable compression
|
||||
/compression-level:<level> Compression level (0,1,2)
|
||||
+credentials-delegation Enable credentials delegation
|
||||
/d:<domain> Domain
|
||||
-decorations Disable Window decorations
|
||||
/disp Display control
|
||||
/drive:<name>,<path> Redirect directory <path> as named share <name>. Hotplug support is enabled with /drive:hotplug,*. This argument provides the same function as "Drives that I plug in later" option in MSTSC.
|
||||
+drives Enable Redirect all mount points as shares
|
||||
/dvc:<channel>[,<options>] Dynamic virtual channel
|
||||
/dynamic-resolution Send resolution updates when the window is resized
|
||||
/echo Echo channel
|
||||
-encryption Disable Encryption (experimental)
|
||||
/encryption-methods:[40,][56,][128,][FIPS]
|
||||
RDP standard security encryption methods
|
||||
/f Fullscreen mode (<Ctrl>+<Alt>+<Enter> toggles fullscreen)
|
||||
-fast-path Disable fast-path input/output
|
||||
+fipsmode Enable FIPS mode
|
||||
/floatbar[:sticky:[on|off],default:[visible|hidden],show:
|
||||
[always|fullscreen||window]]
|
||||
floatbar is disabled by default (when enabled defaults to sticky in fullscreen mode)
|
||||
-fonts Disable smooth fonts (ClearType)
|
||||
/frame-ack:<number> Number of frame acknowledgement
|
||||
/from-stdin[:force] Read credentials from stdin. With <force> the prompt is done before connection, otherwise on server request.
|
||||
/g:<gateway>[:<port>] Gateway Hostname
|
||||
/gateway-usage-method:[direct|detect]
|
||||
Gateway usage method
|
||||
/gd:<domain> Gateway domain
|
||||
/gdi:sw|hw GDI rendering
|
||||
/geometry Geometry tracking channel
|
||||
+gestures Enable Consume multitouch input locally
|
||||
/gfx[:RFX] RDP8 graphics pipeline
|
||||
+gfx-progressive Enable RDP8 graphics pipeline using progressive codec
|
||||
+gfx-small-cache Enable RDP8 graphics pipeline using small cache mode
|
||||
+gfx-thin-client Enable RDP8 graphics pipeline using thin client mode
|
||||
+glyph-cache Enable Glyph cache (experimental)
|
||||
/gp:<password> Gateway password
|
||||
-grab-keyboard Disable Grab keyboard
|
||||
/gt:[rpc|http[,no-websockets]|auto[,no-websockets]]
|
||||
Gateway transport type
|
||||
/gu:[[<domain>\]<user>|<user>[@<domain>]]
|
||||
Gateway username
|
||||
/gat:<access token> Gateway Access Token
|
||||
/h:<height> Height
|
||||
-heartbeat Disable Support heartbeat PDUs
|
||||
/help Print help
|
||||
+home-drive Enable Redirect user home as share
|
||||
/ipv6 Prefer IPv6 AAA record over IPv4 A record
|
||||
/kbd:0x<id> or <name> Keyboard layout
|
||||
/kbd-lang:0x<id> Keyboard active language identifier
|
||||
/kbd-fn-key:<value> Function key value
|
||||
/kbd-list List keyboard layouts
|
||||
/kbd-lang-list List keyboard languages
|
||||
/kbd-remap:List of <key>=<value>,... pairs to remap scancodes
|
||||
Keyboard scancode remapping
|
||||
/kbd-subtype:<id> Keyboard subtype
|
||||
/kbd-type:<id> Keyboard type
|
||||
/load-balance-info:<info-string> Load balance info
|
||||
/log-filters:<tag>:<level>[,<tag>:<level>[,...]]
|
||||
Set logger filters, see wLog(7) for details
|
||||
/log-level:[OFF|FATAL|ERROR|WARN|INFO|DEBUG|TRACE]
|
||||
Set the default log level, see wLog(7) for details
|
||||
/max-fast-path-size:<size> Specify maximum fast-path update size
|
||||
/max-loop-time:<time> Specify maximum time in milliseconds spend treating packets
|
||||
+menu-anims Enable menu animations
|
||||
/microphone[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,]
|
||||
[channel:<channel>]] Audio input (microphone)
|
||||
/monitor-list List detected monitors
|
||||
/monitors:<id>[,<id>[,...]] Select monitors to use
|
||||
-mouse-motion Disable Send mouse motion
|
||||
/multimon[:force] Use multiple monitors
|
||||
+multitouch Enable Redirect multitouch input
|
||||
+multitransport Enable Support multitransport protocol
|
||||
-nego Disable protocol security negotiation
|
||||
/network:[modem|broadband|broadband-low|broadband-high|wan|lan|auto]
|
||||
Network connection type
|
||||
/nsc NSCodec support
|
||||
+offscreen-cache Enable offscreen bitmap cache
|
||||
/orientation:[0|90|180|270] Orientation of display in degrees
|
||||
+old-license Enable Use the old license workflow (no CAL and hwId set to 0)
|
||||
/p:<password> Password
|
||||
/parallel[:<name>[,<path>]] Redirect parallel device
|
||||
/parent-window:<window-id> Parent window id
|
||||
+password-is-pin Enable Use smart card authentication with password as smart card PIN
|
||||
/pcb:<blob> Preconnection Blob
|
||||
/pcid:<id> Preconnection Id
|
||||
/pheight:<height> Physical height of display (in millimeters)
|
||||
/play-rfx:<pcap-file> Replay rfx pcap file
|
||||
/port:<number> Server port
|
||||
-suppress-output Disable suppress output when minimized
|
||||
+print-reconnect-cookie Enable Print base64 reconnect cookie after connecting
|
||||
/printer[:<name>[,<driver>]] Redirect printer device
|
||||
/proxy:[<proto>://][<user>:<password>@]<host>:<port>
|
||||
Proxy settings: override env. var (see also environment variable below). Protocol "socks5" should be given explicitly where "http" is default.
|
||||
/pth:<password-hash> Pass the hash (restricted admin mode)
|
||||
/pwidth:<width> Physical width of display (in millimeters)
|
||||
/rdp2tcp:<executable path[:arg...]>
|
||||
TCP redirection
|
||||
/reconnect-cookie:<base64-cookie> Pass base64 reconnect cookie to the connection
|
||||
/redirect-prefer:<FQDN|IP|NETBIOS>,[...]
|
||||
Override the preferred redirection order
|
||||
/relax-order-checks Do not check if a RDP order was announced during capability exchange, only use when connecting to a buggy server
|
||||
/restricted-admin Restricted admin mode
|
||||
/rfx RemoteFX
|
||||
/rfx-mode:[image|video] RemoteFX mode
|
||||
/scale:[100|140|180] Scaling factor of the display
|
||||
/scale-desktop:<percentage> Scaling factor for desktop applications (value between 100 and 500)
|
||||
/scale-device:100|140|180 Scaling factor for app store applications
|
||||
/sec:[rdp|tls|nla|ext] Force specific protocol security
|
||||
+sec-ext Enable NLA extended protocol security
|
||||
-sec-nla Disable NLA protocol security
|
||||
-sec-rdp Disable RDP protocol security
|
||||
-sec-tls Disable TLS protocol security
|
||||
/serial[:<name>[,<path>[,<driver>[,permissive]]]]
|
||||
Redirect serial device
|
||||
/shell:<shell> Alternate shell
|
||||
/shell-dir:<dir> Shell working directory
|
||||
/size:<width>x<height> or <percent>%[wh]
|
||||
Screen size
|
||||
/smart-sizing[:<width>x<height>] Scale remote desktop to window size
|
||||
/smartcard[:<str>[,<str>...]] Redirect the smartcard devices containing any of the <str> in their names.
|
||||
/smartcard-logon Activates Smartcard Logon authentication.
|
||||
(EXPERIMENTAL: NLA not supported)
|
||||
/sound[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,]
|
||||
[channel:<channel>,][latency:<latency>,][quality:<quality>]]
|
||||
Audio output (sound)
|
||||
/span Span screen over multiple monitors
|
||||
/spn-class:<service-class> SPN authentication service class
|
||||
/ssh-agent SSH Agent forwarding channel
|
||||
/t:<title> Window title
|
||||
-themes Disable themes
|
||||
/timeout:<time in ms> Advanced setting for high latency links: Adjust connection timeout, use if you encounter timeout failures with your connection
|
||||
/tls-ciphers:[netmon|ma|ciphers] Allowed TLS ciphers
|
||||
/tls-seclevel:<level> TLS security level - defaults to 1
|
||||
+enforce-tlsv1_2 Enable Force use of TLS1.2 for connection. Some servers have a buggy TLS version negotiation and might fail without this
|
||||
-toggle-fullscreen Disable Alt+Ctrl+Enter to toggle fullscreen
|
||||
/tune:<setting:value>,<setting:value>
|
||||
[experimental] directly manipulate freerdp settings, use with extreme caution!
|
||||
/tune-list Print options allowed for /tune
|
||||
/u:[[<domain>\]<user>|<user>[@<domain>]]
|
||||
Username
|
||||
+unmap-buttons Enable Let server see real physical pointer button
|
||||
/usb:[dbg,][id:<vid>:<pid>#...,][addr:<bus>:<addr>#...,][auto]
|
||||
Redirect USB device
|
||||
/v:<server>[:port] Server hostname
|
||||
/vc:<channel>[,<options>] Static virtual channel
|
||||
/version Print version
|
||||
/video Video optimized remoting channel
|
||||
/vmconnect[:<vmid>] Hyper-V console (use port 2179, disable negotiation)
|
||||
/w:<width> Width
|
||||
-wallpaper Disable wallpaper
|
||||
+window-drag Enable full window drag
|
||||
/window-position:<xpos>x<ypos> window position
|
||||
/wm-class:<class-name> Set the WM_CLASS hint for the window instance
|
||||
/workarea Use available work area
|
24
xfreerdp.c
24
xfreerdp.c
|
@ -1,24 +0,0 @@
|
|||
#include <stdlib.h>
|
||||
#include "gui.h"
|
||||
#include "arguments.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc > 1)
|
||||
settingsLoad(argv[1]);
|
||||
else
|
||||
settingsLoad("/etc/freerdp/freerdp.db");
|
||||
|
||||
IupOpen(&argc, &argv);
|
||||
|
||||
IupShowXY(guiStart(), IUP_CENTER, IUP_CENTER);
|
||||
IupMainLoop();
|
||||
|
||||
IupClose();
|
||||
|
||||
settingsFree();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/cmake/FindXRandR.cmake b/cmake/FindXRandR.cmake
|
||||
index 7b0ec71..4b2a79e 100644
|
||||
--- a/cmake/FindXRandR.cmake
|
||||
+++ b/cmake/FindXRandR.cmake
|
||||
@@ -38,7 +38,7 @@ find_library(XRANDR_LIBRARY NAMES Xrandr
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(XRANDR DEFAULT_MSG XRANDR_LIBRARY XRANDR_INCLUDE_DIR)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XRandR DEFAULT_MSG XRANDR_LIBRARY XRANDR_INCLUDE_DIR)
|
||||
|
||||
if(XRANDR_FOUND)
|
||||
set( XRANDR_LIBRARIES ${XRANDR_LIBRARY} )
|
71
xrdp.c
71
xrdp.c
|
@ -1,71 +0,0 @@
|
|||
//#ifdef HAVE_CONFIG_H
|
||||
//#include "config.h"
|
||||
//#endif
|
||||
//
|
||||
//#include <winpr/crt.h>
|
||||
//#include <winpr/synch.h>
|
||||
//#include <winpr/thread.h>
|
||||
//
|
||||
//#include <freerdp/freerdp.h>
|
||||
//#include <freerdp/client/cmdline.h>
|
||||
//
|
||||
//#include "../xf_client.h"
|
||||
//#include "../xfreerdp.h"
|
||||
//
|
||||
//#include <stdlib.h>
|
||||
//#include <stdio.h>
|
||||
//#include <string.h>
|
||||
//#include <iup.h>
|
||||
//
|
||||
//#include "xrdp.h"
|
||||
//
|
||||
//int free_rdp_connect(int argc, char **argv)
|
||||
//{
|
||||
// int rc = 1;
|
||||
// int status;
|
||||
// HANDLE thread;
|
||||
// xfContext *xfc;
|
||||
// DWORD dwExitCode;
|
||||
// rdpContext *context;
|
||||
// rdpSettings *settings;
|
||||
// RDP_CLIENT_ENTRY_POINTS clientEntryPoints;
|
||||
//
|
||||
// ZeroMemory(&clientEntryPoints, sizeof(RDP_CLIENT_ENTRY_POINTS));
|
||||
// clientEntryPoints.Size = sizeof(RDP_CLIENT_ENTRY_POINTS);
|
||||
// clientEntryPoints.Version = RDP_CLIENT_INTERFACE_VERSION;
|
||||
//
|
||||
// RdpClientEntry(&clientEntryPoints);
|
||||
//
|
||||
// context = freerdp_client_context_new(&clientEntryPoints);
|
||||
// if (!context)
|
||||
// return 1;
|
||||
//
|
||||
// settings = context->settings;
|
||||
// xfc = (xfContext*) context;
|
||||
//
|
||||
// status = freerdp_client_settings_parse_command_line(context->settings, argc, argv, FALSE);
|
||||
// if (status)
|
||||
// {
|
||||
// rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
|
||||
//
|
||||
// if (settings->ListMonitors)
|
||||
// xf_list_monitors(xfc);
|
||||
//
|
||||
// goto out;
|
||||
// }
|
||||
//
|
||||
// if (freerdp_client_start(context) != 0)
|
||||
// goto out;
|
||||
//
|
||||
// thread = freerdp_client_get_thread(context);
|
||||
//
|
||||
// WaitForSingleObject(thread, INFINITE);
|
||||
// GetExitCodeThread(thread, &dwExitCode);
|
||||
// rc = xf_exit_code_from_disconnect_reason(dwExitCode);
|
||||
//
|
||||
// freerdp_client_stop(context);
|
||||
//
|
||||
// out: freerdp_client_context_free(context);
|
||||
//
|
||||
// return rc;
|
||||
//}
|
Loading…
Reference in New Issue