Skip to content
Permalink
Browse files

Merge remote branch 'pb/master'

Conflicts:
	src/plugins/roadgraph/linevectorlayerdirector.cpp
  • Loading branch information
Sergey Yakushevs
Sergey Yakushevs committed Oct 4, 2011
2 parents 87c6742 + 3f70d32 commit 52a30097fa88ce08aa5b1ba40a7d93a4bd68ff1f
Showing 1,082 changed files with 101,876 additions and 26,152 deletions.
@@ -12,7 +12,7 @@ debian/*.substvars
Makefile
*-stamp
api_doc
build
build*
ms-windows/Installer-Files/postinstall.bat
ms-windows/Installer-Files/preremove.bat
ms-windows/osgeo4w/packages/
@@ -37,3 +37,5 @@ scripts/astyle.exe
doc/CODING.html
doc/CODING.tex
doc/INSTALL.tex
scripts/Debug
scripts/RelWithDebInfo
2,123 CHANGELOG

Large diffs are not rendered by default.

@@ -18,8 +18,8 @@ MESSAGE(STATUS "Quantum GIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS
#############################################################
# CMake settings

# 2.6 required for QtWebkit
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# 2.6.2 required for VERSION_LESS
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)

SET(CMAKE_COLOR_MAKEFILE ON)

@@ -76,6 +76,12 @@ IF (WITH_BINDINGS)
SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
ENDIF (WITH_BINDINGS)

SET (WITH_GLOBE FALSE CACHE BOOL "Determines whether Globe plugin should be built")
IF (WITH_GLOBE)
SET(QT_USE_QTOPENGL 1)
FIND_PACKAGE(OSGEARTH REQUIRED)
ENDIF (WITH_GLOBE)

# Compile flag. Make it possible to turn it off.
SET (PEDANTIC TRUE CACHE BOOL "Determines if we should compile in pedantic mode.")

@@ -213,7 +219,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)
@@ -269,16 +275,20 @@ ELSE (WIN32)

IF (APPLE)
# for Mac OS X, everything is put inside an application bundle
# save the root install prefix for the app later
SET (QGIS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
SET (QGIS_MACAPP_PREFIX ${CMAKE_INSTALL_PREFIX}/${QGIS_APP_NAME}.app/Contents)
# common prefix for components, let cmake handle it
SET (CMAKE_INSTALL_PREFIX ${QGIS_MACAPP_PREFIX}/MacOS)
# path for library references
SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib)
# 4 bundling levels, each includes previous
# 0 nothing
# 1 Qt frameworks
# 2 non-system libraries, "standard"
# 3 non-system frameworks, "standalone"
SET (QGIS_MACAPP_BUNDLE 0 CACHE STRING "What to bundle into app package")
SET (QGIS_MACAPP_BUNDLE 1 CACHE STRING "What to bundle into app package")
SET (QGIS_MACAPP_BUNDLE_USER "" CACHE STRING "Path to user bundling script")
SET (QGIS_MACAPP_INSTALL_DEV FALSE CACHE BOOL "Install developer frameworks")
SET (QGIS_MACAPP_DEV_PREFIX "/Library/Frameworks" CACHE STRING "Path to install developer frameworks")
# if we have @loader_path, >=OSX 10.5 (darwin 9+)
IF (CMAKE_SYSTEM_VERSION VERSION_GREATER 9.0.0 OR CMAKE_SYSTEM_VERSION VERSION_EQUAL 9.0.0)
SET (OSX_HAVE_LOADERPATH 1)
@@ -303,6 +313,8 @@ ELSE (WIN32)
SET (DEFAULT_PLUGIN_SUBDIR ../PlugIns/qgis)
SET (QGIS_PLUGIN_SUBDIR_REV ../../MacOS)
SET (DEFAULT_INCLUDE_SUBDIR include/qgis)
# path for framework references
SET (CMAKE_INSTALL_NAME_DIR @executable_path/${QGIS_FW_SUBDIR})

ELSE (APPLE)
# UNIX
@@ -366,13 +378,23 @@ SET (QGIS_DATA_DIR ${QGIS_DATA_SUBDIR})
SET (QGIS_PLUGIN_DIR ${QGIS_PLUGIN_SUBDIR})
SET (QGIS_INCLUDE_DIR ${QGIS_INCLUDE_SUBDIR})

# set the default locations where the targets (executables, libraries) will land when compiled
# this is to allow running qgis from the source tree without having to actually do a "make install"
SET (QGIS_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output)
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_BIN_SUBDIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIB_SUBDIR})

# write a marker with source directory path into the output's bin directory
# if run from the build directory QGIS will detect it and alter the paths
FILE(WRITE ${QGIS_OUTPUT_DIRECTORY}/${QGIS_BIN_SUBDIR}/source_path.txt "${CMAKE_SOURCE_DIR}")

# manual page - makes sense only on unix systems
IF (UNIX)
IF (UNIX AND NOT APPLE)
SET (DEFAULT_MANUAL_SUBDIR man)
SET (QGIS_MANUAL_SUBDIR ${DEFAULT_MANUAL_SUBDIR} CACHE STRING "Subdirectory where manual files will be installed")
MARK_AS_ADVANCED (QGIS_MANUAL_SUBDIR)
SET (QGIS_MANUAL_DIR ${CMAKE_INSTALL_PREFIX}/${QGIS_MANUAL_SUBDIR})
ENDIF (UNIX)
ENDIF (UNIX AND NOT APPLE)

#############################################################
# Python bindings
@@ -402,9 +424,9 @@ ENDIF (WITH_BINDINGS)

#############################################################
# create qgsconfig.h
# installed with app target

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake_templates/qgsconfig.h.in ${CMAKE_BINARY_DIR}/qgsconfig.h)
INSTALL(FILES ${CMAKE_BINARY_DIR}/qgsconfig.h DESTINATION ${QGIS_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})

# Added by Jef to prevent python core and gui libs linking to other qgisCore and qgisGui libs
@@ -427,18 +449,25 @@ IF (GIT_MARKER)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(MSVC)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${GIT} log -n1 --pretty=%h OUTPUT_VARIABLE REVISION
)
STRING(STRIP "${REVISION}" REVISION)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
COMMAND echo \\\#define QGSVERSION \\\"$$\( ${GIT} log -n1 --pretty=%h \)\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
COMMAND echo \\\#define QGSVERSION \\\"${REVISION}\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
MAIN_DEPENDENCY ${GIT_MARKER}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF(MSVC)
ELSE(GIT)
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
SET(REVISION "unknown")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"unknown\"")
ENDIF(GIT)
ELSE (GIT_MARKER)
SET(REVISION "exported")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"exported\"")
ENDIF (GIT_MARKER)

176 CODING
@@ -58,8 +58,14 @@ Developers guide for QGIS
3.4. The ADD_QGIS_TEST macro explained
3.5. Building your unit test
3.6. Run your tests
4. HIG (Human Interface Guidelines)
5. Authors
4. Getting up and running with QtCreator and QGIS
4.1. Installing QtCreator
4.2. Setting up your project
4.3. Setting up your build environment
4.4. Setting your run environment
4.5. Running and debugging
5. HIG (Human Interface Guidelines)
6. Authors


------------------------------------------------------------------------
@@ -596,10 +602,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
@@ -868,7 +874,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.

@@ -1208,7 +1214,163 @@ works in a truly platform way. I will update this document as things
progress.


4. HIG (Human Interface Guidelines)
4. 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'.


4.1. Installing QtCreator
=========================

This part is easy:

sudo apt-get install qtcreator qtcreator-doc

After installing you should find it in your gnome menu.


4.2. 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.


4.3. 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]


4.4. 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]


4.5. 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]


5. HIG (Human Interface Guidelines)
===================================

In order for all graphical user interface elements to appear consistant and to
@@ -1257,7 +1419,7 @@ guidelines are followed in layout and design of GUIs.
suffixed to the button text.


5. Authors
6. Authors
==========

- Tim Sutton (author and editor)

0 comments on commit 52a3009

Please sign in to comment.
You can’t perform that action at this time.