Is it possible to make a tool to download required qt libraries?
-
As you know, you need to carry about 40mb libs even if your application is very simple.
Does anyone ever try to make a small tool which will check whether the necessary libraries are in the "c:\windows\system" directory (on windows, or /usr/lib on linux), if not, it will download the library and put it into the system directory.
I think this job is quite easy and useful, so I wonder why there isn't such a tool? -
Good question and thought. online installs do this kind mechanism only. I have not seen any tool with Qt which does this selectively for only few libraries. May be you can create one and contribute to community. This will be superb as well.
-
There is Ministro for Android which does exactly what you describe. And there is great interest among Qt developers to create a unified deployment framework for Qt apps (something like simply running "make deploy"). I advise to subscribe to development Mailing List and join the discussion (and dev efforts, of course :)).
-
Hi and welcome to devnet,
Currently on Windows, it would be a bad idea to install a library like Qt in "C:\windows\system", this folder is not meant for that. Some software are putting e.g. openssl in there and all of a sudden you don't know why, your application can't get anything SSL related working because that version is found before the one your are shipping. Also what version of Qt should be installed ? x86 ? x86_64 ? Which version of Qt are you using MinGW, Microsoft Visual Studio (and again, what version of VS ?) ? The environment is way too complex there. What about people that are using custom built version (same problem as for OpenSSL) ?
Linux distributions currently all provide Qt as standard packages so if you are providing the correct packages (deb, rpm etc...), Qt will be installed as a dependency (unless it's already installed and its nowadays generally the case)
However, an example of such a tool is Ministro for Android, but again that is a special case since the OS is pretty much known and follow strict conventions.
Currently, most people not wanting to ship the dlls build Qt static (BEWARE of the licensing implications)
Hope it helps
-
[quote author="SGaist" date="1390813146"]
Which version of Qt are you using MinGW, Microsoft Visual Studio (and again, what version of VS ?) ?[/quote]In fact this is what made me ask this question. What's the difference between Qt's MingW and VC version? Can they share the same libraries?
Not all the Linux distributions provide Qt5 libraries I think (such as CentOS). And Qt is not forward compatible so the libs in system may not new enough. Also, it seems too complex to provide deb and rpm packages. I just want to tar and compress my application with a .sh file(the tool). I think this is much easier.
-
Hi,
MinGW (GCC) and Visual Studio provide different compilers, which are not compatible with each other. If your program is built using one compiler, you cannot link it to a library built using a different compiler. The same is true on Linux (e.g. you can't link a program built with the GCC compiler to a library built with the -LLVM Clang- Intel C++ Compiler).
Back to your original question: Is it possible? Possibly, but there will be challenges. The compiler incompatibilities is one of them -- different compilers still produce the same library filenames, so you can't store them in the same directory. The tool will need to manage this, and make sure that different programs load the correct version of the libraries.
-
[quote author="JKSH" date="1390834469"]The same is true on Linux (e.g. you can't link a program built with the GCC compiler to a library built with the LLVM Clang compiler).[/quote]
clang runs by default in GCC-compatibility mode, where it can link to GCC libraries, and binaries it produces are compatible with GCC.
-
[quote author="sierdzio" date="1390848385"][quote author="JKSH" date="1390834469"]The same is true on Linux (e.g. you can't link a program built with the GCC compiler to a library built with the LLVM Clang compiler).[/quote]
clang runs by default in GCC-compatibility mode, where it can link to GCC libraries, and binaries it produces are compatible with GCC.[/quote]Oops, I didn't know that! Ok, change the example to GCC vs. Intel C++ Compiler. ;)