Skip to content

Commit

Permalink
Merge remote branch 'upstream/master' into expression-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jul 1, 2011
2 parents d954421 + 4d75a7d commit 8cddfb8
Show file tree
Hide file tree
Showing 422 changed files with 9,892 additions and 5,356 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -213,7 +213,7 @@ IF (PEDANTIC)
ADD_DEFINITIONS( /wd4610 ) # user defined constructor required (sqlite3_index_info)
ADD_DEFINITIONS( /wd4706 ) # assignment within conditional expression (pal)
ELSE (MSVC)
ADD_DEFINITIONS( -Wall -Wno-long-long -Wformat-security -Wno-strict-aliasing )
ADD_DEFINITIONS( -Wall -Wextra -Wredundant-decls -Wno-long-long -Wformat-security -Wno-strict-aliasing )
# Qt produces lots of warnings with strict aliasing (as of Qt 4.4.0 & GCC 4.3)
# ADD_DEFINITIONS( -fstrict-aliasing -Wstrict-aliasing=1 )
ENDIF (MSVC)
Expand Down
6 changes: 3 additions & 3 deletions CODING
Expand Up @@ -596,10 +596,10 @@ easily, and help us deal with the patches that are sent to use easily.

If the patch is a fix for a specific bug, please name the file with the bug
number in it e.g. bug777fix.patch, and attach it to the original bug report
in trac (https://trac.osgeo.org/qgis/).
in trac (http://hub.qgis.org/projects/quantum-gis).

If the bug is an enhancement or new feature, its usually a good idea to create
a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you
a ticket in trac (http://hub.qgis.org/projects/quantum-gis) first and then attach you


2.7.2. Create your patch in the top level QGIS source dir
Expand Down Expand Up @@ -868,7 +868,7 @@ test before fixing the bug will let you automate the testing for bug
resolution in an efficient manner.

To implement your regression test, you should follow the naming convention of
regression<TicketID> for your test functions. If no trac ticket exists for the
regression<TicketID> for your test functions. If no redmine ticket exists for the
regression, you should create one first. Using this approach allows the person
running a failed regression test easily go and find out more information.

Expand Down
48 changes: 20 additions & 28 deletions INSTALL
@@ -1,10 +1,10 @@
Quantum GIS (QGIS)
Building QGIS from source - step by step
Sunday May 29, 2011
Sunday June 12, 2011


Last Updated: Sunday May 29, 2011
Last Change : Friday May 20, 2011
Last Updated: Sunday June 12, 2011
Last Change : Sunday June 05, 2011


1. Introduction
Expand All @@ -27,7 +27,7 @@ Last Change : Friday May 20, 2011
5.1. Install Qt4 from disk image
5.2. Install development frameworks for QGIS dependencies
5.3. Install CMake for OSX
5.4. Download QGIS source from github
5.4. QGIS source
5.5. Configure the build
5.6. Building
6. Authors and Acknowledgments
Expand Down Expand Up @@ -235,26 +235,12 @@ if you do not have edit privileges for the QGIS source repository, or use
1. Anonymous Checkout

cd ${HOME}/dev/cpp
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis
git clone git://github.com/qgis/Quantum-GIS.git

2. Developer Checkout

cd ${HOME}/dev/cpp
svn co --username <yourusername> https://svn.osgeo.org/qgis/trunk/qgis qgis

The first time you check out the source you will be prompted to accept the
qgis.org certificate. Press 'p' to accept it permanently:

Error validating server certificate for 'https://svn.qgis.org:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually! Certificate
information:
- Hostname: svn.qgis.org
- Valid: from Apr 1 00:30:47 2006 GMT until Mar 21 00:30:47 2008 GMT
- Issuer: Developer Team, Quantum GIS, Anchorage, Alaska, US
- Fingerprint:
2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b (R)eject,
accept (t)emporarily or accept (p)ermanently?
git clone git@github.com:qgis/Quantum-GIS.git


3.7. Starting the compile
Expand All @@ -269,9 +255,9 @@ development version. I suggest you do something similar:

Now we create a build directory and run ccmake:

cd qgis
mkdir build
cd build
cd Quantum-GIS
mkdir build-master
cd build-master
ccmake ..

When you run ccmake (note the .. is required!), a menu will appear where
Expand Down Expand Up @@ -451,7 +437,7 @@ leave the folder
========================================

Before downloading and compile GRASS source code you need to install a few
other libraries and programs. We can do this trough apt
other libraries and programs. We can do this through apt

sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \
tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 autotools-dev \
Expand All @@ -461,7 +447,7 @@ other libraries and programs. We can do this trough apt
tk8.4-dev tk8.4 libfftw3-dev libfftw3-3

At this point we can get the GRASS source code: you may want to download it
trough svn or maybe you want just to download the latest available source code arquive.
through svn or maybe you want just to download the latest available source code arquive.
For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz

Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
Expand Down Expand Up @@ -1496,10 +1482,16 @@ tarball, then cd to the source folder and:
sudo make install


5.4. Download QGIS source from github
=====================================
5.4. QGIS source
================

Unzip the QGIS source tarball to a working folder of your choice
(/usr/somewhere is not a good choice as it's hidden and requires root
privileges). If you are reading this from the source, you've already done
this.

Go to the github QGIS project page:
If you want to experiment with the latest development sources, go to the github
QGIS project page:

http://github.com/qgis/Quantum-GIS

Expand Down
174 changes: 171 additions & 3 deletions doc/CODING.t2t
Expand Up @@ -575,10 +575,10 @@ easily, and help us deal with the patches that are sent to use easily.

If the patch is a fix for a specific bug, please name the file with the bug
number in it e.g. **bug777fix.patch**, and attach it to the original bug report
in trac (https://trac.osgeo.org/qgis/).
in trac (http://hub.qgis.org/projects/quantum-gis).

If the bug is an enhancement or new feature, its usually a good idea to create
a ticket in trac (https://trac.osgeo.org/qgis/) first and then attach you
a ticket in trac (http://hub.qgis.org/projects/quantum-gis) first and then attach you

=== Create your patch in the top level QGIS source dir ===

Expand Down Expand Up @@ -854,7 +854,7 @@ test **before** fixing the bug will let you automate the testing for bug
resolution in an efficient manner.

To implement your regression test, you should follow the naming convention of
regression<TicketID> for your test functions. If no trac ticket exists for the
regression<TicketID> for your test functions. If no redmine ticket exists for the
regression, you should create one first. Using this approach allows the person
running a failed regression test easily go and find out more information.

Expand Down Expand Up @@ -1220,6 +1220,174 @@ CMakeLists.txt parts) are still being worked on so that the testing framework
works in a truly platform way. I will update this document as things
progress.


= Getting up and running with QtCreator and QGIS =

QtCreator is a newish IDE from the makers of the Qt library. With QtCreator you
can build any C++ project, but it's really optimised for people working on
Qt(4) based applications (including mobile apps). Everything I describe below
assumes you are running Ubuntu 11.04 'Natty'.


== Installing QtCreator ==

This part is easy:

```
sudo apt-get install qtcreator qtcreator-doc
```

After installing you should find it in your gnome menu.


== Setting up your project ==

I'm assuming you have already got a local Quantum-GIS clone containing the
source code, and have installed all needed build dependencies etc. There are
detailed in instructions on doing that here:

http://github.com/qgis/Quantum-GIS/blob/master/CODING


On my system I have checked out the code into $HOME/dev/cpp/Quantum-GIS and the
rest of the article is written assuming that, you should update these paths as
appropriate for your local system.

On launching QtCreator do:

```
File->Open File or Project
```

Then use the resulting file selection dialog to browse to and open this file:

```
$HOME/dev/cpp/Quantum-GIS/CMakeLists.txt
```

[images/image01.jpeg]

Next you will be prompted for a build location. I create a specific build dir
for QtCreator to work in under:

```
$HOME/dev/cpp/Quantum-GIS/build-master-qtcreator
```

Its probably a good idea to create separate build directories for different
branches if you can afford the disk space.

[images/image02.jpeg]


Next you will be asked if you have any CMake build options to pass to CMake. We
will tell CMake that we want a debug build by adding this option:

```
-DCMAKE_BUILD_TYPE=Debug
```

[images/image03.jpeg]

Thats the basics of it. When you complete the Wizard, QtCreator will start
scanning the source tree for autocompletion support and do some other
housekeeping stuff in the background. We want to tweak a few things before we
start to build though.



== Setting up your build environment ==

Click on the 'Projects' icon on the left of the QtCreator window.

[images/image04.jpeg]

Select the build settings tab (normally active by default).

[images/image05.jpeg]

We now want to add a custom process step. Why? Because QGIS can currently only
run from an install directory, not its build directory, so we need to ensure
that it is installed whenever we build it. Under 'Build Steps', click on the
'Add Build Step' combo button and choose 'Custom Process Step'.

[images/image06.jpeg]

Now we set the following details:

```
Enable custom process step [yes]
Command: make
Working directory: $HOME/dev/cpp/Quantum-GIS/build-master-qtcreator
Command arguments: install
```

[images/image07.jpeg]

You are almost ready to build. Just one note: QtCreator will need write
permissions on the install prefix. By default (which I am using here) QGIS is
going to get installed to /usr/local. For my purposes on my development
machine, I just gave myself write permissions to the /usr/local directory.

To start the build, click that big hammer icon on the bottom left of the
window.

[images/image08.jpeg]

== Setting your run environment ==

As mentioned above, we cannot run QGIS from directly in the build directly, so
we need to create a custom run target to tell QtCreator to run QGIS from the
install dir (in my case /usr/local/). To do that, return to the projects
configuration screen.

[images/image04.jpeg]

Now select the 'Run Settings' tab

[images/image09.jpeg]

We need to update the default run settings from using the 'qgis' run
configuration to using a custom one.

[images/image10.jpeg]

Do do that, click the 'Add v' combo button next to the **Run** configuration
combo and choose 'Custom Executable' from the top of the list.

[images/image11.jpeg]

Now in the properties area set the following details:

```
Executable: /usr/local/bin/qgis
Arguments :
Working directory: $HOME
Run in terminal: [no]
Debugger: C++ [yes]
Qml [no]
```

Then click the 'Rename' button and give your custom executable a meaning full
name e.g. 'Installed QGIS'

[images/image12.jpeg]


== Running and debugging ==


Now you are ready to run and debug QGIS. To set a break point, simply open a
source file and click in the left column.

[images/image14.jpeg]

Now launch QGIS under the debugger by clicking the icon with a bug on it in the
bottom left of the window.

[images/image13.jpeg]


= HIG (Human Interface Guidelines) =

In order for all graphical user interface elements to appear consistant and to
Expand Down

0 comments on commit 8cddfb8

Please sign in to comment.