aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/qtextended_integration.h
blob: fe2bf5ad672c34b39f59b1d9277813ec8079fcc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/***************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact:  Qt Software Information (qt-info@nokia.com)
**
**
** Non-Open Source Usage
**
** Licensees may use this file in accordance with the Qt Beta Version
** License Agreement, Agreement version 2.2 provided with the Software or,
** alternatively, in accordance with the terms contained in a written
** agreement between you and Nokia.
**
** GNU General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the packaging
** of this file.  Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
**
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
** http://www.gnu.org/copyleft/gpl.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt GPL Exception
** version 1.3, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/

#ifndef QTEXTENDED_INTEGRATION
#define QTEXTENDED_INTEGRATION

// Enable support for QBuild style project parsing
//#define QTEXTENDED_QBUILD_SUPPORT

/*
This file is intended to be the 'communication channel' for Qt-Extended (aka Qtopia) integration issues.

*** The first step in the integration is to add support for QBuild to the IDE ***

QBuild is the build system used in Qt-Extended 4.4 and onwards. QBuild is a replacement for qmake+make.
The reasons for the replacement go a bit beyond this page, but in short:
- there's only one qbuild instance running v.s. MANY qmake instances.
- implements proper management of dependencies between files. Regardless of where you are in the source tree ... a 'make' will always result in all dependencies (that have changed) being rebuild in the correct sequence. This is something that was a major issue with Qt-Extended development in the past.
- solves many Qt-Extended build/deployment issues
- separates build logic (specific for Qt-Extended) from the script runner logic
- fully supports TeamBuilder and can trottle build, moc, and IO tasks differently.
- is fast!!!!

QBuild is a bootstrapping solution, i.e. the only thing you need to do to build Qt-Extended is:
  configure <options>
  make
  make image

Configure will build QBuild, and QBuild will produce very small Makefile's that basically re-direct all make calls back to QBuild. The configuration options are saved in a cache file that is read by QBuild upon any invocation.

Within QBuild, all pro files are named qbuild.pro and there's no need to create template pro files for "SUBDIRS". QBuild will always traverse through the complete source tree and will discover all 'real' projects.
QBuild .pro files are also different from QMake .pro files in that the first can contain scripting language that define the project specific logic.

So far one class has been modified:
- qt4project.cpp/h -> basically the mechanism to discover project files needs to be adapted to QBuild.
There's a bit of nastiness in the code that I'd like to see fixed, esp the ugly global boolean, but I'm not familar enough with the code to do that properly.

How to use?
- You should get yourself a copy of //depot/qtopia/main (from the Brisbane p4.trolltech.com.au:866 server)
- The actual contents of Qtopia are irrelevant at this stage, i.e. you don't need to sync every day. We only use it as a sample of a large project containing qbuild stuff.
- hack the ~/depot/qtopia/main/qbuild.pro file and set "SUBDIRS=examples etc/themes" (we don't want too much stuff at this stage), i.e. make sure you're not scanning 'src' as well.
- build and run Qt Creator and make sure you have your Qt Creator IDE as the FIRST open project (or whatever you use for testing)
- then do a project "Open Project/Session" on ~/depot/qtopia/main/qbuild.pro

What you should get is the usual IDE project tree and then a second one below with the Qtopia stuff.
The Qtopia tree however doesn't show much projects: just the base and then examples.pro and themes.pro (and this depends on these old files still lying around in the depot).

To activate Qbuild support:
- Compile Qt Creator with QTEXTENDED_QBUILD_SUPPORT defined (see top of this file)
- rebuild and run Qt Creator

What you should get is the usual IDE project tree and then a second one below with the Qtopia stuff but this time with approx 15 qbuild.pro projects.
Issues:
* Every project file is still named 'qbuild.pro', I hacked ProFile::ProFile() to set m_displayFileName to the base dir name when it's a qbuild.pro file (i.e. src/applications/addressbook/qbuild.pro should become 'addressbook' instead of'qbuild.pro'), but that doesn't seem to work. Also ProFile is a copy from Qt? so I can't really modify it.
* The tree is (obviously) not showing much depth. This is because there are no .pro files in directories such as src/examples. So what we would need is a way to create virtual projects or something similar.
Any suggestions how to fix this?

*** Future steps ***
- running configure, make, make image
- defining configuration options (i.e. supporting multiple shadow builds)
- running QtExtended on qvfb
- debugging QtExtended on qvfb
- running QtExtended on a device
- debugging QtExtended on a device
- and probably more

*/

#endif