Run Dialog without external files
Hello, i woud like to create Dialog which shows when program starts. This Dialog check if all external files is existing and check md5 hash od this files (if they arent corrupted or modified by user), check newest version of program etc... And problem is that if i run program it loads ALL Qt dlls which i am using in whole program, I would like to make that this Dialog runs without any external files (necessary files to run program like a QCore and QGui could be loaded in exe file) OR Make that this Dialog loads only QCore and QGui at start program and when control finish than program loads remaining Qt dlls and starts MainWindow (main porgram).
If you have any other ideas you can post it :)
You can't load Qt dlls when you want to simply because they are linked to your program and need to be resolved at startup. That's just how it works. If you were to load Qt dlls when you wanted (e.g. using QLibrary) you would have to also manually resolve addresses of all functions and classes. It's possible but just impractical at this scale.
But here are two ideas what you could do:
One way would be to split the app in two. First one would be the loader (the dialog) and it would use QProcess to start the main app when it finishes its work. Handy for updating the main app too as it's a separate file.
The other idea would be to make your main app a shared library and load it dynamically with QLibrary at the right time. Same benefit as above except an exe and a library instead of two exes.