[QGIS Commit] r12269 - docs/trunk/english_us/coding-compilation_guide

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Nov 27 11:35:01 EST 2009


Author: dassau
Date: 2009-11-27 11:35:00 -0500 (Fri, 27 Nov 2009)
New Revision: 12269

Modified:
   docs/trunk/english_us/coding-compilation_guide/coding-compilation_guide.tex
   docs/trunk/english_us/coding-compilation_guide/coding.tex
   docs/trunk/english_us/coding-compilation_guide/creating_pyqgis_applications.tex
   docs/trunk/english_us/coding-compilation_guide/install.tex
   docs/trunk/english_us/coding-compilation_guide/qgis_style.sty
   docs/trunk/english_us/coding-compilation_guide/title.tex
Log:
updated coding and compilation guide (ready to release)


Modified: docs/trunk/english_us/coding-compilation_guide/coding-compilation_guide.tex
===================================================================
--- docs/trunk/english_us/coding-compilation_guide/coding-compilation_guide.tex	2009-11-27 14:58:29 UTC (rev 12268)
+++ docs/trunk/english_us/coding-compilation_guide/coding-compilation_guide.tex	2009-11-27 16:35:00 UTC (rev 12269)
@@ -22,7 +22,7 @@
 \include{coding}
 \include{appendices/gpl}
 \include{appendices/qgis_qt_gpl_exception}
-\include{literature}
+%\include{literature}
 
 \begin{htmlonly}
         \input{qgis_style.tex}

Modified: docs/trunk/english_us/coding-compilation_guide/coding.tex
===================================================================
--- docs/trunk/english_us/coding-compilation_guide/coding.tex	2009-11-27 14:58:29 UTC (rev 12268)
+++ docs/trunk/english_us/coding-compilation_guide/coding.tex	2009-11-27 16:35:00 UTC (rev 12269)
@@ -8,7 +8,7 @@
 
 The following chapters provide coding information for QGIS Version \CURRENT.
 This document corresponds almost to a \LaTeX~ conversion of the CODING.t2t
-file coming with the QGIS sources from August, 24th 2009.
+file coming with the QGIS sources from November, 27th 2009.
 
 These standards should be followed by all QGIS developers.
 
@@ -65,17 +65,13 @@
   QgsUserOptionsBase
 \end{verbatim}
 \subsubsection{Dialogs}
-
 All dialogs should implement the following:
+ * Tooltip help for all toolbar icons and other relevant widgets
+ * WhatsThis help for \textbf{all} widgets on the dialog
+ * An optional (though highly recommended) context sensitive \textit{Help} button
+   that directs the user to the appropriate help page by launching their web
+   browser
 
-\begin{itemize}
-\item Tooltip help for all toolbar icons and other relevant widgets
-\item WhatsThis help for \textbf{all} widgets on the dialog
-\item An optional (though highly recommended) context sensitive \textit{Help}
-button that directs the user to the appropriate help page by launching their web 
-browser
-\end{itemize}
-
 \subsection{C++ Files}
 \subsubsection{Names}
 C++ implementation and header files should be have a .cpp and .h extension
@@ -88,7 +84,7 @@
     qgsfeatureattribute.cpp and qgsfeatureattribute.h
 \end{verbatim}
 
-\textbf{Note:} in case it is not clear from the statement above, for a filename 
+/!$\backslash$ \textbf{Note:} in case it is not clear from the statement above, for a filename 
 to match a class name it implicitly means that each class should be declared 
 and implemented in its own file. This makes it much easier for newcomers to 
 identify where the code is relating to specific class.
@@ -309,15 +305,17 @@
 
 \subsubsection{Book recommendations}
 \begin{itemize}
-\item \htmladdnormallink{Effective C++}{http://www.awprofessional.com/title/0321334876}, Scott Meyers
-\item \htmladdnormallink{More Effective C++}{http://www.awprofessional.com/bookstore/product.asp?isbn=020163371X&rl=1}, Scott Meyers
-\item \htmladdnormallink{Effective STL}{http://www.awprofessional.com/title/0201749629}, Scott Meyers
-\item \htmladdnormallink{Design Patterns}{http://www.awprofessional.com/title/0201634988}, GoF
+\item \url{http://www.awprofessional.com/title/0321334876}, Scott Meyers
+\item \url{http://www.awprofessional.com/bookstore/product.asp?isbn=020163371X&rl=1}, Scott Meyers
+\item \url{http://www.awprofessional.com/title/0201749629}, Scott Meyers
+\item \url{http://www.awprofessional.com/title/0201634988}, GoF
 \end{itemize}
 
+
 You should also really read this article from Qt Quarterly on 
-\htmladdnormallink{http://doc.trolltech.com/qq/qq13-apis.html designing Qt style}{APIs}
+\url{http://doc.trolltech.com/qq/qq13-apis.html}
 
+
 \section{SVN Access}
 This page describes how to get started using the QGIS Subversion repository
 
@@ -350,10 +348,10 @@
   svn co https://svn.osgeo.org/qgis/trunk/qgis qgis_trunk
 \end{verbatim}
 
-\textbf{Note:} If you are behind a proxy server, edit your \~{}/subversion/servers
+/!$\backslash$ \textbf{Note:} If you are behind a proxy server, edit your \~{}/subversion/servers
 file to specify your proxy settings first!
 
-\textbf{Note:} In QGIS we keep our most stable code in the version 1\_0 branch.
+/!$\backslash$ \textbf{Note:} In QGIS we keep our most stable code in the version 1\_0 branch.
 Trunk contains code for the so called 'unstable' release series. Periodically
 we will tag a release off trunk, and then continue stabilisation and selective
 incorporation of new features into trunk.
@@ -371,8 +369,8 @@
 You can also take a look at DocumentationWritersCorner for more information.
 
 \subsection{SVN Documentation}
+The repository is organized as follows:
 
-The repository is organized as shown in:
 \url{http://wiki.qgis.org/images/repo.png}
 
 See the Subversion book \url{http://svnbook.red-bean.com} for information on becoming
@@ -398,19 +396,15 @@
 technical advisor of the project steering committee (PSC). If the new feature
 requires any changes to the QGIS architecture, a request for comment (RFC) is
 needed. 
-
 \item \textbf{Create a branch:} 
 Create a new svn branch for the development of the new feature (see
 UsingSubversion for the svn syntax). Now you can start developing.
-
 \item \textbf{Merge from trunk regularly:}
 It is recommended to merge the changes in trunk to the branch on a regular
 basis. This makes it easier to merge the branch back to trunk later.
-
 \item \textbf{Documentation on wiki:} 
 It is also recommended to document the intended changes and the current status
 of the work on a wiki page.
-
 \item \textbf{Testing before merging back to trunk:} 
 When you are finished with the new feature and happy with the stability, make
 an announcement on the developer list.  Before merging back, the changes will
@@ -418,7 +412,6 @@
 Windows) will be generated to also involve non-developers. In trac, a new
 Component will be opened to file tickets against.  Once there are no remaining
 issues left, the technical advisor of the PSC merges the changes into trunk.
-
 \end{itemize}
 
 
@@ -435,7 +428,7 @@
 \subsubsection{Merge regularly from trunk to branch}
 When working in a branch you should regularly merge trunk into it so that your
 branch does not diverge more than necessary. In the top level dir of your
-branch, first type \texttt{svn info} to determine the revision numbers of your
+branch, first type \texttt{`svn info`} to determine the revision numbers of your
 branch which will produce output something like this:
 
 \begin{verbatim}
@@ -447,7 +440,7 @@
 Revisao: 6546
 Tipo de No: diretorio
 Agendado: normal
-Autor da Ultima Mudança: timlinux
+Autor da Ultima Mudanca: timlinux
 Revisao da Ultima Mudanca: 6495
 Data da Ultima Mudanca: 2007-02-02 09:29:47 -0200 (Sex, 02 Fev 2007)
 Propriedades da Ultima Mudanca: 2007-01-09 11:32:55 -0200 (Ter, 09 Jan 2007)
@@ -475,7 +468,7 @@
 
 \subsubsection{Patch file naming}
 If the patch is a fix for a specific bug, please name the file with the bug
-number in it e.g. \textbf{bug777fix.diff}, and attach it to the original bug report
+number in it e.g.  \textbf{bug777fix.diff}, and attach it to the original bug report
 in trac (\url{https://trac.osgeo.org/qgis/}).
 
 If the bug is an enhancement or new feature, its usually a good idea to create
@@ -867,10 +860,9 @@
 
 The above init function illustrates a couple of interesting things.
 
-\begin{enumerate}
-\item I needed to manually set the QGIS application data path so that
+ 1. I needed to manually set the QGIS application data path so that
    resources such as srs.db can be found properly.
-\item Secondly, this is a data driven test so we needed to provide a 
+ 2. Secondly, this is a data driven test so we needed to provide a 
    way to generically locate the 'tenbytenraster.asc file. This was 
    achieved by using the compiler define \textbf{TEST\_DATA\_PATH}. The 
    define is created in the CMakeLists.txt configuration file under 
@@ -879,7 +871,6 @@
    under $<$QGIS Source Root$>$/tests/testdata. You should only commit 
    very small datasets here. If your test needs to modify the test 
    data, it should make a copy of if first.
-\end{enumerate}
 
 Qt also provides some other interesting mechanisms for data driven 
 testing, so if you are interested to know more on the topic, consult 
@@ -950,28 +941,47 @@
 \subsection{Adding your unit test to CMakeLists.txt}
 Adding your unit test to the build system is simply a matter of editing the
 CMakeLists.txt in the test directory, cloning one of the existing test blocks,
-and then search and replacing your test class name into it.  For example:
+and then replacing your test class name into it.  For example:
 
 \begin{verbatim}
-#
 # QgsRasterLayer test
-#
-SET(qgis_rasterlayertest_SRCS testqgsrasterlayer.cpp)
-SET(qgis_rasterlayertest_MOC_CPPS testqgsrasterlayer.cpp)
-QT4_WRAP_CPP(qgis_rasterlayertest_MOC_SRCS ${qgis_rasterlayertest_MOC_CPPS})
-ADD_CUSTOM_TARGET(qgis_rasterlayertestmoc ALL DEPENDS ${qgis_rasterlayertest_MOC_SRCS})
-ADD_EXECUTABLE(qgis_rasterlayertest ${qgis_rasterlayertest_SRCS})
-ADD_DEPENDENCIES(qgis_rasterlayertest qgis_rasterlayertestmoc)
-TARGET_LINK_LIBRARIES(qgis_rasterlayertest ${QT_LIBRARIES} qgis_core)
-INSTALL(TARGETS qgis_rasterlayertest RUNTIME DESTINATION ${QGIS_BIN_DIR})
-ADD_TEST(qgis_rasterlayertest ${QGIS_BIN_DIR}/qgis_rasterlayertest)
+ADD_QGIS_TEST(rasterlayertest testqgsrasterlayer.cpp)
 \end{verbatim}
 
+\subsection{The ADD\_QGIS\_TEST macro explained}
 I'll run through these lines briefly to explain what they do, but if you are
-not interested, just clone the block, search and replace e.g.
+not interested, just do the step explained in the above section and section.
 
 \begin{verbatim}
-:'<,'>s/rasterlayer/mynewtest/g
+MACRO (ADD_QGIS_TEST testname testsrc)
+  SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS})
+  SET(qgis_${testname}_MOC_CPPS ${testsrc})
+  QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS})
+  ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS})
+  ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS})
+  ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc)
+  TARGET_LINK_LIBRARIES(qgis_${testname} ${QT_LIBRARIES} qgis_core)
+  SET_TARGET_PROPERTIES(qgis_${testname}
+    PROPERTIES
+    # skip the full RPATH for the build tree
+    SKIP_BUILD_RPATH  TRUE
+    # when building, use the install RPATH already
+    # (so it doesn't need to relink when installing)
+    BUILD_WITH_INSTALL_RPATH TRUE
+    # the RPATH to be used when installing
+    INSTALL_RPATH ${QGIS_LIB_DIR}
+    # add the automatically determined parts of the RPATH
+    # which point to directories outside the build tree to the install RPATH
+    INSTALL_RPATH_USE_LINK_PATH true)
+  IF (APPLE)
+    # For Mac OS X, the executable must be at the root of the bundle's executable folder
+    INSTALL(TARGETS qgis_${testname} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
+    ADD_TEST(qgis_${testname} ${CMAKE_INSTALL_PREFIX}/qgis_${testname})
+  ELSE (APPLE)
+    INSTALL(TARGETS qgis_${testname} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+    ADD_TEST(qgis_${testname} ${CMAKE_INSTALL_PREFIX}/bin/qgis_${testname})
+  ENDIF (APPLE)
+ENDMACRO (ADD_QGIS_TEST)
 \end{verbatim}
 
 Lets look a little more in detail at the individual lines. First we define the
@@ -980,16 +990,16 @@
 same file) its a simple statement:
 
 \begin{verbatim}
-SET(qgis_rasterlayertest_SRCS testqgsrasterlayer.cpp)
+SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS})
 \end{verbatim}
 
 Since our test class needs to be run through the Qt meta object compiler (moc)
 we need to provide a couple of lines to make that happen too:
 
 \begin{verbatim}
-SET(qgis_rasterlayertest_MOC_CPPS testqgsrasterlayer.cpp)
-QT4_WRAP_CPP(qgis_rasterlayertest_MOC_SRCS ${qgis_rasterlayertest_MOC_CPPS})
-ADD_CUSTOM_TARGET(qgis_rasterlayertestmoc ALL DEPENDS ${qgis_rasterlayertest_MOC_SRCS})
+SET(qgis_${testname}_MOC_CPPS ${testsrc})
+QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS})
+ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS})
 \end{verbatim}
 
 Next we tell cmake that it must make an executeable from the test class.
@@ -999,8 +1009,8 @@
 executeable:
 
 \begin{verbatim}
-ADD_EXECUTABLE(qgis_rasterlayertest ${qgis_rasterlayertest_SRCS})
-ADD_DEPENDENCIES(qgis_rasterlayertest qgis_rasterlayertestmoc)
+ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS})
+ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc)
 \end{verbatim}
 
 Next we need to specify any library dependencies. At the moment classes have
@@ -1010,45 +1020,54 @@
 required by your unit test.
 
 \begin{verbatim}
-TARGET_LINK_LIBRARIES(qgis_rasterlayertest ${QT_LIBRARIES} qgis_core)
+TARGET_LINK_LIBRARIES(qgis_${testname} ${QT_LIBRARIES} qgis_core)
 \end{verbatim}
 
-Next I tell cmake to the same place as the qgis binaries itself. This is
-something I plan to remove in the future so that the tests can run directly
-from inside the source tree.
+Next I tell cmake to install the tests to the same place as the qgis binaries
+itself. This is something I plan to remove in the future so that the tests can
+run directly from inside the source tree.
 
 \begin{verbatim}
-INSTALL(TARGETS qgis_rasterlayertest RUNTIME DESTINATION ${QGIS_BIN_DIR})
+SET_TARGET_PROPERTIES(qgis_${testname}
+  PROPERTIES
+  # skip the full RPATH for the build tree
+  SKIP_BUILD_RPATH  TRUE
+  # when building, use the install RPATH already
+  # (so it doesn't need to relink when installing)
+  BUILD_WITH_INSTALL_RPATH TRUE
+  # the RPATH to be used when installing
+  INSTALL_RPATH ${QGIS_LIB_DIR}
+  # add the automatically determined parts of the RPATH
+  # which point to directories outside the build tree to the install RPATH
+  INSTALL_RPATH_USE_LINK_PATH true)
+IF (APPLE)
+  # For Mac OS X, the executable must be at the root of the bundle's executable folder
+  INSTALL(TARGETS qgis_${testname} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
+  ADD_TEST(qgis_${testname} ${CMAKE_INSTALL_PREFIX}/qgis_${testname})
+ELSE (APPLE)
+  INSTALL(TARGETS qgis_${testname} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+  ADD_TEST(qgis_${testname} ${CMAKE_INSTALL_PREFIX}/bin/qgis_${testname})
+ENDIF (APPLE)
 \end{verbatim}
 
-Finally here is where the best magic happens - we register the class with
-ctest. If you recall in the overview I gave in the beginning of this section we
-are using both QtTest and CTest together. To recap, \textbf{QtTest} adds a main
-method to your test unit and handles calling your test methods within the
-class. It also provides some macros like QVERIFY that you can use as to test
-for failure of the tests using conditions. The output from a QtTest unit test
-is an executeable which you can run from the command line.  However when you
-have a suite of tests and you want to run each executeable in turn, and
-better yet integrate running tests into the build process, the \textbf{CTest} is
-what we use. The next line registers the unit test with CMake / CTest.
+Finally the above uses ADD\_TEST to register the test with cmake / ctest . Here
+is where the best magic happens - we register the class with ctest. If you
+recall in the overview I gave in the beginning of this section we are using
+both QtTest and CTest together. To recap, \textbf{QtTest} adds a main method to your
+test unit and handles calling your test methods within the class. It also
+provides some macros like QVERIFY that you can use as to test for failure of
+the tests using conditions. The output from a QtTest unit test is an
+executeable which you can run from the command line.  However when you have a
+suite of tests and you want to run each executeable in turn, and better yet
+integrate running tests into the build process, the \textbf{CTest} is what we use. 
 
-\begin{verbatim}
-ADD_TEST(qgis_rasterlayertest ${QGIS_BIN_DIR}/qgis_rasterlayertest)
-\end{verbatim}
-
-The last thing I should add is that if your test requires optional parts of the
-build process (e.g. Postgresql support, GSL libs, GRASS etc.), you should take
-care to enclose you test block inside a IF () block in the CMakeLists.txt file.
-
 \subsection{Building your unit test}
 To build the unit test you need only to make sure that ENABLE\_TESTS=true in the
 cmake configuration. There are two ways to do this:
 
-\begin{enumerate}
-\item Run ccmake .. (cmakesetup .. under windows) and interactively set 
+ 1. Run ccmake .. (cmakesetup .. under windows) and interactively set 
  the ENABLE\_TESTS flag to ON.
-\item Add a command line flag to cmake e.g. cmake -DENABLE\_TESTS=true ..
-\end{enumerate}
+ 1. Add a command line flag to cmake e.g. cmake -DENABLE\_TESTS=true ..
 
 Other than that, just build QGIS as per normal and the tests should build too.
 
@@ -1106,8 +1125,8 @@
   User DB PATH: /Users/tim/.qgis/qgis.db
   QDEBUG : TestQgsApplication::checkTheme() Checking if a theme icon exists:
   QDEBUG : TestQgsApplication::checkTheme() 
-  /Users/tim/dev/cpp/qgis/build/tests/src/core/..//share/qgis/themes/\
-  default//mIconProjectionDisabled.png
+  /Users/tim/dev/cpp/qgis/build/tests/src/core/\
+  ..//share/qgis/themes/default//mIconProjectionDisabled.png
   FAIL!  : TestQgsApplication::checkTheme() '!myPixmap.isNull()' returned FALSE. ()
   Loc: [/Users/tim/dev/cpp/qgis/tests/src/core/testqgsapplication.cpp(59)]
 PASS   : TestQgsApplication::cleanupTestCase()
@@ -1131,7 +1150,6 @@
 works in a truly platform way. I will update this document as things
 progress.
 
-
 \section{HIG (Human Interface Guidelines)}
 In order for all graphical user interface elements to appear consistant and to
 all the user to instinctively use dialogs, it is important that the following
@@ -1148,7 +1166,7 @@
  \item Do not end labels for widgets or group boxes with a colon:
    Adding a colon causes visual noise and does not impart additional meaning,
    so dont use them. An exception to this rule is when you have two labels next
-   to each other e.g.: Label1 \htmladdnormallink{Plugin}{Path:} Label2 [/path/to/plugins]
+   to each other e.g.: Label1 \url{Plugin}{Path:} Label2 [/path/to/plugins]
  \item Keep harmful actions away from harmless ones:
    If you have actions for 'delete', 'remove' etc, try to impose adequate space
    between the harmful action and innocuous actions so that the users is less
@@ -1158,4 +1176,3 @@
    buttons is consistent with the operating system / locale / desktop
    environment that the user is using.
  \end{enumerate}
-

Modified: docs/trunk/english_us/coding-compilation_guide/creating_pyqgis_applications.tex
===================================================================
--- docs/trunk/english_us/coding-compilation_guide/creating_pyqgis_applications.tex	2009-11-27 14:58:29 UTC (rev 12268)
+++ docs/trunk/english_us/coding-compilation_guide/creating_pyqgis_applications.tex	2009-11-27 16:35:00 UTC (rev 12269)
@@ -133,21 +133,29 @@
 44 
 45     # Create the actions for our tools and connect each to the appropriate
 46     # method
-47     self.actionAddLayer = QAction(QIcon("(qgis_prefix + "/share/qgis/themes/classic/mActionAddLayer.png"),
-48     \
+47     self.actionAddLayer = QAction(QIcon("(qgis_prefix + \
+       "/share/qgis/themes/classic/mActionAddLayer.png"),
+48
 49         "Add Layer", self.frame)
 50     self.connect(self.actionAddLayer, SIGNAL("activated()"), self.addLayer)
-51     self.actionZoomIn = QAction(QIcon("(qgis_prefix + "/share/qgis/themes/classic/mActionZoomIn.png"), \
-52         "Zoom In", self.frame)
+51     self.actionZoomIn = QAction(QIcon("(qgis_prefix + \
+       "/share/qgis/themes/classic/mActionZoomIn.png"), \
+       "Zoom In", self.frame)
+52     
 53     self.connect(self.actionZoomIn, SIGNAL("activated()"), self.zoomIn)
-54     self.actionZoomOut = QAction(QIcon("(qgis_prefix + "/share/qgis/themes/classic/mActionZoomOut.png"), \
+54     self.actionZoomOut = QAction(QIcon("(qgis_prefix + \
+       "/share/qgis/themes/classic/mActionZoomOut.png"), \
 55         "Zoom Out", self.frame)
 56     self.connect(self.actionZoomOut, SIGNAL("activated()"), self.zoomOut)
-57     self.actionPan = QAction(QIcon("(qgis_prefix + "/share/qgis/themes/classic/mActionPan.png"), \
-58         "Pan", self.frame)
+57     self.actionPan = QAction(QIcon("(qgis_prefix + \
+       "/share/qgis/themes/classic/mActionPan.png"), \
+       "Pan", self.frame)
+58
 59     self.connect(self.actionPan, SIGNAL("activated()"), self.pan)
-60     self.actionZoomFull = QAction(QIcon("(qgis_prefix + "/share/qgis/themes/classic/mActionZoomFullExtent.png"), \
-61         "Zoom Full Extent", self.frame)
+60     self.actionZoomFull = QAction(QIcon("(qgis_prefix + \
+       "/share/qgis/themes/classic/mActionZoomFullExtent.png"), \
+       "Zoom Full Extent", self.frame)
+61
 62     self.connect(self.actionZoomFull, SIGNAL("activated()"),
 63     self.zoomFull)
 64 

Modified: docs/trunk/english_us/coding-compilation_guide/install.tex
===================================================================
--- docs/trunk/english_us/coding-compilation_guide/install.tex	2009-11-27 14:58:29 UTC (rev 12268)
+++ docs/trunk/english_us/coding-compilation_guide/install.tex	2009-11-27 16:35:00 UTC (rev 12269)
@@ -8,19 +8,21 @@
 
 The following chapters provide build and installation information for QGIS
 Version \CURRENT. This document corresponds almost to a \LaTeX~ conversion of
-the INSTALL.t2t file coming with the QGIS sources from August, 24th 2009.
+the INSTALL.t2t file coming with the QGIS sources from November, 27th 2009.
 
 A current version is also available at the wiki, see:
 \url{http://www.qgis.org/wiki/Installation_Guide}
 
 \section{General Build Notes}
 Since version 0.8.1 QGIS no longer uses the autotools for building. QGIS, like a
-number of major projects (eg. KDE 4.0), now uses CMake (\url{http://www.cmake.org})
+number of major projects (eg. KDE 4.0), now uses CMake (\url {http://www.cmake.org}{http://www.cmake.org})
 for building from source. The configure script in this directory simply checks
 for the existence of cmake and provides some clues to build QGIS.
 
+For complete information, see the wiki at:
+\url{http://wiki.qgis.org/qgiswiki/Building\_with\_CMake}
+
 \subsection{An overview of the dependencies required for building}
-
 \textbf{Required build deps:}
 \begin{itemize}
 \item CMake $>$= 2.4.3
@@ -46,13 +48,11 @@
 \item for PyQGIS - SIP $>$= 4.5, PyQt $>$= must match Qt version
 \end{itemize}
 
-
 \textbf{Recommended runtime deps:}
 \begin{itemize}
 \item for gps plugin - gpsbabel
 \end{itemize}
 
-
 \section{Building under windows using msys}
 \textbf{Note:} For a detailed account of building all the dependencies yourself you 
 can visit Marco Pasetti's website here:
@@ -67,7 +67,8 @@
 
 Get this: 
 
-\url{http://download.osgeo.org/qgis/win32/msys.zip}
+\url {http://download.osgeo.org/qgis/win32/msys.zip}
+
 and unpack to c:$\backslash$msys
 
 If you wish to prepare your msys environment yourself rather than using 
@@ -78,7 +79,7 @@
 Download qt4.3 opensource precompiled edition exe and install (including the
 download and install of mingw) from here:
 
-\htmladdnormallink{http://www.trolltech.com/developer/downloads/qt/windows}{http://www.trolltech.com/developer/downloads/qt/windows}
+\url{http://qt.nokia.com/downloads}
 
 When the installer will ask for MinGW, you don't need to download and install
 it, just point the installer to c:$\backslash$msys$\backslash$mingw
@@ -108,11 +109,12 @@
 \end{verbatim}
 
 \subsection{Flex and Bison}
-*** Note I think this section can be removed as it should be installed int the
+
+\textbf{Note}:  I think this section can be removed as it should be installed int the
 msys image already. TS
 
 Get Flex
-\url{http://sourceforge.net/project/showfiles.php?group\_id=23617\&package\_id=16424}
+\url{http://sourceforge.net/project/showfiles.php?group\_id=23617&package\_id=16424}
 (the zip bin) and extract it into c:$\backslash$msys$\backslash$mingw$\backslash$bin
 
 \subsection{Python stuff: (optional)}
@@ -123,7 +125,7 @@
 \subsubsection{Download and install Python - use Windows installer}
 (It doesn't matter to what folder you'll install it)
 
-\htmladdnormallink{http://python.org/download/}{http://python.org/download/}
+\url{http://python.org/download/}
 
 \subsubsection{Download SIP and PyQt4 sources}
 \url{http://www.riverbankcomputing.com/software/sip/download} \\
@@ -149,19 +151,19 @@
 \end{verbatim}
 
 \subsubsection{Final python notes}
-/!$\backslash$ You can delete the directories with unpacked SIP and PyQt4 sources after a
+\textbf{Note}:  You can delete the directories with unpacked SIP and PyQt4 sources after a
 successfull install, they're not needed anymore.
 
 \subsection{Subversion:}
 In order to check out QGIS sources from the repository, you need Subversion
 client. This installer should work fine:
 
-\htmladdnormallink{http://subversion.tigris.org/files/documents/15/36797/svn-1.4.3-setup.exe}{http://subversion.tigris.org/files/documents/15/36797/svn-1.4.3-setup.exe}
+\url{http://subversion.tigris.org/files/documents/15/36797/svn-1.4.3-setup.exe}
 
 \subsection{CMake:}
 CMake is build system used by Quantum GIS. Download it from here:
 
-\htmladdnormallink{http://www.cmake.org/files/v2.4/cmake-2.4.6-win32-x86.exe}{http://www.cmake.org/files/v2.4/cmake-2.4.6-win32-x86.exe}
+\url{http://www.cmake.org/files/v2.4/cmake-2.4.6-win32-x86.exe}
 
 \subsection{QGIS:}
 Start a cmd.exe window ( Start -$>$ Run -$>$ cmd.exe ) Create development 
@@ -209,7 +211,7 @@
 cmakesetup ..  
 \end{verbatim}
 
-/!$\backslash$ NOTE: You must include the '..' above.
+\textbf{Note}:   NOTE: You must include the '..' above.
 
 Click 'Configure' button.  When asked, you should choose 'MinGW Makefiles'
 as generator.
@@ -237,7 +239,7 @@
 about missing libraries when started.
 
 The best way to do this is to download both the QGIS current release installer
-package from \htmladdnormallink{http://qgis.org/uploadfiles/testbuilds/}{http://qgis.org/uploadfiles/testbuilds/} and install it. Now copy
+package from \url{http://qgis.org/uploadfiles/testbuilds/} and install it. Now copy
 the installation dir from C:$\backslash$Program Files$\backslash$Quantum GIS into c:$\backslash$Program
 Files$\backslash$qgis-0.8.1 (or whatever the current version is. The name should strictly
 match the version no.) After making this copy you can uninstall the release
@@ -250,7 +252,7 @@
 used from that place.
 
 \subsection{Create the installation package: (optional)}
-Downlad and install NSIS from (\htmladdnormallink{http://nsis.sourceforge.net/Main\_Page}{http://nsis.sourceforge.net/Main\_Page})
+Downlad and install NSIS from (\url{http://nsis.sourceforge.net/Main\_Page})
 
 Now using windows explorer, enter the win\_build directory in your QGIS source
 tree. Read the READMEfile there and follow the instructions. Next right click
@@ -261,13 +263,19 @@
 In this approach I will try to avoid as much as possible building dependencies
 from source and rather use frameworks wherever possible.
 
-Included are a few notes for building on Mac OS X 10.5 (\underline{Leopard}).
+Included are a few notes for building on Mac OS X 10.5 (\underline{Leopard}) and 10.6 
+(\underline{Snow Leopard}). 
 
+\underline{Snow Leopard note:} A cmake/qt/sip bug currently exists where a 32-bit
+cmake build fails to provide python bindings. This means that python plugin support
+is currently lacking for 32-bit builds using cmake in Snow Leopard. See the Xcode
+build method to if you require python support.
+
 \subsection{Install XCODE}
 I recommend to get the latest xcode dmg from the Apple XDC Web site. Install
 XCODE after the \~{}1gb download is complete.
 
-/!$\backslash$ Note: It may be that you need to create some symlinks after installing 
+\textbf{Note}:   Note: It may be that you need to create some symlinks after installing 
 the XCODE SDK (in particular if you are using XCODE 2.5 on tiger):
 
 \begin{verbatim}
@@ -277,48 +285,38 @@
 \end{verbatim}
 
 \subsection{Install Qt4 from .dmg}
-You need a minimum of Qt4.3.0. I suggest getting the latest (at time of writing).
+You need a minimum of Qt-4.3.0. I suggest getting the latest.
 
-\begin{verbatim}
-ftp://ftp.trolltech.com/qt/source/
-\end{verbatim}
+\underline{Snow Leopard note:} If you are building on Snow Leopard, you will need to
+decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
+support in the Qt Cocoa branch. Appropriate installers are available for both
+as of Qt-4.5.2, and the release candidate of Qt-4.6.0-cocoa works fairly well
+with Qgis as tested with nightly snapshots of sip and pyqt.
 
-Mac versions are named as:
-
 \begin{verbatim}
-qt-mac-opensource-x.y.z.dmg
+http://qt.nokia.com/downloads
 \end{verbatim}
 
-x, y, z being the major, minor and revision version.
-
-If you want debug frameworks, Qt also provide a dmg with these.  These are in
+If you want debug frameworks, Qt also provides a dmg with these.  These are in
 addition to the non-debug frameworks.
 
 Once downloaded open the dmg and run the installer. Note you need admin
 privileges to install.
 
-After installing you need to make two small changes:
+\underline{Qt 4.4+ note:} Starting in Qt 4.4 (?) libQtCLucene was added, and in 4.5 libQtUiTools was added, both in /usr/lib.  When using a system SDK (which will happen in the Xcode build), these libraries will not be found.  To fix this problem, add symlinks to /usr/local:
 
-First edit \texttt{/Library/Frameworks/QtCore.framework/Headers/qconfig.h} and
-change 
-
-/!$\backslash$ Note: this isn't needed since version 4.2.3
-
-\texttt{QT\_EDITION\_Unknown} to \texttt{QT\_EDITION\_OPENSOURCE}
-
-Second change the default mkspec symlink so that it points to macx-g++:
-
 \begin{verbatim}
-cd /usr/local/Qt4.3/mkspecs/ 
-sudo rm default 
-sudo ln -sf macx-g++ default
+sudo ln -s /usr/lib/libQtUiTools.a /usr/local/lib/
+sudo ln -s /usr/lib/libQtCLucene.dylib /usr/local/lib/
 \end{verbatim}
 
-/!$\backslash$ Note: this doesn't seem to be needed since version 4.4.
+These should then be found automatically on Leopard and above.  Earlier systems
+may need some help by adding '-L/usr/local/lib' to CMAKE\_SHARED\_LINKER\_FLAGS,
+CMAKE\_MODULE\_LINKER\_FLAGS and CMAKE\_EXE\_LINKER\_FLAGS in the cmake build, or
+adding '/usr/local/lib' to LIBRARY\_SEARCH\_PATHS in the Xcode build.
 
 \subsection{Install development frameworks for QGIS dependencies}
-Download William Kyngesburye's excellent all in one framework that includes
-proj, gdal, sqlite3 etc
+Download William Kyngesburye's excellent GDAL Complete package that includes PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks.
 
 \begin{verbatim}
 http://www.kyngchaos.com/wiki/software:frameworks
@@ -326,8 +324,10 @@
 
 Once downloaded, open and install the frameworks.
 
-William provides an additional installer package for Postgresql/PostGIS. It's
-available here:
+William provides an additional installer package for Postgresql (for PostGIS support).
+Qgis just needs the libpq client library, so unless you want to setup the full
+Postgres + PostGIS server, all you need is the client-only package.
+It's available here:
 
 \begin{verbatim}
 http://www.kyngchaos.com/wiki/software:postgres 
@@ -339,8 +339,14 @@
 http://www.kyngchaos.com/wiki/software:grass
 \end{verbatim}
 
-There are some additional dependencies that at the time of writing are not
+\subsubsection{Additional Dependencies : General compatibility note}
+There are some additional dependencies that, at the time of writing, are not
 provided as frameworks or installers so we will need to build these from source.
+If you are wanting to build Qgis as a 64-bit application, you will need to 
+provide the appropriate build commands to produce 64-bit support in dependencies.
+Likewise, for 32-bit support on Snow Leopard, you will need to override the
+default system architecture, which is 64-bit, according to instructions for
+individual dependency packages.
 
 \subsubsection{Additional Dependencies : GSL}
 Retrieve the current version of the Gnu Scientific Library from:
@@ -350,46 +356,67 @@
 \end{verbatim}
 
 Then extract it and build it to a prefix of /usr/local.  Double-click the source
-tarball to unpack it, then cd to the source folder and:
+tarball to unpack it, then, in Terminal.app, cd to the source folder and:
 
 \begin{verbatim}
-/configure
+./configure
 make
 sudo make install
 \end{verbatim}
 
+\underline{Snow Leopard note:} Snow Leopard compiles 64bit by default.
+For explicit 32-bit support in gsl, substitute the standard configure line with:
+
+\begin{verbatim}
+./configure CFLAGS="-Os -arch i386"
+\end{verbatim}
+
 \subsubsection{Additional Dependencies : Expat}
+\underline{Snow Leopard note:} Snow Leopard includes a usable expat, so this step is 
+not necessary on Snow Leopard.
+
 Get the expat sources:
 
 \begin{verbatim}
 http://sourceforge.net/project/showfiles.php?group_id=10127 
 \end{verbatim}
 
-Double-click the source tarball to unpack, then cd to the source folder and:
+Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and:
 
 \begin{verbatim}
-/configure
+./configure
 make 
 sudo make install 
 \end{verbatim}
 
-\subsubsection{Additional Dependencies : SIP}
-Make sure you have the latest Python 2.5 fom 
+\underline{Leopard note:} To compile for 64bit, substitute the standard configure line with:
 
 \begin{verbatim}
-http://www.python.org/download/mac/
+./configure CFLAGS="-Os -arch x86_64"
 \end{verbatim}
 
-\underline{Leopard note:} Leopard includes a usable Python 2.5.  Though you can install Python from python.org if preferred.
+\subsubsection{Additional Dependencies : Python}
+\underline{Leopard and Snow Leopard note:} Leopard and Snow Leopard include a usable
+Python 2.5 and 2.6, respectively. So there is no need to install Python on
+Leopard and Snow Leopard You can still install Python from python.org if preferred.
 
+Make sure you install at least the latest Python 2.5 from 
+
+\begin{verbatim}
+http://www.python.org/download/
+\end{verbatim}
+
+Python 3 is a major change, and may have compatibility issues, so try it at your own risk.
+
+\subsubsection{Additional Dependencies : SIP}
 Retrieve the python bindings toolkit SIP from
 
 \begin{verbatim}
 http://www.riverbankcomputing.com/software/sip/download
 \end{verbatim}
 
-Double-click the source tarball to unpack it, then cd to the source folder
-and (this installs by default into the Python framework):
+Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder
+and (this installs by default into the Python framework, and is appropriate only for python.org Python installs):
 
 \begin{verbatim}
 python configure.py 
@@ -399,30 +426,43 @@
 
 \underline{Leopard notes}
 
-If building on Leopard, using Leopard's bundled Python, SIP wants to install in the system path -- this is not a good idea.  Use this configure command instead of the basic configure above:
+If building on Leopard, using Leopard's bundled Python, SIP wants to install in the
+system path -- this is not a good idea.  Use this configure command instead of the 
+basic configure above:
 
 \begin{verbatim}
-python configure.py -d /Library/Python/2.5/site-packages -b \
-/usr/local/bin -e /usr/local/include -v /usr/local/share/sip
+python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin \
+-e /usr/local/include -v /usr/local/share/sip
 \end{verbatim}
 
-\subsubsection{Additional Dependencies : PyQt}
-If you encounter problems compiling PyQt using the instructions 
-below you can also try adding python from your frameworks dir
-explicitly to your path e.g.
+\underline{Snow Leopard notes}
 
+Similar to Leopard, you should install outside the system Python path.
+Also, you need to specify the architecture you want (requires at least SIP 4.9),
+and make sure to run the versioned python binary (this one responds to the
+'arch' command, 'python' does not). If you are using 32-bit Qt (Qt Carbon):
+
 \begin{verbatim}
-export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
+python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin \
+-e /usr/local/include -v /usr/local/share/sip --arch=i386
 \end{verbatim}
 
+For 64-bit Qt (Qt Cocoa), use this configure line:
+
+\begin{verbatim}
+python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin \
+-e /usr/local/include -v /usr/local/share/sip --arch=x86_64
+\end{verbatim}
+
+\subsubsection{Additional Dependencies : PyQt}
 Retrieve the python bindings toolkit for Qt from
 
 \begin{verbatim}
 http://www.riverbankcomputing.com/software/pyqt/download
 \end{verbatim}
 
-Double-click the source tarball to unpack it, then cd to the source folder
-and (this installs by default into the Python framework):
+Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder
+and (this installs by default into the Python framework, and is appropriate only for python.org Python installs):
 
 \begin{verbatim}
 export QTDIR=/Developer/Applications/Qt
@@ -434,7 +474,9 @@
 
 \underline{Leopard notes}
 
-If building on Leopard, using Leopard's bundled Python, PyQt wants to install in the system path -- this is not a good idea.  Use this configure command instead of the basic configure above:
+If building on Leopard, using Leopard's bundled Python, PyQt wants to install
+in the system path -- this is not a good idea.  Use this configure command
+instead of the basic configure above:
 
 \begin{verbatim}
 python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
@@ -444,21 +486,41 @@
 QtOpenGL/makefile and add -undefined dynamic\_lookup to LFLAGS.
 Then make again.
 
+\underline{Snow Leopard notes}
+
+Similar to Leopard, you should install outside the system Python path.
+Also, you need to specify the architecture you want (requires at least PyQt 4.6),
+and make sure to run the versioned python binary (this one responds to the
+'arch' command, which is important for pyuic4, 'python' does not).
+If you are using 32-bit Qt (Qt Carbon):
+
+\begin{verbatim}
+python2.6 configure.py -d /Library/Python/2.6/site-packages \
+-b /usr/local/bin --use-arch i386
+\end{verbatim}
+
+For 64-bit Qt (Qt Cocoa), use this configure line:
+
+\begin{verbatim}
+python2.6 configure.py -d /Library/Python/2.6/site-packages \
+-b /usr/local/bin --use-arch x86_64
+\end{verbatim}
+
 \subsubsection{Additional Dependencies : Bison}
-\underline{Leopard note:} Leopard includes Bison 2.3, so this step can be skipped on Leopard.
+\underline{Leopard and Snow Leopard note:} Leopard and Snow Leopard include Bison 2.3, so this step can be skipped on Leopard and Snow Leopard.
 
-The version of bison available by default on Mac OSX is too old so you need to
+The version of bison available by default on Mac OS X 10.4 and older is too old so you need to
 get a more recent one on your system. Download at least version 2.3 from:
 
 \begin{verbatim}
 ftp.gnu.org/gnu/bison/
 \end{verbatim}
 
-Now build and install it to a prefix of /usr/local.Ê Double-click the source
+Now build and install it to a prefix of /usr/local. Double-click the source
 tarball to unpack it, then cd to the source folder and:
 
 \begin{verbatim}
-/configure --prefix=/usr/local 
+./configure --prefix=/usr/local 
 make
 sudo make install 
 \end{verbatim}
@@ -472,19 +534,20 @@
 
 Binary installers are available for OS X, but they are not recommended
 (2.4 versions install in /usr instead of /usr/local, and 2.6 versions are a
-strange application).Ê Download the source.Ê Double-click the source tarball,
+strange application). Instead, download the source, double-click the source tarball,
 then cd to the source folder and:
 
 \begin{verbatim}
-/bootstrap --docdir=/share/doc/CMake --mandir=/share/man
+./bootstrap --docdir=/share/doc/CMake --mandir=/share/man
 make
 sudo make install
 \end{verbatim}
 
 \subsection{Install subversion for OSX}
-\underline{Leopard note:} Leopard includes SVN, so this step can be skipped on Leopard.
+\underline{Leopard and Snow Leopard note:} Leopard and Snow Leopard (Xcode 3+)
+include SVN, so this step can be skipped on Leopard and Snow Leopard.
 
-The \htmladdnormallink{http://sourceforge.net/projects/macsvn/}{MacSVN} project has a downloadable
+The [\url{http://sourceforge.net/projects/macsvn/MacSVN}] project has a downloadable
 build of svn. If you are a GUI inclined person you may want to grab their gui
 client too. Get the command line client here:
 
@@ -495,7 +558,7 @@
 Once downloaded open the zip file and run the installer.
 
 You also need to install BerkleyDB available from the same
-\htmladdnormallink{http://sourceforge.net/projects/macsvn/}{website}. At the time of writing the
+\url {http://sourceforge.net/projects/macsvn/}{website}. At the time of writing the
 file was here:
 
 \begin{verbatim}
@@ -525,7 +588,7 @@
 
 \subsection{Check out QGIS from SVN}
 Now we are going to check out the sources for QGIS. First we will create a
-directory for working in:
+directory for working in (or some folder of your choice):
 
 \begin{verbatim}
 mkdir -p ~/dev/cpp cd ~/dev/cpp 
@@ -562,46 +625,35 @@
 I suggest you press 'p' to accept the key permanently.
 
 \subsection{Configure the build}
-There are 2 different methods to build QGIS.Ê The traditional Cmake method,
+There are 2 different methods to build QGIS: the traditional Cmake method,
 and the new Xcode project (starting with QGIS 1.1). The Xcode project has
-additional bundling steps, though some optional QGIS features are required due
-to limited conditional compilation.Ê The Cmake build handles optional features,
+additional bundling steps, though some optional Qgis features must be explicitly
+stated in a user configuration file. The Cmake build handles optional features,
 and some bundling steps are available with scripts in the mac directory.
 
 \subsubsection{Configure the Cmake build}
 CMake supports out of source build so we will create a 'build' dir for the
-build process. By convention I build my software into a dir called 'apps' in
-my home directory. If you have the correct permissions you may want to build
+build process. OS X uses \$\{HOME\}/Applications as a standard user app folder (it gives it the system app folder icon).
+If you have the correct permissions you may want to build
 straight into your /Applications folder. The instructions below assume you are
-building into a pre-existing \$\{HOME\}/apps directory ...
+building into a pre-existing \$\{HOME\}/Applications directory ...
 
 \begin{verbatim}
 cd qgis
 mkdir build
 cd build
-cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ -D CMAKE_BUILD_TYPE=Release ..
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release ..
 \end{verbatim}
 
-\underline{Leopard note:} To find the custom install of SIP on Leopard, add ""-
-D SIP\_BINARY\_PATH=/usr/local/bin/sip"" to the cmake command above,
-before the .. at the end, ie:
-
-\begin{verbatim}
-cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ -D CMAKE_BUILD_TYPE=Release -
-D SIP_BINARY_PATH=/usr/local/bin/sip ..
-\end{verbatim}
-
 To use the application build of GRASS on OSX, you can optionally use the
 following cmake invocation (minimum GRASS 6.3 required, substitute the GRASS
 version as required):
 
 \begin{verbatim}
-cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
-      -D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/
-      include \
-      -D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
-      -D CMAKE_BUILD_TYPE=Release \
-      ..
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
+-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
+..
 \end{verbatim}
 
 Or, to use a Unix-style build of GRASS, use the following cmake invocation
@@ -609,24 +661,65 @@
 path and version as required):
 
 \begin{verbatim}
-cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
-  -D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
-  -D GRASS_PREFIX=/user/local/grass-6.4.0 \
-  -D CMAKE_BUILD_TYPE=Release \
-  ..
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
+-D GRASS_PREFIX=/user/local/grass-6.4.0 \
+..
 \end{verbatim}
 
+\underline{Leopard note:} To find the custom install of SIP on Leopard, add
+'-D SIP\_BINARY\_PATH=/usr/local/bin/sip' to the cmake commands above,
+before the '..' at the end, ie:
+
+\begin{verbatim}
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D SIP_BINARY_PATH=/usr/local/bin/sip \
+..
+\end{verbatim}
+
+\underline{Snow Leopard note:} To handle the appropriate version of Qt (32-bit or 64-bit), you will need to invoke cmake based on which version of Qt you installed.  Also, SIP/PyQt detection will fail for 32bit because Python runs 64bit.
+
+For 32-bit Qt (Carbon) with GRASS-6.4, create a 32bit python script and add arch flags to the configuration:
+
+\begin{verbatim}
+sudo cat >/usr/local/bin/python32 <<EOF
+#!/bin/sh
+exec arch -i386 /usr/bin/python2.6 \${1+"\$@"}
+EOF
+
+sudo chmod +x /usr/local/bin/python32
+
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D SIP_BINARY_PATH=/usr/local/bin/sip \
+-D CMAKE_CXX_FLAGS="-arch i386" -D CMAKE_OSX_ARCHITECTURES=i386 \
+-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
+-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
+-D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
+..
+\end{verbatim}
+
+For 64-bit Qt (Cocoa) with GRASS-6.4:
+
+\begin{verbatim}
+cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
+-D SIP_BINARY_PATH=/usr/local/bin/sip \
+-D CMAKE_CXX_FLAGS="-arch x86_64" -D CMAKE_OSX_ARCHITECTURES=x86_64 \
+-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
+-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
+..
+\end{verbatim}
+
 \subsubsection{Configure the Xcode build}
 In the mac/xcode folder in the source, duplicate the 'qgis\_user-template.xcconfig'
-file and name it 'qgis\_user.xcconfig'.Ê A default build will use the KyngChaos
-frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 and extra dependencies
-as described above, and compile for the build OSX version, so no extra configuration
-is necessary. If building on Leopard, you may want to use the system Python, which
-requires editing qgis\_user.xcconfig.
+file and name it 'qgis\_user.xcconfig'. A default build will use the KyngChaos
+frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 (for Tiger)
+or the system Python (for Leopard and Snow Leopard) and extra dependencies
+as described above, and compile for the current OSX architecture and version, so no
+extra configuration is necessary.
 
 See the mac/xcode/readme.rtf for details, if you need to customize the build.
 The default build will also bundle the Qt frameworks, Postgres library, and
-other dependency libraries to create a self-contained package.Ê The KyngChaos
+other dependency libraries to create a self-contained package. The KyngChaos
 frameworks and GRASS application are not bundled.
 
 \subsection{Building}
@@ -640,17 +733,32 @@
 If all built without errors you can then install it:
 
 \begin{verbatim}
-sudo make install 
+make install 
 \end{verbatim}
 
+or, for a Unix-style build
+
+\begin{verbatim}
+sudo make install
+\end{verbatim}
+
 \subsubsection{Building with Xcode}
-Open the xcode project file in Xcode.Ê Select 'Release' build configuration
-and select the 'Full Qgis' target, then build.
+Open the Xcode project file in the mac/xcode directory. Select 'Release' build
+configuration and select the 'Full Qgis' target, then build. If you use ccache,
+there have been compilation problems reported, so it is suggested that you disable
+ccache support.
 
-The Qgis application will be found in the 'build/Release' folder in the xcode folder.
-Copy this to whereever you like.
+Alternatively, from within the mac/xcode directory, build with the command:
 
+\begin{verbatim}
+xcodebuild
+\end{verbatim}
 
+The Qgis application will be found in the 'build/\$SDKSYS/Release' folder
+in the xcode folder, where \$SDKSYS is the system you configured for in your
+qgis\_user.xcconfig. Copy this to whereever you like.
+
+
 \section{Building on GNU/Linux}
 \subsection{Building QGIS with Qt4.x}
 \textbf{Requires:} Ubuntu Hardy / Debian derived distro
@@ -692,7 +800,7 @@
 qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
 \end{verbatim}
 
-/!$\backslash$ \textbf{*A Special Note:*} If you are following this set of instructions on
+\textbf{Note}:   \textbf{*A Special Note:*} If you are following this set of instructions on
 a system where you already have Qt3 development tools installed, there will
 be a conflict between Qt3 tools and Qt4 tools. For example, qmake will
 point to the Qt3 version not the Qt4. Ubuntu Qt4 and Qt3 packages are
@@ -737,9 +845,9 @@
 python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
 \end{verbatim}
 
-/!$\backslash$ Debian users may have to use libgdal-dev above rather.
+\textbf{Note}:   Debian users should use libgdal-dev above rather
 
-/!$\backslash$ \textbf{*Note:*} For python language bindings SIP $>$= 4.5 and PyQt4 $>$= 4.1 is required! Some stable GNU/Linux
+\textbf{Note}:   \textbf{*Note:*} For python language bindings SIP $>$= 4.5 and PyQt4 $>$= 4.1 is required! Some stable GNU/Linux
 distributions (e.g. Debian or SuSE) only provide SIP $<$ 4.5 and PyQt4 $<$ 4.1. To include support for python 
 language bindings you may need to build and install those packages from source.
 
@@ -750,7 +858,7 @@
 \end{verbatim}
 
 \subsection{GRASS Specific Steps}
-\textbf{*Note:*} If you don't need to build with GRASS support,  you can
+\textbf{Note}:   \textbf{*Note:*} If you don't need to build with GRASS support,  you can
 skip this section.
 
 Now you can install grass from dapper:
@@ -759,7 +867,7 @@
 sudo apt-get install grass libgrass-dev libgdal1-1.4.0-grass 
 \end{verbatim}
 
-/!$\backslash$ You may need to explicitly state your grass version e.g. libgdal1-1.3.2-grass
+\textbf{Note}:   You may need to explicitly state your grass version e.g. libgdal1-1.3.2-grass
 
 \subsection{Setup ccache (Optional)}
 You should also setup ccache to speed up compile times:
@@ -819,7 +927,7 @@
 \end{verbatim}
 
 \subsection{Starting the compile}
-/!$\backslash$ \textbf{*Note:*} Skip to next section for a description of howto build debian packages
+\textbf{Note}:   \textbf{*Note:*} The next section describes howto build debian packages
 
 I compile my development version of QGIS into my \~{}/apps directory to avoid
 conflicts with Ubuntu packages that may be under /usr. This way for example
@@ -873,21 +981,17 @@
 The QGIS packages will be created with:
 
 \begin{verbatim}
-dpkg-buildpackage -us -us -b
+dpkg-buildpackage -us -uc -b
 \end{verbatim}
 
-/!$\backslash$ \textbf{*Note:*} If \texttt{dpkg-buildpackage} complains about unmet build dependencies
+\textbf{Note}: If \texttt{dpkg-buildpackage} complains about unmet build dependencies
 you can install them using \texttt{apt-get} and re-run the command.
 
-/!$\backslash$ \textbf{*Note:*} If you have \texttt{libqgis1-dev} installed, you need to remove it first
+\textbf{Note}: If you have \texttt{libqgis1-dev} installed, you need to remove it first
 using \texttt{dpkg -r libqgis1-dev}.  Otherwise \texttt{dpkg-buildpackage} will complain about a
 build conflict.
 
-/!$\backslash$ \textbf{*Note:*} There is a debian package build for GRASS support which needs 
-GRASS >= 6.4 (\texttt{grass} and \texttt{grass-dev}). Debian packages are available in 
-lenny-backports and squeeze.
-
-The packages are created in the parent directory (ie. one level up).
+The the packages are created in the parent directory (ie. one level up).
 Install them using dpkg.  E.g.:
 
 \begin{verbatim}
@@ -924,7 +1028,7 @@
 \end{verbatim}
 
 \subsubsection{Step 2: compile and install the ecw libraries}
-Go to the ERDAS web site \htmladdnormallink{http://www.erdas.com/}{http://www.erdas.com/} and follow the links
+Go to the ERDAS web site \url{http://www.erdas.com/} and follow the links
 "'''products --$>$ ECW JPEG2000 Codec SDK --$>$ downloads'''" 
 then download the "'''Image Compression SDK Source Code 3.3'''" (you'll need to make a registration 
 and accept a license).
@@ -940,8 +1044,18 @@
 Compile the code with the standard commands
 
 \begin{verbatim}
-/configure
+./configure
+\end{verbatim}
+
+then
+
+\begin{verbatim}
 make
+\end{verbatim}
+
+then
+
+\begin{verbatim}
 sudo make install
 \end{verbatim}
 
@@ -952,7 +1066,7 @@
 \end{verbatim}
 
 \subsubsection{Step 3: download the MrSID binaries}
-Go to the LIZARDTECH web site \htmladdnormallink{http://www.lizardtech.com/}{http://www.lizardtech.com/} and follow the links
+Go to the LIZARDTECH web site \url{http://www.lizardtech.com/} and follow the links
 "'''download --$>$ Developer SDKs'''", 
 then download the "'''GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'''"
 (you'll need to make a registration and accept a license).
@@ -982,20 +1096,20 @@
 and run configure with a few specific parameters
 
 \begin{verbatim}
-/configure --without-grass --with-mrsid=../Geo_DSDK-7.0.0.2167 --without-jp2mrsid
+./configure --without-grass --with-mrsid=../Geo_DSDK-7.0.0.2167 --without-jp2mrsid
 \end{verbatim}
 
 at the end of the configuration process you should read something like
 
 \begin{verbatim}
-..
+...
 GRASS support:             no
-..
-..
-..
+...
+...
+...
 ECW support:               yes
 MrSID support              yes			
-..
+...
 \end{verbatim}
 
 then compile normally
@@ -1039,23 +1153,23 @@
 
 \begin{verbatim}
 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 \
-libgdal1-dev proj libjpeg62-dev libpng12-dev libpq-dev unixodbc-dev doxygen \
-fakeroot cmake python-dev python-qt4-common python-qt4-dev python-sip4 \
-python2.5-dev sip4 libglew1.5-dev libxmu6 libqt4-dev libgsl0-dev python-qt4 \
-swig python-wxversion python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev \
+debhelper dpatch libtiff4-dev \
+tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev libfreetype6-dev autoconf2.13 \
+autotools-dev libgdal1-dev proj libjpeg62-dev libpng12-dev libpq-dev unixodbc-dev \
+doxygen fakeroot cmake python-dev python-qt4-common python-qt4-dev python-sip4 \
+python2.5-dev sip4 libglew1.5-dev libxmu6 libqt4-dev libgsl0-dev python-qt4 swig \
+python-wxversion python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev \
 tk8.4-dev tk8.4 libfftw3-dev libfftw3-3
 \end{verbatim}
 
 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.
-For example the GRASS 6.4rc4 is available at \htmladdnormallink{http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz}{http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz}
+For example the GRASS 6.4rc5 is available at \url{http://grass.itc.it/grass64/source/grass-6.4.0RC5.tar.gz}
 
 Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
 
 \begin{verbatim}
-/configure --with-tcltk-includes=/usr/include/tcl8.4 \
+./configure --with-tcltk-includes=/usr/include/tcl8.4 \
 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
 --with-python=/usr/bin/python2.5-config
 \end{verbatim}
@@ -1101,7 +1215,7 @@
 save and exit.
 
 Download the latest version of the gdal-grass library (gdal-grass-1.4.3.tar.gz) from
-\htmladdnormallink{http://download.osgeo.org/gdal/}{http://download.osgeo.org/gdal/}
+\url{http://download.osgeo.org/gdal/}
 
 uncompress the arquive and enter the newly created folder
 
@@ -1112,7 +1226,7 @@
 run configure
 
 \begin{verbatim}
-/configure --with-grass=/usr/local/grass-6.4.0RC4
+./configure --with-grass=/usr/local/grass-6.4.0RC4
 \end{verbatim}
 
 then as usual
@@ -1142,9 +1256,10 @@
 \subsubsection{Step 6: compile and install QGIS}
 As for GRASS you can obtain the QGIS source code from different sources,
 for instance from svn or just by downloading one of the source code arquives available
-at \htmladdnormallink{http://www.qgis.org/download/sources.html}{http://www.qgis.org/download/sources.html}
+at \url {http://www.qgis.org/download/sources.html}{http://www.qgis.org/download/sources.html}
 
-For example download the QGIS 1.1.0 source code here \htmladdnormallink{http://download.osgeo.org/qgis/src/qgis\_1.1.0.tar.gz}{http://download.osgeo.org/qgis/src/qgis\_1.1.0.tar.gz}
+For example download the QGIS 1.1.0 source code here \\
+\url{http://download.osgeo.org/qgis/src/qgis\_1.1.0.tar.gz}
 
 uncompress the arquive and enter the newly created folder
 
@@ -1202,7 +1317,7 @@
 Download from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://puzzle.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.11-2004.04.30-1.exe}{http://puzzle.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.11-2004.04.30-1.exe}
+\url{http://puzzle.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.11-2004.04.30-1.exe}
 	\end{quotation}
 
 Install to \texttt{c:$\backslash$msys}
@@ -1213,7 +1328,7 @@
 Download from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://puzzle.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe}{http://puzzle.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe}
+\url{http://puzzle.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe}
 	\end{quotation}
 
 Install to \texttt{c:$\backslash$msys$\backslash$mingw}
@@ -1226,15 +1341,15 @@
 Download the following packages:
 
 	\begin{quotation}
-\htmladdnormallink{http://gnuwin32.sourceforge.net/downlinks/flex-bin-zip.php}{http://gnuwin32.sourceforge.net/downlinks/flex-bin-zip.php}
+\url{http://gnuwin32.sourceforge.net/downlinks/flex-bin-zip.php}
 	\end{quotation}
 
 	\begin{quotation}
-\htmladdnormallink{http://gnuwin32.sourceforge.net/downlinks/bison-bin-zip.php}{http://gnuwin32.sourceforge.net/downlinks/bison-bin-zip.php}
+\url{http://gnuwin32.sourceforge.net/downlinks/bison-bin-zip.php}
 	\end{quotation}
 
 	\begin{quotation}
-\htmladdnormallink{http://gnuwin32.sourceforge.net/downlinks/bison-dep-zip.php}{http://gnuwin32.sourceforge.net/downlinks/bison-dep-zip.php}
+\url{http://gnuwin32.sourceforge.net/downlinks/bison-dep-zip.php}
 	\end{quotation}
 
 Unpack them all to \texttt{c:$\backslash$msys$\backslash$local}
@@ -1258,13 +1373,13 @@
 It's available for download here:
 
 	\begin{quotation}
-\htmladdnormallink{http://www.stjohnspoint.co.uk/grass/wingrass-extralibs.tar.gz}{http://www.stjohnspoint.co.uk/grass/wingrass-extralibs.tar.gz}
+\url{http://www.stjohnspoint.co.uk/grass/wingrass-extralibs.tar.gz}
 	\end{quotation}
 
 Moreover he also left the notes how to compile it (for those interested):
 
 	\begin{quotation}
-\htmladdnormallink{http://www.stjohnspoint.co.uk/grass/README.extralibs}{http://www.stjohnspoint.co.uk/grass/README.extralibs}
+\url{http://www.stjohnspoint.co.uk/grass/README.extralibs}
 	\end{quotation}
 
 Unpack the whole package to \texttt{c:$\backslash$msys$\backslash$local}
@@ -1283,7 +1398,7 @@
 So, start with downloading GDAL sources:
 
 	\begin{quotation}
-\htmladdnormallink{http://download.osgeo.org/gdal/gdal141.zip}{http://download.osgeo.org/gdal/gdal141.zip}
+\url{http://download.osgeo.org/gdal/gdal141.zip}
 	\end{quotation}
 
 Unpack it to some directory, preferably \texttt{c:$\backslash$msys$\backslash$local$\backslash$src}.
@@ -1302,17 +1417,19 @@
 make install
 rm /usr/local/lib/libgdal.a
 g++ -s -shared -o ./libgdal.dll -L/usr/local/lib -lz -lpng ./frmts/o/*.o \
-/gcore/*.o ./port/*.o ./alg/*.o ./ogr/ogrsf_frmts/o/*.o ./ogr/ogrgeometryfactory.o \
-/ogr/ogrpoint.o ./ogr/ogrcurve.o ./ogr/ogrlinestring.o ./ogr/ogrlinearring.o \
-/ogr/ogrpolygon.o ./ogr/ogrutils.o ./ogr/ogrgeometry.o ./ogr/ogrgeometrycollection.o \
-/ogr/ogrmultipolygon.o ./ogr/ogrsurface.o ./ogr/ogrmultipoint.o \
-/ogr/ogrmultilinestring.o ./ogr/ogr_api.o ./ogr/ogrfeature.o ./ogr/ogrfeaturedefn.o \
-/ogr/ogrfeaturequery.o ./ogr/ogrfeaturestyle.o ./ogr/ogrfielddefn.o \
-/ogr/ogrspatialreference.o ./ogr/ogr_srsnode.o ./ogr/ogr_srs_proj4.o \
-/ogr/ogr_fromepsg.o ./ogr/ogrct.o ./ogr/ogr_opt.o ./ogr/ogr_srs_esri.o \
-/ogr/ogr_srs_pci.o ./ogr/ogr_srs_usgs.o ./ogr/ogr_srs_dict.o ./ogr/ogr_srs_panorama.o \
-/ogr/swq.o ./ogr/ogr_srs_validate.o ./ogr/ogr_srs_xml.o ./ogr/ograssemblepolygon.o \
-/ogr/ogr2gmlgeometry.o ./ogr/gml2ogrgeometry.o
+./gcore/*.o ./port/*.o ./alg/*.o ./ogr/ogrsf_frmts/o/*.o \
+./ogr/ogrgeometryfactory.o ./ogr/ogrpoint.o ./ogr/ogrcurve.o \
+./ogr/ogrlinestring.o ./ogr/ogrlinearring.o ./ogr/ogrpolygon.o \
+./ogr/ogrutils.o ./ogr/ogrgeometry.o ./ogr/ogrgeometrycollection.o \
+./ogr/ogrmultipolygon.o ./ogr/ogrsurface.o ./ogr/ogrmultipoint.o \
+./ogr/ogrmultilinestring.o ./ogr/ogr_api.o ./ogr/ogrfeature.o \
+./ogr/ogrfeaturedefn.o ./ogr/ogrfeaturequery.o ./ogr/ogrfeaturestyle.o \
+./ogr/ogrfielddefn.o ./ogr/ogrspatialreference.o ./ogr/ogr_srsnode.o \
+./ogr/ogr_srs_proj4.o ./ogr/ogr_fromepsg.o ./ogr/ogrct.o ./ogr/ogr_opt.o \
+./ogr/ogr_srs_esri.o ./ogr/ogr_srs_pci.o ./ogr/ogr_srs_usgs.o \
+./ogr/ogr_srs_dict.o ./ogr/ogr_srs_panorama.o ./ogr/swq.o \
+./ogr/ogr_srs_validate.o ./ogr/ogr_srs_xml.o ./ogr/ograssemblepolygon.o \
+./ogr/ogr2gmlgeometry.o ./ogr/gml2ogrgeometry.o
 install libgdal.dll /usr/local/lib
 cd ogr
 g++ -s ogrinfo.o -o ogrinfo.exe -L/usr/local/lib -lpng -lz -lgdal
@@ -1327,8 +1444,8 @@
 g++ -s gdal_contour.o -o gdal_contour.exe -L/usr/local/lib -lpng -lz -lgdal
 g++ -s gdaltindex.o -o gdaltindex.exe -L/usr/local/lib -lpng -lz -lgdal
 g++ -s gdal_rasterize.o -o gdal_rasterize.exe -L/usr/local/lib -lpng -lz -lgdal
-install gdalinfo.exe gdal_translate.exe gdaladdo.exe gdalwarp.exe gdal_contour.exe \
-gdaltindex.exe gdal_rasterize.exe /usr/local/bin
+install gdalinfo.exe gdal_translate.exe gdaladdo.exe gdalwarp.exe \
+gdal_contour.exe gdaltindex.exe gdal_rasterize.exe /usr/local/bin
 
 \end{verbatim}
 
@@ -1339,7 +1456,7 @@
 \end{verbatim}
 GDAL build procedure can be greatly simplified to use libtool with a libtool line patch:
 configure gdal as below:
-/configure --with-ngpython --with-xerces=/local/ --with-jasper=/local/ --with-grass=/local/grass-6.3.cvs/ --with-pg=/local/pgsql/bin/pg\_config.exe 
+./configure --with-ngpython --with-xerces=/local/ --with-jasper=/local/ --with-grass=/local/grass-6.3.cvs/ --with-pg=/local/pgsql/bin/pg\_config.exe 
 
 Then fix libtool with:
 mv libtool libtool.orig
@@ -1353,7 +1470,7 @@
 Grab sources from CVS or use a weekly snapshot, see:
 
 	\begin{quotation}
-\htmladdnormallink{http://grass.itc.it/devel/cvs.php}{http://grass.itc.it/devel/cvs.php}
+\url{http://grass.itc.it/devel/cvs.php}
 	\end{quotation}
 
 In MSYS console go to the directory where you've unpacked or checked out sources
@@ -1363,9 +1480,8 @@
 
 \begin{verbatim}
 export PATH="/usr/local/bin:/usr/local/lib:$PATH"
-/configure --prefix=/usr/local --bindir=/usr/local \
---with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx \
---without-jpeg --without-tiff --with-postgres=yes \
+./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include \
+--with-libs=/usr/local/lib --with-cxx --without-jpeg --without-tiff --with-postgres=yes \
 --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib \
 --with-opengl=windows --with-fftw --with-freetype \
 --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk \
@@ -1379,8 +1495,8 @@
 By the way, these pages might be useful:
 
 \begin{itemize}
-\item \htmladdnormallink{http://grass.gdf-hannover.de/wiki/WinGRASS\_Current\_Status}{http://grass.gdf-hannover.de/wiki/WinGRASS\_Current\_Status}
-\item \htmladdnormallink{http://geni.ath.cx/grass.html}{http://geni.ath.cx/grass.html}
+\item \url{http://grass.gdf-hannover.de/wiki/WinGRASS\_Current\_Status}
+\item \url{http://geni.ath.cx/grass.html}
 \end{itemize}
 
 \subsubsection{GDAL level two}
@@ -1389,7 +1505,7 @@
 But first in order to be able to compile GDAL sources with current GRASS CVS, you need to patch them, here's what you need to change:
 
 	\begin{quotation}
-\htmladdnormallink{http://trac.osgeo.org/gdal/attachment/ticket/1587/plugin\_patch\_grass63.diff}{http://trac.osgeo.org/gdal/attachment/ticket/1587/plugin\_patch\_grass63.diff}
+\url{http://trac.osgeo.org/gdal/attachment/ticket/1587/plugin\_patch\_grass63.diff}
 	\end{quotation}
 (you can patch it by hand or use patch.exe in \texttt{c:$\backslash$msys$\backslash$bin})
 
@@ -1415,7 +1531,7 @@
 Download the sources:
 
 	\begin{quotation}
-\htmladdnormallink{http://geos.refractions.net/geos-2.2.3.tar.bz2}{http://geos.refractions.net/geos-2.2.3.tar.bz2}
+\url{http://geos.refractions.net/geos-2.2.3.tar.bz2}
 	\end{quotation}
 
 Unpack to e.g. \texttt{c:$\backslash$msys$\backslash$local$\backslash$src}
@@ -1435,7 +1551,7 @@
 Now, in MSYS console, go to the source directory and run:
 
 \begin{verbatim}
-/configure --prefix=/usr/local
+./configure --prefix=/usr/local
 make
 make install
 \end{verbatim}
@@ -1446,7 +1562,7 @@
 Download this archive:
 
 	\begin{quotation}
-\htmladdnormallink{http://www.sqlite.org/sqlitedll-3\_3\_17.zip}{http://www.sqlite.org/sqlitedll-3\_3\_17.zip}
+\url{http://www.sqlite.org/sqlitedll-3\_3\_17.zip}
 	\end{quotation}
 
 and copy sqlite3.dll from it to \texttt{c:$\backslash$msys$\backslash$local$\backslash$lib}
@@ -1454,7 +1570,7 @@
 Then download this archive:
 
 	\begin{quotation}
-\htmladdnormallink{http://www.sqlite.org/sqlite-source-3\_3\_17.zip}{http://www.sqlite.org/sqlite-source-3\_3\_17.zip}
+\url{http://www.sqlite.org/sqlite-source-3\_3\_17.zip}
 	\end{quotation}
 
 and copy sqlite3.h to \texttt{c:$\backslash$msys$\backslash$local$\backslash$include}
@@ -1463,7 +1579,7 @@
 Download sources:
 
 	\begin{quotation}
-\htmladdnormallink{ftp://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz}{ftp://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz}
+\url{ftp://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz}
 	\end{quotation}
 
 Unpack to \texttt{c:$\backslash$msys$\backslash$local$\backslash$src}
@@ -1471,7 +1587,7 @@
 Run from MSYS console in the source directory:
 
 \begin{verbatim}
-/configure
+./configure
 make
 make install
 \end{verbatim}
@@ -1480,7 +1596,7 @@
 Download sources:
 
 	\begin{quotation}
-\htmladdnormallink{http://dfn.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz}{http://dfn.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz}
+\url{http://dfn.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz}
 	\end{quotation}
 
 Unpack to \texttt{c:$\backslash$msys$\backslash$local$\backslash$src}
@@ -1488,7 +1604,7 @@
 Run from MSYS console in the source directory:
 
 \begin{verbatim}
-/configure
+./configure
 make
 make install
 \end{verbatim}
@@ -1508,7 +1624,7 @@
 
 
 \section{Building with MS Visual Studio}
-/!$\backslash$ This section describes a process where you build all dependencies yourself. See the section
+\textbf{Note}:   This section describes a process where you build all dependencies yourself. See the section
 after this for a simpler procedure where we have all the dependencies you need pre-packaged
 and we focus just on getting Visual Studio Express set up and building QGIS.
 
@@ -1521,7 +1637,7 @@
 The free Express Edition lacks the platform SDK which contains headers and so on that are needed when building QGIS. The platform SDK can be installed as described here:
 
 	\begin{quotation}
-\htmladdnormallink{http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/}{http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/}
+\url{http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/}
 	\end{quotation}
 Once this is done, you will need to edit the $<$vsinstalldir$>$$\backslash$Common7$\backslash$Tools$\backslash$vsvars file as follows:
 
@@ -1531,16 +1647,16 @@
 This will add more headers to the system INCLUDE path. Note that this will only work when you use the Visual Studio command prompt when building. Most of the dependencies will be built with this.
 You will also need to perform the edits described here to remove the need for a library that Visual Studio Express lacks:
 
-	\begin{quotation}
-\htmladdnormallink{http://www.codeproject.com/wtl/WTLExpress.asp}{http://www.codeproject.com/wtl/WTLExpress.asp}
-	\end{quotation}
+\begin{quotation}
+\url{http://www.codeproject.com/wtl/WTLExpress.asp}
+\end{quotation}
 
 \subsubsection{All Editions}
 You will need stdint.h and unistd.h. unistd.h comes with GnuWin32 version of flex \& bison binaries (see later). stdint.h can be found here:
 
-	\begin{quotation}
-\htmladdnormallink{http://www.azillionmonkeys.com/qed/pstdint.h}{http://www.azillionmonkeys.com/qed/pstdint.h}.
-	\end{quotation}
+\begin{quotation}
+\url{http://www.azillionmonkeys.com/qed/pstdint.h}
+\end{quotation}
 Copy both of these to $<$vsinstalldir$>$$\backslash$VC$\backslash$include.
 
 \subsection{Download/Install Dependencies}
@@ -1552,11 +1668,11 @@
 Download the following packages and run the installers:
 
 	\begin{quotation}
-\htmladdnormallink{http://gnuwin32.sourceforge.net/downlinks/flex.php}{http://gnuwin32.sourceforge.net/downlinks/flex.php}
+\url{http://gnuwin32.sourceforge.net/downlinks/flex.php}
 	\end{quotation}
 
 	\begin{quotation}
-\htmladdnormallink{http://gnuwin32.sourceforge.net/downlinks/bison.php}{http://gnuwin32.sourceforge.net/downlinks/bison.php}
+\url{http://gnuwin32.sourceforge.net/downlinks/bison.php}
 	\end{quotation}
 
 \subsubsection{To include  PostgreSQL support in Qt}
@@ -1612,7 +1728,7 @@
 Get proj.4 source from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://proj.maptools.org/}{http://proj.maptools.org/}
+\url{http://proj.maptools.org/}
 	\end{quotation}
 Using the Visual Studio command prompt (ensures the environment is setup properly), run the following in the src directory:
 
@@ -1641,12 +1757,12 @@
 Get gsl source from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://david.geldreich.free.fr/downloads/gsl-1.9-windows-sources.zip}{http://david.geldreich.free.fr/downloads/gsl-1.9-windows-sources.zip}
+\url{http://david.geldreich.free.fr/downloads/gsl-1.9-windows-sources.zip}
 	\end{quotation}
 Build using the gsl.sln file
 
 \subsubsection{GEOS}
-Get geos from svn (svn checkout \htmladdnormallink{http://svn.refractions.net/geos/trunk}{http://svn.refractions.net/geos/trunk} geos).
+Get geos from svn (svn checkout \url{http://svn.refractions.net/geos/trunk} geos).
 Edit geos$\backslash$source$\backslash$makefile.vc as follows:
 
 Uncomment lines 333 and 334 to allow the copying of version.h.vc to version.h.
@@ -1679,7 +1795,7 @@
 This can also be added to a batch file.
 
 \subsubsection{GDAL}
-Get gdal from svn (svn checkout \htmladdnormallink{https://svn.osgeo.org/gdal/branches/1.4/gdal}{https://svn.osgeo.org/gdal/branches/1.4/gdal} gdal).
+Get gdal from svn (svn checkout \url{https://svn.osgeo.org/gdal/branches/1.4/gdal} gdal).
 
 Edit nmake.opt to suit, it's pretty well commented.
 
@@ -1699,7 +1815,7 @@
 Get PostGIS and the Windows version of PostgreSQL from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://postgis.refractions.net/download/}{http://postgis.refractions.net/download/}
+\url{http://postgis.refractions.net/download/}
 	\end{quotation}
 Note the warning about not installing the version of PostGIS that comes with the PostgreSQL installer. Simply run the installers.
 
@@ -1707,7 +1823,7 @@
 Get expat from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://sourceforge.net/project/showfiles.php?group\_id=10127}{http://sourceforge.net/project/showfiles.php?group\_id=10127}
+\url{http://sourceforge.net/project/showfiles.php?group\_id=10127}
 	\end{quotation}
 You'll need expat-win32bin-2.0.1.exe.
 
@@ -1717,12 +1833,12 @@
 Get CMake from here:
 
 	\begin{quotation}
-\htmladdnormallink{http://www.cmake.org/HTML/Download.html}{http://www.cmake.org/HTML/Download.html}
+\url{http://www.cmake.org/HTML/Download.html}
 	\end{quotation}
 You'll need cmake-$<$version$>$-win32-x86.exe. Simply run this to install CMake.
 
 \subsection{Building QGIS with CMAKE}
-Get QGIS source from svn (svn co \htmladdnormallink{https://svn.osgeo.org/qgis/trunk/qgis}{https://svn.osgeo.org/qgis/trunk/qgis} qgis).
+Get QGIS source from svn (svn co \url{https://svn.osgeo.org/qgis/trunk/qgis} qgis).
 
 Create a 'Build' directory in the top level QGIS directory. This will be where all the build output will be generated.
 
@@ -1750,10 +1866,10 @@
 
 
 \section{Building under Windows using MSVC Express}
-/!$\backslash$ Note: Building under MSVC is still a work in progress. In particular the
+\textbf{Note}:   Note: Building under MSVC is still a work in progress. In particular the
 following dont work yet: python, grass, postgis connections.
 
-/!$\backslash$ This section of the document is in draft form and is not ready to be used
+\textbf{Note}: This section of the document is in draft form and is not ready to be used
 yet.
 
 Tim Sutton, 2007
@@ -1801,14 +1917,14 @@
 c:\dev\cpp\qgislibs-release
 \end{verbatim}
 
-/!$\backslash$ Note that you are not obliged to use this directory layout, but you 
+\textbf{Note}:   Note that you are not obliged to use this directory layout, but you 
 should adjust any instructions that follow if you plan to do things 
 differently.
 
 \subsection{Install Visual Studio Express 2005}
 First thing we need to get is MSVC Express from here:
 
-\htmladdnormallink{http://msdn2.microsoft.com/en-us/express/aa975050.aspx}{http://msdn2.microsoft.com/en-us/express/aa975050.aspx}
+\url{http://msdn2.microsoft.com/en-us/express/aa975050.aspx}
 
 The page is really confusing so dont feel bad if you cant actually find the 
 download at first! There are six coloured blocks on the page for the various  
@@ -1833,7 +1949,7 @@
 \subsection{Install Microsoft Platform SDK2}
 Go to this page:
 
-\htmladdnormallink{http://msdn2.microsoft.com/en-us/express/aa700755.aspx}{http://msdn2.microsoft.com/en-us/express/aa700755.aspx}
+\url{http://msdn2.microsoft.com/en-us/express/aa700755.aspx}
 
 Start by using the link provided on the above page to download and install the
 platform SDK2.
@@ -1901,9 +2017,9 @@
 Debuggin Tools for Windows                      (Yes)
 \end{verbatim}
 
-/!$\backslash$ Note that you can always come back later to add extra bits if you like.
+\textbf{Note}:   Note that you can always come back later to add extra bits if you like.
 
-/!$\backslash$ Note that installing the SDK requires validation with the 
+\textbf{Note}:   Note that installing the SDK requires validation with the 
 Microsoft Genuine Advantage application. Some people have a philosophical 
 objection to installing this software on their computers. If you are one 
 of them you should probably consider using the MINGW build instructions 
@@ -1988,26 +2104,27 @@
 @rem
 @set DevEnvDir=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
 
- at set PATH=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program \
-Files\Microsoft Visual Studio 8\VC\BIN;\
+ at set PATH=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;\
+C:\Program Files\Microsoft Visual Studio 8\VC\BIN;\
 C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;\
 C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;\
 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;\
 C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;%PATH%
 @rem added by Tim
- at set PATH=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin;%PATH%
+ at set PATH=C:\Program Files\Microsoft Platform SDK for Windows \
+Server 2003 R2\Bin;%PATH%
 @set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;%INCLUDE%
 @rem added by Tim
- at set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server \
-2003 R2\Include;%INCLUDE%
- at set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server \
-2003 R2\Include\mfc;%INCLUDE%
+ at set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows \
+Server 2003 R2\Include;%INCLUDE%
+ at set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows \
+Server 2003 R2\Include\mfc;%INCLUDE%
 @set INCLUDE=%INCLUDE%;C:\dev\cpp\qgislibs-release\include\postgresql
 @set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;\
 C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%LIB%
 @rem added by Tim
- at set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server \
-2003 R2\Lib;%LIB%
+ at set LIB=C:\Program Files\Microsoft Platform SDK for Windows \
+Server 2003 R2\Lib;%LIB%
 @set LIB=%LIB%;C:\dev\cpp\qgislibs-release\lib
 @set LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
 
@@ -2032,23 +2149,28 @@
 \begin{verbatim}
 Variable Name:     Value:
 --------------------------------------------------------------------------
-EDITOR   vim
-INCLUDE  C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\.
-LIB      C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\.
-LIB_DIR  C:\dev\cpp\qgislibs-release
-PATH     C:\Program Files\CMake 2.4\bin;
-         %SystemRoot%\system32;
-         %SystemRoot%;
-         %SystemRoot%\System32\Wbem;
-         C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\.;
-         C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\WinNT\;
-         C:\Program Files\svn\bin;C:\Program Files\Microsoft Visual Studio 8\VC\bin;
-         C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;
-         "c:\Program Files\Microsoft Visual Studio 8\Common7\Tools";
-         c:\Qt\4.3.2\bin;
-         "C:\Program Files\PuTTY"
-QTDIR    c:\Qt\4.3.2
-SVN_SSH  "C:\\Program Files\\PuTTY\\plink.exe"
+EDITOR             vim
+INCLUDE            C:\Program Files\Microsoft Platform SDK for Windows Server \
+                   2003 R2\Include\.
+LIB                C:\Program Files\Microsoft Platform SDK for Windows Server \
+                   2003 R2\Lib\.
+LIB_DIR            C:\dev\cpp\qgislibs-release
+PATH               C:\Program Files\CMake 2.4\bin;
+                   %SystemRoot%\system32;
+                   %SystemRoot%;
+                   %SystemRoot%\System32\Wbem;
+                   C:\Program Files\Microsoft Platform SDK for Windows Server \
+                   2003 R2\Bin\.;
+                   C:\Program Files\Microsoft Platform SDK for Windows Server \
+                   2003 R2\Bin\WinNT\;
+                   C:\Program Files\svn\bin;C:\Program Files\Microsoft Visual \
+                   Studio 8\VC\bin;
+                   C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;
+                   "c:\Program Files\Microsoft Visual Studio 8\Common7\Tools";
+                   c:\Qt\4.3.2\bin;
+                   "C:\Program Files\PuTTY"
+QTDIR              c:\Qt\4.3.2
+SVN_SSH            "C:\\Program Files\\PuTTY\\plink.exe"
 \end{verbatim}
 
 \subsection{Building Qt4.3.2}
@@ -2058,7 +2180,7 @@
 Download Qt 4.x.x source for windows from
 
 \begin{verbatim}
-http:\\www.trolltech.com
+http://qt.nokia.com/downloads
 \end{verbatim}
 
 Unpack the source to 
@@ -2080,7 +2202,7 @@
 Add -qt-sql-odbc -qt-sql-psql to the configure line if your want odbc and
 PostgreSQL support build into Qt.
 
-/!$\backslash$ Note: For me in some cases I got a build error on qscreenshot.pro. If you
+\textbf{Note}:   Note: For me in some cases I got a build error on qscreenshot.pro. If you
 are only interested in having the libraries needed for building Qt apps, you 
 can probably ignore that. Just check in c:$\backslash$Qt$\backslash$4.3.2$\backslash$bin to check all dlls and 
 helper apps (assistant etc) have been made.
@@ -2167,7 +2289,7 @@
 \end{verbatim}
 
 \subsection{Install Subversion}
-You must install the command line version if you want the CMake svn scripts to work.
+You '''must''' install the command line version if you want the CMake svn scripts to work.
 Its a bit tricky to find the correct version on the subversion download site as they have 
 som misleadingly named similar downloads. Easiest is to just get this file:
 

Modified: docs/trunk/english_us/coding-compilation_guide/qgis_style.sty
===================================================================
--- docs/trunk/english_us/coding-compilation_guide/qgis_style.sty	2009-11-27 14:58:29 UTC (rev 12268)
+++ docs/trunk/english_us/coding-compilation_guide/qgis_style.sty	2009-11-27 16:35:00 UTC (rev 12269)
@@ -173,8 +173,8 @@
 \usepackage{xspace}
 
 %Macros QGIS Versions
-\def\CURRENT{1.2\xspace}
-\def\OLD{1.1\xspace}
+\def\CURRENT{1.3\xspace}
+\def\OLD{1.2\xspace}
 \def\VERYOLD{1.0\xspace}
 
 % add disclaimer about the revision status of a section

Modified: docs/trunk/english_us/coding-compilation_guide/title.tex
===================================================================
--- docs/trunk/english_us/coding-compilation_guide/title.tex	2009-11-27 14:58:29 UTC (rev 12268)
+++ docs/trunk/english_us/coding-compilation_guide/title.tex	2009-11-27 16:35:00 UTC (rev 12269)
@@ -15,7 +15,7 @@
 \Large{Coding and Compilation Guide} \\
 \vspace{0.5cm}
 %\includegraphics[clip=true, scale=0.4]{splash} 
-\Large{Version ~\CURRENT \textsl{'Daphnis'}}
+\Large{Version ~\CURRENT \textsl{'Mimas'}}
 
 \end{center}
 \end{titlepage}



More information about the QGIS-commit mailing list