在Windows上构建RustDesk

2024-07-22 57

在Windows上构建RustDesk需要一些准备工作和命令行操作,确保已经按照以下步骤准备好环境,并在Git Bash中运行命令。

一、准备工作

1、安装C++ 构建环境(MSVC)

下载并安装Visual Studio社区版(包括 C++ 的开发工具)。在安装时确保选择安装C++的开发人员工具。安装完成后,确保MSVC的工具链已经配置好。

2、安装Rust开发环境

下载并运行rustup-init.exe以安装Rust。在安装过程中,选择默认选项即可。

3、安装vcpkg

在Git Bash中执行以下命令:

git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout 2023.04.15 # 可选,根据需要选择特定的 vcpkg 版本
./bootstrap-vcpkg.bat
export VCPKG_ROOT=$PWD # 设置 VCPKG_ROOT 环境变量,这里假设 vcpkg 文件夹在当前目录下
./vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static

上述命令会克隆 vcpkg 仓库,并使用 vcpkg 安装 RustDesk 所需的依赖(libvpx、libyuv、opus 和 aom)。

在Windows上构建RustDesk

4、下载Sciter DLL

执行以下命令获取 Sciter 的 DLL 文件:

wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll

将下载的 sciter.dll 移动到 RustDesk 项目的 target/debug 目录中(如果该目录不存在,可以先创建):

mkdir -p rustdesk/target/debug
mv sciter.dll rustdesk/target/debug

5、安装LLVM

下载并安装 LLVM 15.0.2 版本。将 LLVM 的 bin 目录添加到系统环境变量中,确保 RustDesk 能够找到 libclang.dll。

二、在Windows上构建RustDesk

git clone https://github.com/rustdesk/rustdesk
cd rustdesk
mkdir -p target/debug
wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll
mv sciter.dll target/debug
cargo run
  • 广告合作

  • QQ群号:707632017

温馨提示:
1、本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。邮箱:2942802716#qq.com(#改为@)。 2、本站原创内容未经允许不得转裁,转载请注明出处“站长百科”和原文地址。