Deploying on other PC's doesn't work
-
Can you be more precise about the "doesn't work" ?
Is it crashing at startup ?
Is there a functionality missing ?
Do you have any external dependencies ?
From a quick look at the screenshots you posted, I would say no but it doesn't hurt to check. -
To add to @SGaist
Did you try to start the exe on the other machine via command prompt?
If I understand correctly, you can start the application in creator, but also externally on the developer's machine?
It is only the deployment machine giving you a hard time?
I suggest to try another PC too. Possibly your deployment machine has some fishy dlls. -
Thanks for your answers.
I'll try to post some more detailed information (maybe even my project) asap.The application doesn't start at all or more precisely it crashes silently when started. I assume that it fails at loading some dll's.
I don't think I've got any external dependencies. I only use the qt gui and the xml modul.I tried to start the app via doubleclick on 2 different Win 10 PC's.
(maybe at the weekend I'll find some time to investigate more deeply)
Good Evening,
Lukas
-
Then you should start it from a command line with the
QT_DEBUG_PLUGINS
environment variable set to 1. That should give you more clues about what is happening. -
Hi Community,
I've worked on a little project for a while now and i want to deploy it to another pc with Windows without QT installed.
I'm using Qt 5.9 installed today via Qt Online Installer and im using mingw as compiler (the standard from the online installer).The App itself is running smoothly when started via Qt Creator. When i copy the necessary DLL's and my release EXE in one folder it starts and works properly but when i copy it to another PC without QT installed it won't work at all.
There is no message/error that something is missing. The App just doesn't show up. There is also no process in the task manager. But the Event Viewer says that the App crashed but i cannot figure out why.
Things I've tried:
- Copy the DLL's by hand
- Copy the DLL's via windeployqt
- Copy all DLL's in the /bin/... folder and all folders from /plugins/...
I really don't know whats going wrong and I need some help :/
Greetings Lukas
@FlyingHubert said in Deploying on other PC's doesn't work:
The App itself is running smoothly when started via Qt Creator. When i copy the necessary DLL's and my release EXE in one folder it starts and works properly
This is good. Now, let's do a sanity check.
On your same Development computer which can run your release EXE properly, temporarily rename the C:\Qt\ folder to something else. Now, try running your release EXE again. Does it still work properly?
- If the answer is "Yes", that means your deployment is missing a non-Qt component
- If the answer is "No", that means your deployment is missing a Qt DLL.
-
In addition to what JKSH recommended, another tool that may help you is Process Explorer. Start your application from the deploy directory on your working machine, Then locate the application in Process Explorer and select it. In the bottom pane will be all the dlls that are being used, along with the path to them. Click the "Path" bar so they are sorted by path, and see if there are any that are not located in the C:\Windows... or your deploy directory.
-
Hi,
to clarify: you did put the plugins in their respective directories together with running dlls (qtcore.dll etc.) in the program folder?
I've encountered the behavior you describe - it was my fault, I forgot about plugins directory tree, just used the runtime dlls. -
Hi everyone,
I read all your comments and tried many different things... but because I can't get it running smoothly and because I haven't worked on the code and its purpose for a month now I decided to rewrite the whole program and try to figure out when and where it can't be executed on another PC anymore.
Thanks for your help and all the comments. I will do another thread if I get in trouble again.
Two last questions:
- Which guide would you recommend to deploy QT applications on windows platform.
Is it "http://doc.qt.io/qt-5/windows-deployment.html" because that one didn't work out that well for me :( - And which compiler would you use to compile - is mingw okay? (I need a free one if possible.)
Greetings Lukas
- Which guide would you recommend to deploy QT applications on windows platform.
-
Visual Studio also has a free edition.
Dependency Walker and windeployqt are usually enough to get your application running however without more details about your project it's difficult to help you find why it's not working properly once deployed.
-
Hi everyone,
I read all your comments and tried many different things... but because I can't get it running smoothly and because I haven't worked on the code and its purpose for a month now I decided to rewrite the whole program and try to figure out when and where it can't be executed on another PC anymore.
Thanks for your help and all the comments. I will do another thread if I get in trouble again.
Two last questions:
- Which guide would you recommend to deploy QT applications on windows platform.
Is it "http://doc.qt.io/qt-5/windows-deployment.html" because that one didn't work out that well for me :( - And which compiler would you use to compile - is mingw okay? (I need a free one if possible.)
Greetings Lukas
@FlyingHubert I personally compile with mingw but deploy with Inno Setup - apart from regular tools it has IDE that works, involves Pascal Script to automate things and gives me total control over the installation or upgrade process. It is easy to learn the basics of that although documentation is somewhat scarce (for more advanced tasks some knowledge of Pascal would be recommended). And it is freeware.
Very unfortunately for myself I found deployment tools included with Qt a bit clumsy. - Which guide would you recommend to deploy QT applications on windows platform.
-
Hello @FlyingHubert
I SOLVED, this is how mi app start to wok in other PCs:
The problem was when I was reading a file in my program at a specific path (example: C:\Program Files (x86)\TestQT1\test.txt) and when I execute the .exe file from another PC, the path was slightly different and it was crashing at the beggining.
I know this is a very old post at the time but I was looking for the same problem so hard and I spent a lot of time to find this issue, so I hope this information will be usefull for any other people
Regards.