This guide explains how to install the Windows build dependencies for OpenXilEnv and how to build Qt 6.9.3 (qtbase) from source with MinGW 14.2 (UCRT). All commands are for Windows CMD (not PowerShell).
Choose your folders
We recommend the following folder structure and will stick to it during this build manual. You can change the layout to your preference and adopt the command lines accordingly.
%SystemDrive%\dev\
├── tools\ # %TOOLS_ROOT%
│ ├── mingw64\ # MinGW (niXman, 14.2.0, win32-seh-ucrt)
│ ├── Qt6_9_3\ # Qt install prefix
│ └── OpenXilEnv\ # OpenXilEnv install prefix
│
├── src\ # %SRC_ROOT%
│ ├── Qt6_9_3\ # Qt source code
│ └── OpenXilEnv\ # OpenXilEnv source code
│
├── build\ # %BUILD_ROOT%
│ ├── Qt6_9_3\ # Qt build directory
│ └── OpenXilEnv\ # OpenXilEnv build directory
Set these variables once and reuse them everywhere. Adjust to your preference.
set "TOOLS_ROOT=%SystemDrive%\dev\tools"
set "SRC_ROOT=%SystemDrive%\dev\src"
set "BUILD_ROOT=%SystemDrive%\dev\build"- CMake ≥ 3.20 (Kitware installer for Windows is fine)
- Python ≥ 3.x (any recent 64‑bit build)
- 7‑Zip or compatible tool (to extract
.7zarchives)
For quick starters:
- Download niXman mingw-builds package x86_64-14.2.0-release-win32-seh-ucrt-rt_v12-rev1.7z
- Extract to:
%TOOLS_ROOT%\mingw64 - Add to
PATH(persistently or for the current session). For a one-time session:
set PATH=%TOOLS_ROOT%\mingw64\bin;%PATH%Verify:
g++ --version
where g++
cmake --version
where cmake
python --version
where pythonThese steps use the qtbase 6.9.3 source tree and install to %TOOLS_ROOT%\Qt6_9_3.
- Fetch sources (download ZIP file or git clone of
qtbase6.9.3) and extract to a short path, e.g.:- Sources:
%SRC_ROOT%\Qt6_9_3\qtbase-6.9.3
- Sources:
- Create build directory:
mkdir %BUILD_ROOT%\Qt6_9_3
cd %BUILD_ROOT%\Qt6_9_3- Ensure Ninja is available:
ninja --version
where ninjaSome CMake installers ship Ninja; otherwise install it (download ZIP file and unzip it) and add to PATH.
set PATH=%TOOLS_ROOT%\ninja-win;%PATH%- Configure (Qt’s
configure.batwill generate a CMake build tree):
%SRC_ROOT%\Qt6_9_3\qtbase-6.9.3\configure.bat -debug-and-release -opensource -confirm-license -prefix %TOOLS_ROOT%\Qt6_9_3- Build:
cmake --build . --parallel- Install (both configs):
cmake --install . --config Release
cmake --install . --config DebugBefore configuring OpenXilEnv, make Qt’s bin available in PATH for the session:
set PATH=%PATH%;%TOOLS_ROOT%\Qt6_9_3\bin-
pugixml 1.15 — required if building with
-DBUILD_WITH_FMU2_SUPPORT=ONor-DBUILD_WITH_FMU3_SUPPORT=ON
From https://pugixml.org/ download the ZIP file
Unzip it e.g. to%TOOLS_ROOT%\pugixml_1_15 -
FMU Parser (FMI 2.0 / 3.0) — required for FMU support
For FMI 2.0...
Download the ZIP file
Unzip it e.g. to%TOOLS_ROOT%\FMI_2_0_4
For FMI 3.0...
Download the ZIP file
Unzip it e.g. to%TOOLS_ROOT%\FMI_3_0_1
Keep the source paths handy to pass via:
-DPUGIXML_SOURCE_PATH=%TOOLS_ROOT%\pugixml_1_15\src
-DFMI2_SOURCE_PATH=%TOOLS_ROOT%\FMI_2_0_4\headers
-DFMI3_SOURCE_PATH=%TOOLS_ROOT%\FMI_3_0_1\headers
- MinGW: x86_64-14.2.0-release-win32-seh-ucrt-rt_v12-rev1
- Qt: 6.9.x (qtbase) built with the above MinGW
- CMake: >= 3.20
- Python: >= 3.x
:: Set root pathes:
set "TOOLS_ROOT=%SystemDrive%\dev\tools"
set "SRC_ROOT=%SystemDrive%\dev\src"
set "BUILD_ROOT=%SystemDrive%\dev\build"
:: Add mingw to PATH. Make sure necessary tools are on PATH for this session, including cmake and python3
set PATH=%TOOLS_ROOT%\mingw64\bin;<path-to-cmake>;<path-to-python3>;%PATH%
:: Configure, build, install Qt
cd %BUILD_ROOT%\Qt6_9_3
%SRC_ROOT%\Qt6_9_3\qtbase-6.9.3\configure.bat -debug-and-release -opensource -confirm-license -prefix %TOOLS_ROOT%\Qt6_9_3
cmake --build . --parallel
cmake --install . --config Release
cmake --install . --config Debug
:: Add Qt to PATH
set PATH=%PATH%;%TOOLS_ROOT%\Qt6_9_3\bin