Results 1 to 9 of 9

Thread: Guide to building apps?

  1. #1
    Join Date
    Feb 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Guide to building apps?

    Hi all, I'm just starting out in Qt and am finding the hardest part to get my head around is building the programs I write into a stand-alone application I can run on other systems. Is there a newbie guide to building and deploying applications in Qt anyone can recommend? Or would anyone be so kind as to write a quick guide to help newbies gets there heads around this. I'm running Qt Creator 1.3.1 for winidows and currently only need to be able to deploy to another windows machine, although in the future I will trying to get an app onto my N900...but that can wait

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Guide to building apps?

    I write into a stand-alone application I can run on other systems.
    I am not sure what you mean by that.
    It is impossible to distribute binaries across platforms(C++) (same binary to run on various platforms)
    You can either compile a binary for each intended target system, or distribute your code, so that users can compile on their system.

    Was that what you meant in your question?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    whaleyboy (23rd February 2010)

  4. #3
    Join Date
    Feb 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Guide to building apps?

    Sorry, didn't make myself very clear there. What I mean by 'different systems' is other PC's running windows. I want to be able to distribute either a single .exe or an installer with all the needed files required to run my program. It's the step that turns the code that I have in Qt Creator into a distributable application that is the confusing part for me.

  5. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Guide to building apps?

    Did you read this?
    http://doc.trolltech.com/4.6/deployment-windows.html
    If so, what exactly is that you don't understand there, so that we can explain that part.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  6. #5
    Join Date
    Feb 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Guide to building apps?

    I have tried going through that article, but have run into some issues. I'll go through it again and post the errors I get.

    First up it says go to the command prompt and type "configure -static" (it says static is the easiest way to distribute, so I'll try that). When I type that it comes up with:

    "Unable to detect the platform from environment. Use -platform command lineargument or set the QMAKESPEC environment variable and run configure again"

    I've tried adding "-platform win32" to the end of the configure statement but it says that is not a valid argument.

  7. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Guide to building apps?

    If your are compiling with MSVC then:
    -platform win32-msvc

    I can't remember for sure the mingw flag if the below is wrong search it up on the forum:

    -platform win32-mingw
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  8. The following user says thank you to high_flyer for this useful post:

    whaleyboy (23rd February 2010)

  9. #7
    Join Date
    Feb 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Guide to building apps?

    Ok I did a quick search and it seems "configure -static -platform -mingw-g++" is the way to go. I'll let ya know if there are further hurdles!

  10. #8
    Join Date
    Jul 2009
    Posts
    92
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Guide to building apps?

    about distribution, check out the NSIS project (google for NSIS)

  11. #9
    Join Date
    May 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Guide to building apps?

    I am sorry for the really retarded questions, but I have a few problems with the guide by trolltech forums.
    First of all, I used the configure -static command and it was over very fast (i thought these steps take a lot of time) but whatever. Then I tried to use the mingw32-make command but I don't understand what sub-src is. If someone can help me with those stupid questions, I'd be really grateful.

Similar Threads

  1. Installation Guide
    By messifanboy in forum Installation and Deployment
    Replies: 1
    Last Post: 10th October 2009, 07:06
  2. Which Linux distribution is best for building compatible apps?
    By Oxidative in forum Installation and Deployment
    Replies: 8
    Last Post: 9th July 2009, 16:13
  3. Replies: 0
    Last Post: 26th June 2009, 17:53
  4. anyone building/deploying Qt+Coin3d+SoQt apps with MinGW??
    By vonCZ in forum Installation and Deployment
    Replies: 0
    Last Post: 13th November 2008, 15:59
  5. Online guide
    By pshah.mumbai in forum Newbie
    Replies: 4
    Last Post: 1st October 2007, 18:11

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.