Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Deploying Qt app in Windows
xtingray last edited by xtingray
Sometime ago I created a Windows installer for my Qt app. It works perfectly but currently it requires a short .bat file to launch the software. This is the content of that file:
start qtapp.exe %1
Trying to avoid the use of the .bat file, I tried to set the PATH variable from the main.cpp directly with no luck. I tried creating a qt.conf but it failed too. Now I ran out of ideas.
Any time I execute the qtapp.exe binary I got an error saying that the program either can't find some plugin dll's or 3rd party libraries. Nevertheless, the .bat file works like a charm.
This is the current tree structure of my app:
I really appreciate any hint about how to enable the qtapp.exe binary to run directly. Thanks!
Kent-Dorfman last edited by
IIRC, you either have to run it thru the batch file, or add the needed path components to the default PATH variable of your domain profile under windows.
Why don't you simply use a default directory structure as described here and use windeployqt to copy all needed files?
xtingray last edited by
@Christian-Ehrlicher I tried to do it, but the only way it seems to work is by putting all the project files in the same folder. My project has more than 50 files among libraries, plugins, and data. I think there must be a more elegant way of releasing a Qt app, isn't it?
Not for the dlls - but it's up to you where to put your own dlls and data. Fiddling around with some batch files is crying for problems.