element-desktop/docs/windows-requirements.md

39 lines
1.6 KiB
Markdown
Raw Normal View History

2021-04-29 14:36:10 +00:00
# Windows
## Requirements to build native modules
2023-04-04 08:09:25 +00:00
We rely on Github Actions `windows-latest` plus a few extra utilities as per [the workflow](https://github.com/vector-im/element-desktop/blob/develop/.github/workflows/build_windows.yaml).
2021-04-29 14:36:10 +00:00
If you want to build native modules, make sure that the following tools are installed on your system.
2022-12-15 11:00:58 +00:00
- [Git for Windows](https://git-scm.com/download/win)
- [Node 16](https://nodejs.org)
2022-12-15 11:00:58 +00:00
- [Python 3](https://www.python.org/downloads/) (if you type 'python' into command prompt it will offer to install it from the windows store)
- [Strawberry Perl](https://strawberryperl.com/)
- [Rustup](https://rustup.rs/)
- [NASM](https://www.nasm.us/)
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration:
- On the Workloads tab:
- Desktop & Mobile -> C++ build tools
- On the Individual components tab:
- MSVC VS 2019 C++ build tools
- Windows 10 SDK (latest version available)
- C++ CMake tools for Windows
2021-04-29 14:36:10 +00:00
Once installed make sure all those utilities are accessible in your `PATH`.
If you want to be able to build x86 targets from an x64 host install the right toolchain:
2022-12-15 11:00:58 +00:00
```cmd
rustup toolchain install stable-i686-pc-windows-msvc
rustup target add i686-pc-windows-msvc
```
2021-04-29 14:36:10 +00:00
In order to load all the C++ utilities installed by Visual Studio you can run the following in a terminal window.
```
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
2021-04-29 14:36:10 +00:00
```
You can replace `amd64` with `x86` depending on your CPU architecture.