doc.rustdesk.com/content/dev/build/windows/_index.en.md

62 lines
2.2 KiB
Markdown
Raw Normal View History

2022-04-12 06:43:15 +02:00
---
title: Windows
weight: 20
---
2023-01-19 00:22:39 +01:00
{{% notice note %}}
2023-01-19 04:35:37 +01:00
The command line commands here must be run in git-bash not command prompt or you will get syntax errors.
2023-01-19 00:22:39 +01:00
{{% /notice %}}
## Dependencies
2022-05-09 09:01:40 +02:00
### C++ build environment
Download [msvc](https://visualstudio.microsoft.com/) and install.
2023-07-15 21:53:29 +02:00
Select `Windows` as Developer machine OS and check `C++`, then download Visual Studio Community version and install. The installation may take a while.
### Rust develop environment
2023-07-15 21:53:29 +02:00
Download [rustup-init.exe](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe) and run it as administrator to install `rust`.
### vcpkg
2023-07-15 21:53:29 +02:00
Go to the folder you want to clone vcpkg and use [git-bash](https://git-scm.com/download/win) to run the following commands, download `vcpkg`, install 64-bit version of `libvpx`, `libyuv` and `opus`.
If you don't have `git` installed, get `git` [here](https://git-scm.com/download/win).
2023-08-27 20:48:19 +02:00
```sh
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
```
2023-07-15 21:53:29 +02:00
Add System environment variable `VCPKG_ROOT`=`<path>\vcpkg`. The `<path>` should be the location you choose above to clone `vcpkg`.
2022-05-09 08:52:18 +02:00
![](/docs/en/dev/build/windows/images/env.png)
2023-07-15 21:53:29 +02:00
### Sciter
2023-07-15 21:53:29 +02:00
Desktop versions use [Sciter](https://sciter.com/) for GUI, please download [sciter.dll](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll)
2023-07-15 21:53:29 +02:00
### LLVM
2023-08-27 20:48:19 +02:00
`rust-bindgen` depends on `clang`, download [LLVM](https://github.com/llvm/llvm-project/releases) and install, add System environment variable `LIBCLANG_PATH`=`<llvm_install_dir>/bin`.
2023-08-27 20:48:19 +02:00
You can download version 15.02 of the LLVM binaries here: [64-bit](https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.2/LLVM-15.0.2-win64.exe) / [32-bit](https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.2/LLVM-15.0.2-win32.exe)
## Build
### Default
```sh
git clone https://github.com/rustdesk/rustdesk
cd rustdesk
mkdir -p target/debug
2023-01-19 05:02:01 +01:00
wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll
mv sciter.dll target/debug
cargo run
```