command
This commit is contained in:
+114
@@ -0,0 +1,114 @@
|
||||
# PDF Engine — Windows Development Commands
|
||||
|
||||
## Windows Environment
|
||||
|
||||
Always use:
|
||||
|
||||
```text
|
||||
Developer PowerShell for VS 2022
|
||||
```
|
||||
|
||||
This ensures:
|
||||
|
||||
* MSVC compiler works
|
||||
* C++ standard library paths are loaded
|
||||
* CMake works correctly
|
||||
|
||||
---
|
||||
|
||||
# 1. Configure Project
|
||||
|
||||
Use when:
|
||||
|
||||
* adding new `.cpp` files
|
||||
* modifying `CMakeLists.txt`
|
||||
* changing presets
|
||||
|
||||
```powershell
|
||||
cmake --preset windows-debug
|
||||
```
|
||||
|
||||
## What it does
|
||||
|
||||
* Reads `CMakePresets.json`
|
||||
* Loads vcpkg toolchain
|
||||
* Finds installed libraries
|
||||
* Generates Ninja build files
|
||||
|
||||
---
|
||||
|
||||
# 2. Build Project
|
||||
|
||||
Use after changing C++ code.
|
||||
|
||||
```powershell
|
||||
cmake --build --preset windows-debug
|
||||
```
|
||||
|
||||
## What it does
|
||||
|
||||
* Compiles `.cpp` files
|
||||
* Links FreeType + HarfBuzz
|
||||
* Builds `pdfengine`
|
||||
|
||||
---
|
||||
|
||||
# 3. Run Tests
|
||||
|
||||
Use to verify:
|
||||
|
||||
* wrappers
|
||||
* font engine
|
||||
* integration tests
|
||||
|
||||
```powershell
|
||||
ctest --preset windows-debug
|
||||
```
|
||||
|
||||
## Expected Output
|
||||
|
||||
```text
|
||||
100% tests passed
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# 4. Fresh/Clean Rebuild
|
||||
|
||||
Use when:
|
||||
|
||||
* cache issues occur
|
||||
* compiler mismatch happens
|
||||
* strange errors appear
|
||||
|
||||
```powershell
|
||||
cmake --preset windows-debug --fresh
|
||||
cmake --build --preset windows-debug
|
||||
```
|
||||
|
||||
## What `--fresh` does
|
||||
|
||||
* Deletes old cache
|
||||
* Regenerates Ninja files
|
||||
* Reconfigures compiler/toolchain
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```powershell
|
||||
cmake --preset windows-debug
|
||||
cmake --build --preset windows-debug
|
||||
ctest --preset windows-debug
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user