Results 1 to 17 of 17

Thread: Has anybody ever able to deploy qt application?

  1. #1
    Join Date
    Jan 2010
    Location
    India
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Has anybody ever able to deploy qt application?

    I am super frustrated, I am wondering, they have created such a beautiful devlopment plateform but why they are miser in providing easy deployment technique.

    I have followed the tutorial http://doc.trolltech.com/4.1/deployment-windows.html , but always ends up with error 1 &error 2.
    I have waisted 2 complete nights to deploy simple examples.
    I reinstalled Qt 3-4 times because Qt creater get corrupted after every try of deployment.It does not even build eamples.
    What is nmake, mingw32 make?

    Why i am getting these error?

    Please tell me some easy, solid way to successfully deploy qt example on windows.

  2. #2
    Join Date
    Feb 2010
    Location
    Russia, Omsk
    Posts
    28
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

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

    What kind of errors do you have.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

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

    as for your topic question.
    Yes i have deployed many qt apps on win/mac/linux/winmobile/embeddedlinux/

    now tell us what exactly the errors you are getting. ? and why are you reinstalling qt for deploying your application?
    your post is not clear.

  4. #4
    Join Date
    Jan 2010
    Location
    India
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

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

    1) I did

    cd C:\path\to\Qt
    configure -static <any other options you need>

    it took 10 minutes
    worked fine.

    2)i did

    nmake sub-src

    nothing happened
    then I did

    mingw32-make

    A process started and run for 4-5 hours.
    I want to know why name did not work with me and why mingw32 worked?

    It ended with error like exited error return 1 and exited error return 2.
    (sorry i did not note the exact error messages. I will have to waist 4-5 hours to get that error again.

  5. #5
    Join Date
    Feb 2010
    Location
    Pennsylvania, USA
    Posts
    36
    Thanks
    9
    Thanked 3 Times in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

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

    Mingw32 is an implementation of the GNU compiler for Windows environments: http://www.mingw.org/

    Nmake is a Microsoft tool which allows you to build projects from a configuration file, much like the linux version of "make".

    Personally, I prefer mingw32.

    A really nice thing about the "make" process is, if you run mingw32-make again, it will skip everything that is already done, and re-attempt to compile the module that failed. The only time wasted will be waiting for that specific module, not all of them. So try running it again, and come back with the error.

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

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

    Quote Originally Posted by Tarun View Post
    1) I did

    cd C:\path\to\Qt
    configure -static <any other options you need>
    Why? Why you need static? I would suggest you first try to deploy your application with dynamic libraries!

  7. #7
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

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

    I have done last night!!

    follow the instructions:
    http://doc.trolltech.com/4.4/deployment-windows.html

    but you MUST pick the DLL files (QtCore4.dll, QtGui4.dll , ...) from "Qt/2010.01/qt/bin"

  8. #8
    Join Date
    Feb 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

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

    Well, I'm still having trouble. Why aren't deployment features built into the IDE?

    Anyway, building statically ground to a stop on my Win 7 x64 system when I was informed that Qt couldn't determine the system I was on (fair enough, since Win 7 isn't a Tier 1 supported system yet), and I was instructed to use the "-platform" directive to specify this. Well, what to actually pass to this directive isn't listed anywhere as far as I can tell: the configure help file says to read the "Read me". The Read Me file refers to the Qt web page on supported platforms. Nowhere is there "and here's how you tell configure that you're building on a 64-bit Vista system".

    OK, let's try dynamic-- it seems to be the preferred solution anyway. One little problem: the Qt 4.6 SDK/IDE apparently doesn't include the "nmake" tool (if it doesn, I can't find it).

    So where do I go from here?

  9. #9
    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?

    'nmake' is a Microsoft tool. I'm going to assume that Nokia don't have a license to include it with Qt, and since it comes with Visual Studio anyway, it would be daft if they did (after all, it requires Visual studio too)

    For GCC, use MinGW Make instead.

  10. #10
    Join Date
    Feb 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

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

    Quote Originally Posted by fatjuicymole View Post
    'nmake' is a Microsoft tool. I'm going to assume that Nokia don't have a license to include it with Qt, and since it comes with Visual Studio anyway, it would be daft if they did (after all, it requires Visual studio too)

    For GCC, use MinGW Make instead.
    Hm. But isn't the whole point of the Qt Creator IDE to give me a Qt-aware development environment so I don't have to purchase and muck about with Visual Studio? And if you need third party utilities to build release versions of Qt applications, shouldn't this be spelled out in the "How to deploy at Qt app" document?

    I see "mingw32-make.exe" in the mingw directory. I'll give that a shot.

  11. #11
    Join Date
    Feb 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

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

    Well, using "mingw32-make clean" does indeed clean out the intermediate files. Trying to use qmake initially got me the QMAKESPEC not defined message, but I figured that out, too.

    Now, though, both "qmake -config debug" and "qmake -config release" both return instantly without actually, you know, building anything.

    I've used Qt with Eclipse under Linux for some other projects. It was never anywhere near this hard just generating a release. I must be overlooking something painfully obvious, or perhaps the Windows support just isn't there yet...

  12. #12
    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 dramsey View Post
    Hm. But isn't the whole point of the Qt Creator IDE to give me a Qt-aware development environment so I don't have to purchase and muck about with Visual Studio? And if you need third party utilities to build release versions of Qt applications, shouldn't this be spelled out in the "How to deploy at Qt app" document?
    You don't need Visual Studio, you only need it if you want to use nmake. GCC is perfectly capable on its own if you don't want to use Visual Studio.

    Quote Originally Posted by dramsey View Post
    Now, though, both "qmake -config debug" and "qmake -config release" both return instantly without actually, you know, building anything.
    qmake builds makefiles, it doesn't build anything else. You need to use your favourite make application to actually do the building. Eg. mingw32-make, or nmake.

    Alternatively, you can just use the QtCreator IDE to do all this for you, and then copy the generated exe and appropriate dlls to your distribution directory, then pack up that dir and distribute.

  13. #13
    Join Date
    Feb 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

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

    Quote Originally Posted by fatjuicymole View Post
    Alternatively, you can just use the QtCreator IDE to do all this for you, and then copy the generated exe and appropriate dlls to your distribution directory, then pack up that dir and distribute.
    You know, I would really, really like to do that, since I am using QTCreator. But the "How to deploy your application" notes online don't seem to know about Creator. Simply trying to run the .exe files it produces results in a seemingly endless list of missing DLLs. Is there a way to get it to grab the DLLs for me, or do I have to search them out myself?

  14. #14
    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?

    What you need is something like http://dependencywalker.com/

  15. #15
    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]

  16. #16
    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).

  17. #17
    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 10:17.

Similar Threads

  1. how to deploy my application
    By yuvaraj.yadav in forum Installation and Deployment
    Replies: 5
    Last Post: 9th April 2009, 11:21
  2. Deploy Qt application on Mac OS X
    By giandrea77 in forum Installation and Deployment
    Replies: 3
    Last Post: 11th February 2009, 10: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, 18: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, 17: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, 12: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.