FreeRDP 在windows环境下编译
type
status
date
slug
summary
tags
category
icon
password
本文详细记录了 FreeRDP-stable2.0 在 Windows 下的编译过程。

准备环境

  • Visual Studio
    • 版本任意;我的版本是2022
  • openSSL
    • 版本没有影响;我的版本是3.3.1
      👉
      注意,openSSL安装后需要配置环境变量
      OPENSSL_INCLUDE_DIR = D:\Program Files\OpenSSL-Win64\include
      OPENSSL_ROOT_DIR = D:\Program Files\OpenSSL-Win64

编译zlib

运行Cmake-GUI,设置好 Zlib 的源码路径和输出的二进制路径,然后Configure
notion image
出现红色不用管,再次Configure即可
notion image
Generate
notion image

Open Project 随后将 INSTALL 设为启动项目
notion image

修改 INSTALL 项目的属性
notion image
将其中的内容全部删掉,记得复制下面这段
$(Configuration) 改为 RELEASE
cmake_install.cmake 改为完整路径,这个文件在 Cmake-GUI 中指定的二进制路径
 
以我的为例,我的指令如下
👋 注意,左侧图片中有一点点问题,需要把 Configuration 选为 Release

执行 Build 记得选为 Release
notion image
Build 应该不会有报错。待构建结束后在终端执行上面的指令,这步操作需要管理员权限
notion image

编译FreeRDP服务端

克隆FreeRDP,我选用stable-2.0版本
notion image

因为我 Cmake 版本比较高,FreeRDP stable2.0 版本用的比较低,需要修改一些 CmakeList.txt
  • /CMakeLists.txt:21
  • winpr/CMakeLists.txt:18
  • rdtk/CMakeLists.txt:18
 
cmake_minimum_required(VERSION 2.8)
修改为
cmake_minimum_required(VERSION 3.5)

运行Cmake-GUI,设置好 FreeRDP 的源码路径和输出的二进制路径,然后Configure
notion image
上一步骤中只要没有 Error 就可以,Warning 不用管。在配置中搜索 LIBUSB
notion image
再搜索 WITH_SERVER ,勾上选项
notion image
接下来 GenerateOpen Project
Generate 过程中出现Warning不用管

将Server → Windows → wfreerdp-server-cil 设为启动项目
notion image
随后Build,正常应该 Build: 20 succeeded, 0 failed, 0 up-to-date, 0 skipped
notion image
在项目路径下应该出现 wfreerdp-server.exe
notion image

编译FreeRDP客户端

前期准备和上述相同
设置 Client → Common → freerdp-client 的属性
notion image
👉
记得选为Release
notion image
 
添加依赖
D:\freerdp-2.0\libusb-1.0.24\VS2019\MS64\static\libusb-1.0.lib
 
随后将
Client → Windows → wfreerdp-client
设为启动项目,选中 Release 并编译
notion image

最终应该在项目路径下应该出现 wfreerdp.exe
notion image
编译NothingPhone(2)的KernelCVE挖掘过程记录
Loading...