Magpie/docs/Compilation guide.md
Xu 6fc3594d9d
支持 Visual Studio 2026 (#1343)
* chore: 支持 VS2026

* docs: 更新文档以及排除 pdb

* chore: 修复 pdb 生成

* chore: 禁止 Magpie.Core 生成 pdb

* chore: 清理
2025-11-27 21:57:38 +08:00

45 lines
1.6 KiB
Markdown

### Prerequisites
In order to compile Magpie, you need to first install:
1. The latest version of Visual Studio 2022 or 2026. You need to install both "Desktop development with C++" and "Universal Windows Platform development" workloads and Windows SDK build 26100 or newer.
2. [CMake](https://cmake.org/)
You can also use the built-in CMake of Visual Studio, which is located at `%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin`.
3. [Python](https://www.python.org/) 3.11+
4. [Conan](https://conan.io/)
```bash
pip install conan
```
Make sure that the above dependencies have been added to the system path, and use the following commands to check:
```bash
cmake --version
python --version
conan --version
```
### Compiling
1. Clone the repo
```bash
git clone https://github.com/Blinue/Magpie
```
2. Open the Magpie.slnx in the root directory and build the solution.
### Enabling Touch Support
To enable touch input support, TouchHelper.exe needs to be signed. While signing is automatically done in the CI pipeline, you can also manually sign it. Follow these steps:
1. Create a self-signed certificate and export it as a pfx file.
2. Replace the `CERT_FINGERPRINT` constant in `src/Magpie/TouchHelper.cpp` with the SHA-1 hash (i.e., fingerprint) of your certificate.
3. Run the following command in the root directory of the repository:
```bash
python scripts/publish.py --pfx-path=<pfx path> --pfx-password=<pfx password>
```
This will compile Magpie and sign TouchHelper.exe. The compiled files will be located in `publish\x64`.