Files
doc.rustdesk.com/content/dev/build/windows/_index.zh-tw.md
rustdesk 56cfd26e35 seo/geo
2026-03-20 18:42:55 +08:00

3.0 KiB
Raw Blame History

title, weight, description, keywords
title weight description keywords
Windows 20 RustDesk 的Windows文檔提供安裝、設定、部署與疑難排解指南。
build rustdesk windows
rustdesk windows build
rustdesk vcpkg windows
rustdesk sciter dll
rustdesk llvm libclang

在 Windows 上建置前需要準備什麼?

在 Windows 上建置 RustDesk 需要準備 Visual Studio C++ 工具鏈、Rust、vcpkgsciter.dll 以及已設定好 LIBCLANG_PATH 的 LLVM。這裡的命令請在 Git Bash 中執行,這樣範例命令與環境變數寫法才能直接生效。

Windows 建置檢查清單

  • 安裝含 C++ 工作負載的 Visual Studio。
  • 透過 rustup-init.exe 安裝 Rust。
  • 複製並初始化 vcpkg,然後設定 VCPKG_ROOT
  • 下載桌面 UI 所需的 sciter.dll
  • 安裝 LLVM並將 LIBCLANG_PATH 指向其 bin 目錄。
  • 複製 RustDesk並在 Git Bash 中執行預設建置步驟。

{{% notice note %}} 此處的所有指令皆須在 git-bash 中執行,而非命令提示字元,否則您會遇到語法錯誤。 {{% /notice %}}

依賴

C++ 編譯環境

下載 msvc 並安裝。 選擇 Windows 作為開發機作業系統,並勾選 C++。然後下載 Visual Studo 社群版並安裝。安裝可能需要一段時間。

Rust 開發環境

下載 rustup-init.exe,以管理員身份執行並安裝。

vcpkg

使用git-bash執行下列指令,下載 vcpkg,安裝libvpxlibyuvopus。 如果您尚未安裝 git,請在下載。

  git clone https://github.com/microsoft/vcpkg
  cd vcpkg
  git checkout 2023.04.15
  cd ..
  vcpkg/bootstrap-vcpkg.bat
  export VCPKG_ROOT=$PWD/vcpkg
  vcpkg/vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static

加入系統環境變數 VCPKG_ROOT=<path>\vcpkg<path> 應為您複製 vcpkg 的路徑。

Sciter

桌面版本的介面使用 sciter,請下載 sciter.dll

llvm

rust-bindgen 依賴 clang下載 llvm 並安裝,加入系統環境變數 LIBCLANG_PATH=<llvm_install_dir>/bin

您可以在此下載 LLVM 15.02 版本的安裝包:64 位元 / 32 位元

編譯

預設

git clone --recurse-submodules 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