Create .deb package or .exe to run Qt-desktop apps in any machine
-
Hi, I'm new using Qt and I've done many simple projects but now I want to know how to compile them to use it in every machine without Qt libraries. (I'm mexican so my english is not good, thanks)
I programm on Ubuntu and Windows and I want to know how to make excecutable files that not depends from Qt libraries or .deb packages to use my applications on any computer. -
[quote author="danigarciaalva" date="1343552597"]I programm on Ubuntu and Windows and I want to know how to make excecutable files that not depends from Qt libraries or .deb packages to use my applications on any computer. [/quote]
You can create a static build and embed Qt libraries but you should have a separate build for each platform that you target (Linux, Windows, Mac OS).
-
Here is the problem, I dont know how to do that!
-
[quote author="danigarciaalva" date="1343606540"]Here is the problem, I dont know how to do that! [/quote]
Please read the documentation and wiki. There is a variety of articles about this topic. These are some of the most popular:
"Deploying Qt Applications":http://qt-project.org/doc/qt-5.0/deployment.html
"Build Standalone Qt Application for Windows":http://qt-project.org/wiki/Build_Standalone_Qt_Application_for_Windows
"How to build a static Qt version for Windows with GCC":http://qt-project.org/wiki/How_to_build_a_static_Qt_version_for_Windows_with_gcc
"Deploying an Application on X11 Platforms":http://qt-project.org/doc/qt-5.0/deployment-x11.html -
Build your project in release mode, and drag the dlls / plugins into the folder that your .exe is located and build your folder structure from there (dynamic linking)...
There are cross platform auto installers (to create the setup.exe) but most of them are costly. INNO setup on Windows is great for creating a standalone setup.exe, it just takes some configuration. On Linux, creating a .deb is how I have resulted to doing it, you just have to find some articles online on how to configure the build files.