qt_build
Build the injection library and injector for a chosen environment, enabling automation and inspection of native Qt applications.
Instructions
Build the Qt injection library and injector for the specified environment.
toolchain selects the compiler: "msvc" (default; vcvars_path
is a vcvars bat, qt_env a qtenv2.bat) or "mingw"
(vcvars_path is the MinGW bin dir; qt_env the kit's qtenv2.bat
— MinGW Qt kits ship one too; the Qt-bundled Ninja is used
automatically).
Before calling this tool, the AI MUST present available build
environments (from qt_detect_msvc_and_qt) to the user and let them
choose. Do NOT guess or auto-pick paths — the user decides which VS
or MinGW toolchain and which Qt installation to use.
The AI MUST also ask the user whether to enable QML/QQuick support
(with_qml). QML support is required for inspecting QML/Qt Quick
applications but adds build dependencies.
The AI MUST also ask the user to choose the build_type (Debug or
Release). The build type must match the target process — a Debug
process requires a Debug build, a Release process requires Release.
qt_major (default 5) must match the target application's Qt major
version — read it from qt_list_processes' qt_version field or from
the qt_detect_msvc_and_qt result; a Qt6 target built with qt_major=5
fails to inject. vcvars_args — extra args for the VS vcvars batch
(e.g. "-arch x64"). generator — CMake generator override; omit to
auto-select. Before rebuilding, detach any session that still holds
the old DLL (qt_detach with purge=True) or the build fails on a locked
file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qt_env | No | ||
| qt_major | No | ||
| with_qml | No | ||
| generator | No | ||
| toolchain | No | msvc | |
| build_type | No | Release | |
| vcvars_args | No | ||
| vcvars_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |