I’ve got an external command line executable “program.exe” that makes use of a DLL “program.dll”. I would like to embed these two files as resources in my Qt application. Then later, I need to be able to run program.exe from my application. Can it be done with Qt? In particular, can executables and DLLs be added as resources?
Share
You can add them as resources, but you won’t be able to execute your “program.exe” directly from the resource, at this is a pure Qt system that the underlying OS won’t understand.
What you would need to do at execution time is to copy it (with the .dll) from the resources to a temporary location and execute from there.
Obviously, as @webclectic pointed out, this is not a proper approach. Unless there are imperious reason to do that, the right way is to create a package (.msi, .rpm depending of the target OS) with those executables and deploy them that way.