|
| 1 | +# Building the Documentation (Windows) |
| 2 | + |
| 3 | +The following sections describe how to build the CPACS schema documentation and tool-specific schema documentation using **MSBuild** on Windows. |
| 4 | + |
| 5 | +## Build documentation for `cpacs_schema.xsd` |
| 6 | +### 1. Extract Third-Party Dependencies |
| 7 | + |
| 8 | +Unpack the bundled third-party dependencies into the `development` directory (e.g., via `7z`): |
| 9 | + |
| 10 | +```cmd |
| 11 | +7z x -y .\development\3rdparty.zip -odevelopment\ |
| 12 | +``` |
| 13 | + |
| 14 | +This will populate the required external libraries expected by the documentation build. |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +### 2. Install MSBuild (Visual Studio Build Tools) |
| 19 | + |
| 20 | +Ensure that MSBuild is available. If it is not already installed, install the Visual Studio 2022 Build Tools: |
| 21 | + |
| 22 | +```cmd |
| 23 | +winget install -e --id Microsoft.VisualStudio.2022.BuildTools |
| 24 | +``` |
| 25 | + |
| 26 | +After installation, verify that `msbuild` is accessible from the command line (you may need to open a new shell). |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +### 3. Install Microsoft HTML Help Compiler |
| 31 | + |
| 32 | +The documentation build requires the Microsoft HTML Help Compiler (`hhc.exe`). |
| 33 | + |
| 34 | +- The official Microsoft download page currently links to a non-functional installer. |
| 35 | + |
| 36 | +- A working installer is available here: |
| 37 | + [https://www.helpandmanual.com/downloads_mscomp.html](https://www.helpandmanual.com/downloads_mscomp.html) |
| 38 | + |
| 39 | + |
| 40 | +During installation, you may see a warning indicating that a newer version than 1.3 is already installed. This warning can be safely ignored; the installer will still deploy the required components, and the build will succeed. |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +### 4. Build the Documentation |
| 45 | + |
| 46 | +Run MSBuild with the Release configuration: |
| 47 | + |
| 48 | +```cmd |
| 49 | +msbuild /p:Configuration=Release documentation\Cpacs_doc_project.shfbproj |
| 50 | +``` |
| 51 | + |
| 52 | +If `msbuild` is not fond in your command promt, add the path to `msbuild.exe` your environment variable `PATH` or call the executable explicitly. |
| 53 | + |
| 54 | +> **Info** |
| 55 | +> As an alternative to running the individual commands manually, you can use the |
| 56 | +> preconfigured batch script `createDocumentation.bat`. |
| 57 | +> |
| 58 | +> The script encapsulates the required build steps and invokes MSBuild with the |
| 59 | +> appropriate configuration for the CPACS documentation. |
| 60 | +> |
| 61 | +> Make sure to have `7z` and `msbuild` in your `PATH` environment variable or replace with the explicit link. |
| 62 | +
|
| 63 | +## Build toolspecific schema documentation |
| 64 | + |
| 65 | +### 1. Prepare the build environment |
| 66 | + |
| 67 | +Ensure that all prerequisite steps have been completed: |
| 68 | +- Third-party dependencies extracted (Step 1) |
| 69 | +- MSBuild installed (Step 2) |
| 70 | +- HTML Help Compiler installed (Step 3) |
| 71 | +### 2. Build the toolspecific documentation |
| 72 | + |
| 73 | +```cmd |
| 74 | +"C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe" /p:Configuration=Release documentation\Toolspecific_doc_project.shfbproj |
| 75 | +``` |
| 76 | +### 3. Adopt the configuration file to your tool |
| 77 | + |
| 78 | +If the above steps are working, the build system is working. You may adopt the `documentation/Toolspecific_doc_project.shfbproj` to your tool. |
0 commit comments