How do I unify all dlls to the main application when doing windeployqt?
-
Dlls are not split or modified in any way by windeployqt
-
Dlls are not split or modified in any way by windeployqt
@Christian-Ehrlicher I mean to unify all these etc. into one
-
That's not possible. You might create a static version of some dlls but that's not easy and I don't recommend it.
-
That's not possible. You might create a static version of some dlls but that's not easy and I don't recommend it.
@Christian-Ehrlicher I see this guy modified the kits for MSVC2019 static whether it has any disadvantages or advantages.
https://www.youtube.com/watch?v=KCH92zvrHas&t=839s -
For msys2 Qt, we can write a script with ldd.exe,
- run windeployqt.
- enum all exe, dll in deploy folder, for each file run "ldd filename"
- split ldd outputs, copy files with prefix "/mingw64/" to deploy folder.
This approach not only enum main Qt dlls, but also include plugin files. For eg, QSql plugins such as qpsql need libpq.dll, and libpq.dll need ssl libiraries at RUNTIME. If some of these dlls is missing, a "Driver not loaded" error will occure and connection will be a failure.
-
Hi,
just 3 things about the dll files under Windows:a) It's - in my opinion - a bit odd that some dlls are in subfolders while other dlls are in the main folder. For "normal" users it is not perfect to see so many files in the main folder. It might be better to have all dll files in a (different) subfolder(s). (Or is there a speed problem if they are in a subfolder?)
b) I installed the new Qt 6.7.2 and now it looks like windeploy doesn't work anymore. I always get an error: :DOS header check failed.
Sadly this error is now also present if i compile with older Qt version.
How can i fix that problem?c) It looks like windeploy add too many dll files. For example it added qml dll files, even i don't use qml. (I can't remeber, I think that started with Qt 6.6)
Have a nice weekend
-
Hi,
just 3 things about the dll files under Windows:a) It's - in my opinion - a bit odd that some dlls are in subfolders while other dlls are in the main folder. For "normal" users it is not perfect to see so many files in the main folder. It might be better to have all dll files in a (different) subfolder(s). (Or is there a speed problem if they are in a subfolder?)
b) I installed the new Qt 6.7.2 and now it looks like windeploy doesn't work anymore. I always get an error: :DOS header check failed.
Sadly this error is now also present if i compile with older Qt version.
How can i fix that problem?c) It looks like windeploy add too many dll files. For example it added qml dll files, even i don't use qml. (I can't remeber, I think that started with Qt 6.6)
Have a nice weekend
@Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:
For "normal" users it is not perfect to see so many files in the main folder.
Just look at the programs in your
C:\Program Files
folder...This is for example my Antivirus
Lot of DLLs in the program folder... visible for any "user".
It's common to have it like this. -
I didn't said that a lot of guys do it like that. I said it is better for a normal user to have less.
You can also make a picture from an untidy room and then tell it is normal, since many people have untidy rooms. For a new guy, that enter the directory/room the first time, it is nice to see a tidy room/directory. -
I didn't said that a lot of guys do it like that. I said it is better for a normal user to have less.
You can also make a picture from an untidy room and then tell it is normal, since many people have untidy rooms. For a new guy, that enter the directory/room the first time, it is nice to see a tidy room/directory.@Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:
For a new guy, that enter the directory/room the first time, it is nice to see a tidy room/directory.
If you don't have any computer / IT knowledge and you are just a "user" who can open a browser or start a program by clicking the shortcut icon, you shouldn't fumble around in any system or program directory... so you should not care if it's "clean" or if there are some files. These structures are not intended to be modified anyway. The programmer/publisher of this software decided to do it this way and it works.
Software is not designed for PEBKACs specifically ;-)
But yeah, if you think this way you need to provide some Kiosk OS mode where everything is hidden from the user so one can't do any harm to the system :P
(good old Win XP "security" for Sys32... "Files are hidden. Show them anyway?" - "Yes". - "Ok go ahead. GL") -
Well, for new users there is no shortcut.
And just because many other guys have untidy directories it doesn't mean that a professional software isn't allowed to be tidy. It will look much more professional.
It is like if you sell items on Ebay. If you clean them, you will get sometimes much more money. Just because you removed the dust in a few seconds can make a few 100€ price difference. -
Well, for new users there is no shortcut.
And just because many other guys have untidy directories it doesn't mean that a professional software isn't allowed to be tidy. It will look much more professional.
It is like if you sell items on Ebay. If you clean them, you will get sometimes much more money. Just because you removed the dust in a few seconds can make a few 100€ price difference.@Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:
it doesn't mean that a professional software isn't allowed to be tidy. It will look much more professional.
I bet in 99% of all the "professional" software are files or DLLs in the root program directory.
-
Or in other words:
If i use linuxdeploy, then i can make an appimage and there is only a single file that a user must click.
If i use macdeploy, then i can make an image and there is only a single file that a user must click.
If i use windeploy, then the user must open a directory and must be clever enough to select the executable.
Do you see the problem now?
Linux and MacOS can do it, but not windows.
So 3 variants:
a) just tidy up the directory (i guess this is the easiest)
b) make an app image like with macdeploy or linuxdeploy. But i don't know how to do it with windeploy. How to do it?
c) code an installer. Well, only coding an installer for windows only? A bit stupid, since i know it is so easy possible without an installer under linux and mac os. -
Or in other words:
If i use linuxdeploy, then i can make an appimage and there is only a single file that a user must click.
If i use macdeploy, then i can make an image and there is only a single file that a user must click.
If i use windeploy, then the user must open a directory and must be clever enough to select the executable.
Do you see the problem now?
Linux and MacOS can do it, but not windows.
So 3 variants:
a) just tidy up the directory (i guess this is the easiest)
b) make an app image like with macdeploy or linuxdeploy. But i don't know how to do it with windeploy. How to do it?
c) code an installer. Well, only coding an installer for windows only? A bit stupid, since i know it is so easy possible without an installer under linux and mac os.@Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:
If i use windeploy, then the user must open a directory and must be clever enough to select the executable.
Do you see the problem now?Provide a proper installer and the user don't have to use the explorer to find the executable - that's the way to go on windows.
-
Yes... Maybe later. I am spare time coder only. So far I made a YouTube Video for guys that don't know how to run it. So far over 16.000 views. So it look like Windows users need an installer. But see my note c)
Anyway. This problem is minor. Currently windeploy doesn't run at all anymore (because of the ":DOS header check failed." that was introduced with Qt 6.7.2) I am currently forced to copy and paste the dlls manually. -
You don't really have to "code" an installer. Qt itself provides the Qt Installer Framework (had some trouble with getting root access on Linux). If your project already uses CMake it is easy to integrate some off-the-shelf installers. For legacy reasons we are using NSIS (without CMake, but I think CMake does support this).
(We also decided to compile Qt statically and link to the static VS runtime which in our case allows to deploy a single executable. I am not sure how that translates with OpenGL and D3D in your case (i.e. if there are static versions of these as well). Linking to Qt statically under the LGPL has some additional requirements which can be a bit annoying. However, for commercial software it is at the same time very unlikely that someone wants to switch out the Qt libraries.)