Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
move qt files to subdirectory
Is it possible to move all the qt specific files like the imageformats, platforms and bearer folders as well as the Qt dlls into a subdirectory (e.g. qt_files) on deploy? Our users have to deal with other subdirectories frequently and the abundancy of (for them useless) qt files is making the application dir look a bit messy.
See the qt.conf documentation.
I understand how I can change the default plugin path with the .conf or the static function, and moving the files there and running the app does indeed work.
Also I can see that I can change the path with --plugindir <path> in windeployqt.
But doing so won't deploy them to that directory at all.
Is there something I'm missing?
Sorry, I haven't used that option from windeployqt.
So i figured it out with
in the VS properties.
But now it complains about the windows plugin not being found (platforms folder is now also in the plugins folder).
nevermind... I was being stupid.
It should be
since qtplugins would need to be added to the librarypaths first.
now the only thing left are the qt module dlls
So I got it to deploy the dlls (Qt5Core.dll ...) to a subfolder with
And added that path to the qt.conf file.
It works fine in visual studio, but when I run the exe itself it still misses those dlls
Did you check your
Windows seems to look for those dlls at execution.
This means I did nothing wrong, but I think it's just not possible without adding those dlls to PATH similar on windows side.
Can you show your folder layout and qt.conf file content ?
Megamouse last edited by Megamouse
This is the not working layout.
Moving the contents of libs back to the appdir and removing the Libraries entry from the .conf and windeployqt works fine.
[Paths] Prefix = qt/ Plugins = plugins Libraries = libs
Are you using windeployqt with all options to set the paths you want to use ?
--libdir $(TargetDir)\qt\libs --plugindir $(TargetDir)\qt\plugins
the deploy works fine.
also plugins are found.
but windows can't find the other dlls.
I guess it's simply not possible or Qt/Windows isn't supporting this yet
What if you use lib in place of libs ?
I can't imagine that would make any difference. I redefine the folder to libs, so lib should be irrelevant. Also I am 100% sure I tried that anyway.