Overview¶
Hooking up Qt sub-processes that use a different Qt version than the Qt process which launched them is possible, but requires some extra setup steps. This articles describes how to set this up.
Qt Sub-Processes on Microsoft Windows¶
Step #1 - Rename sub-process executable¶
Rename...
C:\Program Files\MyAUT\mysubprocess.exe
...to...
C:\Program Files\MyAUT\mysubprocess_.exe
Step #2 - Install "starter.exe
" as sub-process executable replacement¶
a) From starter-latest.zip copy...
squish_for_qt/starter.exe
...into...
C:\Program Files\MyAUT
...and rename it to...
C:\Program Files\MyAUT\mysubprocess.exe
b) From starter-latest.zip copy...
squish_for_qt/starter.exe.js
...into...
C:\Program Files\MyAUT
...and rename it to...
C:\Program Files\MyAUT\mysubprocess.exe.js
Step #3 - Configure "starter
"¶
In...
mysubprocess.exe.js
...adjust the value of...
squishQtPath
...to contain the installation path of the Squish for Qt installation that should be used for the sub-process:
Caveats¶
Because this approach "replaces" the sub-process executable with another executable that implements the sub-process hooking, it will only work in cases, where the parent process does not make use of the process ID of the sub-process.
This approach will only work when parent and sub-process do not communicate via standard streams (stdin, stdout, stderr).
The Squish packages used for this approach must typically have the same major and minor Squish version (both 7.1.x, or both 7.0.x, etc.).
Background Information¶
The approach outlined here is based on changes, that can be implemented in the parent process, too. Since it may be a more compatible, the required changes are described here as well.
To hook up a Qt sub-process that uses a different Qt version or an incompatible (but for which a compatible Squish for Qt package is already available) Qt version, the following changes are required for the launched sub-process (this means that the parent process must implement them - except for the Built-in Hook):
Prepend (don't append) the path to the Squish for Qt package for the sub-process to the
PATH
environment variable.Set the environment variable
SQUISH_PREFIX
to the path of the Squish for Qt package for the sub-process.Launch the sub-process via
bin/dllpreload.exe
(see Hooking up Qt Sub-Processes in Squish for Qt ) from the Squish for Qt package for the sub-process.
Alternative: Compile the Squish for Qt built-in hook (see Using the Qt Built-in Hook and Enforcing the Qt Built-in Hook into the sub-process executable.