[SOLVED] Importing necessary dlls to application
-
Please see the official "deployment guide":http://qt-project.org/doc/qt-5/windows-deployment.html, especially the part about the deployment tool.
Static linking is possible, but hard to achieve. It is also believed to be incompatible with LGPL license, so unless you are a commercial customer, or your application is Open Source, you can encounter legal problems.
-
Well, isn't there a simple way to import the dlls into my program and export ("install") them on the other computer?
Before I started coding in C++, I coded with the script language Autohotkey, and there was a simple one-liner command to import any kind of file into my program and export it to the typed destination:
@FileInstall, soure_file_path, dest_file_path@
So how is that possible? I don't want to use a "big" installer, I'd like to do that on my own, just to import a hand full of dll files and export them later... Autohotkey itsself is written in c++, so there has to be a way to do that..Any solutions?
-
Please read the link I have provided. You can use the windeployqt tool, which is a one-liner ;-)
-
Thank's for that! Now I have all the stuff I need to carry with my executable.
But that will not finally solve my problem, because I'd really like to import all those files into my executable, so I can upload the executable to my website and a user can simply download and run it.
There must be a way to import those files into the executable and export them on users computer to a specific destination... Like an installer, but it should be possible to do it without external tools... -
[quote author="Binary91" date="1415626008"]it should be possible to do it without external tools...[/quote]
maybe it should, but it is not possible right now.
As said, you can try static compilation, but it is not easy to make it work.
-
You can pack it into a zip, or even to sfx to make it self-executable. But that is still an additional step.
-
Hi again,
at least, I spent a little time reading the source of AutoHotkey and its command "FileInstall".
Combining that with rummaging the windows MSDN website, I noticed the windows resource system (http://msdn.microsoft.com/en-us/library/windows/desktop/ff468900(v=vs.85).aspx).I changed the pure C code and adjusted it to Qt standard. The result is a useful class that allows simple usage of an import/export routine to create setup files and extract its contents on other computers.
Only problem is, that this code might be Windows dependent. For those who are interested in a platform independent way, feel free to help yourself :-PYou can find the library and the User Interface I did on "this Wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation :-)
-
code moved to "this wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation <<
-
code moved to "this wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation <<
-
code moved to "this wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation <<