PDA

View Full Version : one single project file for Qt/Qtopia Core/QPE



izico
27th March 2007, 14:47
I need to use different QT(CONFIG,etc) variables for Qt/Qtopia Core/QPE, sush as in Qt program I may not need QT+=network,but for Qtopia that is a must for qws's C/S architecture,how can I do it?

qmake/qtopiamake has no way to find which Qt version it is run for(Qt/Qtopia Core/QPE),but qmake/qtopiamake both use the directory.pro custom,how can I cope with this?

If there's no solution,I'd better to use Java ME but Qtopia,at least,Java ME is much more ubiqutous than Qtopia,though maybe a worse in performance.

jacek
27th March 2007, 23:31
If QMAKESPEC is set differently, you can try for example:
linux-g++ {
// ordinary Linux
}
linux-arm-g++ {
// embedded Linux
}
You can also have two .pro files (one for qmake and one for qtopiamake) and place the common part in a .pri file.

izico
28th March 2007, 08:31
1. QMAKESPEC

This' not a solution,but it may fake to solve when few platforms to be build.

For confidence of the portability of my program and possible market condition,I compile and test run my application on these platforms(all on Linux OS):
1) amd64 - Qt X11
2) x86 - Qtopia Core
3) x86 - QPE
4) arm - Qtopia Core
5) arm - QPE

mkspecs can differentiate between CPU,OS,compiler,but it has no way to know if this is a Qtopia Core/QPE compile,and as my build for Qtopia Core has few features and files than for QPE,it seems that there's no way to differentiate by the project file alone,there must be some other means.

2. different .pro for qmake/qtopiamake

as many .pro is just subdirs,and when it recurse down the tree,qmake and qtopiamake both use the directory.pro custom to find the .pro file to be used,am I right?how can I tell qmake/qtopiamake to use different .pro in this situation?

jacek
30th March 2007, 00:43
What happens when you process this .pro file with qtopiamake?
message($$QT_VERSION)
message($$CONFIG)
message($$DEFINES)
message($$QTOPIA_LICENSE)
message($$THEMES)
message($$PROJECTS)

izico
30th March 2007, 06:36
nothing

qtopiamake is just dumb about anything

it's simple to try yourself,the Greenphone SDK have x86 simulator,you need not to configure and compile Qtopia source code for 2 hours to try qtopiamake's hell.

qtopiamake is just a perl wrapper on qmake,but i don't know perl to hack it(should we hack a commercial product for our application purpose?)

qtopiamake is really a damn hell,anybody have idea to use other build system for Qtopia?

For Qtopia's sake,i change my build system from CMake to qmake,and now qtopiamake still gives me a lot headache,I must do a lot nasty things to make my program build on both Qt/QPE.I nearly lose trust on Trolltech's QPE,and my program have no any progress for 20 days after its Qt version roughly runs.

lpotter
8th April 2007, 04:24
Exactly what are any error messages you are seeing?

As was said, qtopiamake is just a wrapper for setting up qmake, you will see output from qmake when it is run the first time you run 'make'.

jacek
8th April 2007, 15:06
Exactly what are any error messages you are seeing?
There are no errors. The problem is how to detect that the .pro file is being used to generate a Makefile for Qtopia, not the ordinary Qt.

burkav84
17th May 2007, 16:53
maybe you should try to write a script, which will compose a .pro file for different Qt platforms. for example:
we have qt_profile, qtopiacore_profile, qtopia_profile.

then in order to platform script will select needed file and make:
cat needed_file > project.pro

then run qmake/qtopiamake. or make several scripts for each platform

abhishek
27th June 2007, 08:27
I need to use different QT(CONFIG,etc) variables for Qt/Qtopia Core/QPE, sush as in Qt program I may not need QT+=network,but for Qtopia that is a must for qws's C/S architecture,how can I do it?

qmake/qtopiamake has no way to find which Qt version it is run for(Qt/Qtopia Core/QPE),but qmake/qtopiamake both use the directory.pro custom,how can I cope with this?

If there's no solution,I'd better to use Java ME but Qtopia,at least,Java ME is much more ubiqutous than Qtopia,though maybe a worse in performance.


I Think i am facing the same kind of problem you have wrote. I am using Qtopia 2.2, so i cannot using Qt ver. 4.2. i have to move to old version of Qt.
i mean in any project, i can use Qtopia ver. 2.2 with the compatible Qt ver., i cannot use higher ver. of Qt. am i right ?
:)
byee.