Fix help window for conda installs on Windows #40015
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of work
Since the dawn of the
mantidworkbench
conda package, attempting to open the help window in a conda install on Windows would cause the application to crash. This change fixes the issue by ensuring that the files required by Qt WebEngine (such asQtWebEngineProcess.exe
,.pak
resource files, andicudtl.dat
) are placed alongside the conda environment’spython.exe
, which is where Qt expects them.Other approaches were tested - including providing
qt.conf
files and setting environment variables for the resources andQtWebEngineProcess.exe
- but these had no effect. From the observed behavior, the relevant search paths appear to be hard-coded within Qt WebEngine and cannot be overridden by configuration alone.The fix here is essentially mimicking what we do with the standalone packaging, except in that case the
mantidworkbench.exe
is in a more friendly location from the perspective of Qt WebEngine (inside<install_root>/bin
, rather than just<env_root>
as with the conda installation). The fallback search paths appear to be relative to the .exe and are:../qt5/resources
../resources
.exe
location iself.In the standalone install, because the
.exe
is nested insidebin
, we could move the resources to../lib/qt5
. However, for the conda installation, that path would take us outside of the conda environment location because thepython.exe
sits in the root of the conda prefix. Taht is why we have to copy the files into the environment prefix.Closes #34739
To test:
https://builds.mantidproject.org/job/build_packages_from_branch/1350/
mamba install -c mantid/label/windows-help-fix mantidworkbench
Reviewer
Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.
As per the review guidelines:
Gatekeeper
As per the gatekeeping guidelines: