Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.4, 6.3.0
-
None
Description
Currently the relocatable feature is disabled by default when configuring a static Qt.
When enabled, that means that running applications from the build directory will not find qt provided translations and qml modules.
See
https://codereview.qt-project.org/c/qt/qtbase/+/210936/30#message-f3fd1bac43f08fe924fb3a0307942e43781e779c
and
https://codereview.qt-project.org/c/qt/qtbase/+/210936/30#message-82c9151682f5ed1baf6132569687009692378f60
What we could consider doing is creating a qt.conf inside the app build dir.
It would be created by a qt_add_executable() CMake call.
The qt.conf would have translations and qml imports entries, as absolute paths pointing to the Qt installation dir.
We would only do it for static + relocatable case, to reduce potential breakage.
We should ensure that the qt.conf is not installed. We should also provide an opt-out, which would be useful in case if the project already creates a qt.conf file.
Creating the qt.conf automatically will be a small breakage for projects that already create it themselves, but the scope is hopefully rather small (static + relocatable).
Attachments
Issue Links
- relates to
-
QTBUG-102877 "-static" and "-feature-relocatable" cause extra 'bin' directory in various qmake paths
- Closed
- resulted from
-
QTBUG-15234 Qt hard-codes paths in libraries/binaries
- Closed