Results 1 to 17 of 17

Thread: Has anybody ever able to deploy qt application?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    153
    Thanks
    40
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Has anybody ever able to deploy qt application?

    I'll explain how I deploy my apps. I use nmake at the moment. First of all, unless you have a commercial license, you can't statically link Qt applications. In addition, statically linking all those examples will take up like 5GBs of your hard drive, because the compiler has to embed all those DLLs like QtCore and QtGui, etc into each example.

    You have two options then: use nmake or use mingw32.

    If you want to use nmake, first install Visual Studio, then install the MSVC 2008 version of Qt from the Qt downloads page. If you install that in C:\Qt\4.6.2, right click on My Computer, go to Advanced, Environment Variables, and add C:\Qt\4.6.2\bin to your system PATH variable. Then, just download Qt Creator separately from downloads, and if it's not already configured, add C:\Qt\4.6.2\qmake\qmake.exe to the list.

    If you want to use mingw32, all you need to do is install the Qt SDK, which does everything for you (I believe). Running Qt Creator and building applications will be automatic.

    Once you're ready to distribute your application to others, you need to remember to include the Qt libraries in your installation file. You can check what libraries are required using dependency walker (linked above), because not everyone has the Qt libraries installed on their computer, nor does everyone have the .NET framework installed. If you use the Qt SDK, you just need to package in mingwm32.dll (something like that) and QtGui.dll and QtCore.dll, and any others you used. Also, make sure to rebuild your app for Release so it's smaller. For the installer, I like to use the free HM NIS Edit tool along with NCIS. Just run the wizard for a quick configuration of your setup file.

    Good luck!

    ~codeslicer
    [WIKI]Building Qt on Windows CE[/WIKI]

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Has anybody ever able to deploy qt application?

    Quote Originally Posted by codeslicer View Post
    First of all, unless you have a commercial license, you can't statically link Qt applications.
    Not exactly true. You can statically link Qt applications under the terms of t he GPL license if you don't have a commercial license. This does mean however that anyone can request a copy of the source code, and you must send it to them (or point them to where they can find it).

  3. #3
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Has anybody ever able to deploy qt application?

    General tips for generating Qt static dlls (tested using Qt SDK 2010.01 and 2009.05)
    1. Use windows XP
    2. Use "Qt Command Prompt" (found in start menu > programs) instead of the regular command prompt
    3. Don't build phonon (unless the have installed the SDKs mentioned in Qt for Windows Requirements).

    In other words, open up the "Qt Command Prompt" after a fresh Qt installation, then type in:
    configure -static -release -no-phonon -platform win32-g++
    Then:
    mingw32-make
    And now, when you build a Qt application, the only dlls required to be shipped are mingwm10.dll and possibly libgcc_s_dw2-1.dll (both found at <mingw-directory>\bin which would typically be C:\Qt\2010.01\mingw\bin). And the size of these two combined together is about 50kb...
    Last edited by Lawand; 22nd February 2010 at 09:17.

Similar Threads

  1. how to deploy my application
    By yuvaraj.yadav in forum Installation and Deployment
    Replies: 5
    Last Post: 9th April 2009, 10:21
  2. Deploy Qt application on Mac OS X
    By giandrea77 in forum Installation and Deployment
    Replies: 3
    Last Post: 11th February 2009, 09:34
  3. Third Party tool for deploy Qt Application on Mac?
    By vishal.chauhan in forum Qt-based Software
    Replies: 6
    Last Post: 10th February 2009, 17:03
  4. Deploy Qt application on Mac OS X 10.4 Tiger
    By mourad in forum Installation and Deployment
    Replies: 1
    Last Post: 30th March 2008, 16:20
  5. My application can't connect to database when deploy it???
    By gtthang in forum Installation and Deployment
    Replies: 1
    Last Post: 15th February 2006, 11:01

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.