PDA

View Full Version : Guide to building apps?



whaleyboy
23rd February 2010, 10:01
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 :)

high_flyer
23rd February 2010, 10:08
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?

whaleyboy
23rd February 2010, 10:48
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.

high_flyer
23rd February 2010, 10:54
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.

whaleyboy
23rd February 2010, 11:47
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.

high_flyer
23rd February 2010, 12:25
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

whaleyboy
23rd February 2010, 12:50
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! :)

qt_gotcha
7th May 2010, 16:22
about distribution, check out the NSIS project (google for NSIS)

p3l-outrepid
8th May 2010, 15:05
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.