mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf110 {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;} {\colortbl;\red255\green255\blue255;} \vieww10500\viewh12500\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc\pardirnatural \f0\b\fs36 \cf0 QGIS Xcode Project\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b0\fs24 \cf0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \i \cf0 2.2.1 2009-9-27\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \i0 \cf0 \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b \cf0 About\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b0 \cf0 \ This builds QGIS, as an alternative to the CLI Unix build (both build the Mac application). By default everything is built for the native architecture.\ \ Dependent libraries are optionally copied into the application bundle and embedded library paths are adjusted. Some dependent libraries are always copied for stability reasons (Qt, PyQt).\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b \cf0 Requirements\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b0 \cf0 \ See the Qgis {\field{\*\fldinst{HYPERLINK "http://wiki.qgis.org/qgiswiki/BuildingFromSource"}}{\fldrslt installation document}} for details on obtaining the requirements. All optional items below are required for the default \ul Full QGIS\ulnone build target.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \cf0 \ul \ulc0 Xcode 2.5\ulnone (minimum) - This also makes Mac OS 10.4 a minimum requirement.\ \ \ul QGIS source\ulnone \ \ \ul Qt 4.4+ frameworks\ulnone - install debug version if desired (may require a separate installer download)\ \ \ul GDAL library or framework\ulnone - a universal GDAL.framework is available.\ \ \ul PROJ library or framework\ulnone - a universal PROJ.framework is available.\ \ \ul GEOS library or framework\ulnone - a universal GEOS.framework is available.\ \ \ul GRASS libraries\ulnone - any 6.x version. A recent GRASS.app build is best for full GRASS support. \i See note below. \i0 \ \ \ul GSL libraries\ulnone (optional)\ \ \ul Postgres client library\ulnone (optional) - normally available in a full Postgres installation.\ \ \ul SQLite3 library\ulnone - OSX includes SQLite 3, or use a more recent SQLite framework (recommended), or compile from source.\ \ \ul Spatialite library\ulnone - Spatialite is included in the SQLite framework starting with 3.6.11. Or compile from source (includes its own SQLite).\ \ \ul Expat library\ulnone - Leopard and above includes expat. The one in X11 should work on Tiger, but I prefer to avoid X11 dependencies.\ \ \ul gpsbabel\ulnone (optional) - for the GPS Import plugin. A universal gpsbabel is available from gpsbabel.org.\ \ \ul Python 2.5 or 2.6\ulnone - the system Python on Leopard and Snow Leopard will work. Or install Python 2.5 from {\field{\*\fldinst{HYPERLINK "http://www.python.org/"}}{\fldrslt python.org}} (required for Tiger).\ \ \ul SIP\ulnone and \ul PyQt\ulnone - make sure that they fully support the installed Qt version. Development versions may cause trouble for QGIS. See the QGIS install instructions for info about how to compile and install these.\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b \cf0 Configuration \b0 \ \ Make a copy of the \f1\fs20 qgis_user-template.xcconfig \f0\fs24 file, named \f1\fs20 qgis_user.xcconfig \f0\fs24 . You can also reuse a \f1\fs20 qgis_user.xcconfig \f0\fs24 from an earlier version, to retain your own configuration, but make sure to check the template for any major changes. \i Make sure that the qgis_user.xcconfig exists before opening the project. \i0 \ \ It is a plain text file, you can edit it in your favorite text editor before opening the project file, or within Xcode after opening the project.\ \ The xcconfig file is a simple text file with environment variables and values, and comments denoted by //. Very important: # is not a comment character, and will break the config file if used.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \cf0 \ul Defaults\ \ulnone \ The default configuration is for a universal build, with the Leopard (10.5) SDK. GDAL, PROJ, GEOS and SQLite frameworks are used. Spatialite is expected in the SQLite framework. Postgres and GSL are expected in default /usr/local builds. Expat is from the system on Leopard and above, and is expected in /usr/local on Tiger. GRASS support is from a GRASS-6.4.app application. The python.org Python framework is used on Tiger, and the system Python is used on Leopard and above.\ \ By default, Qt, GSL, the Postgres client library are bundled in the Qgis application.\ \ \ul Minimal Config\ulnone \ \ You \b must set at least SDKSYS \b0 to match the system you are building for. Other defaults will adjust automatically to match the SDK.\ \ For Tiger, you need to set BISON (see below).\ \ \ul Build\ulnone - At the top are some basic build settings.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f1\fs20 \cf0 SDKSYS \f0\fs24 tells the project to use the 10.4 (tig), 10.5 (leo) or 10.6 (snow) SDK. Qgis will build in a subfolder of the build folder - this is handy if you want to build once for each system without overwriting any of them.\ \ Note that there may be linking problems with the SDK for non-system libraries and frameworks. This is because the linker prefixes everything with the SDKROOT and indirectly linked libraries in non-standard locations (ie /usr/local) may not be found. If you encounter linking errors, you should add symlinks to the SDKROOT to those locations.\ \ For example, /usr/local:\ \ \f1\fs20 sudo ln -s /usr/local /Developer/SDKs/MacOSX10.4u.sdk/usr/local\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\fs24 \cf0 \ If there are subfolders involved that are not already in the SDK, add them first. Say you have some libraries in /Users/Shared/unix:\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f1\fs20 \cf0 sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Users/Shared\ ln -s /Users/Shared/unix /Developer/SDKs/MacOSX10.4u.sdk/Users/Shared/unix \f0\fs24 \ \ \f1\fs20 ARCHS \f0\fs24 is a list of which architectures to build, the default is universal to match the SDK used. Uncomment and set ARCHS if you want a single arch. This is a \i space-separated \i0 list.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f1\fs20 \cf0 ARCHS_P \f0\fs24 is a list of which architectures to build for Python, this must match the archs in ARCHS. This one is a \i semicolon-separated \i0 list.\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \cf0 \ \ \ul Misc Support\ \ulnone \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f1\fs20 \cf0 QT_PLUGINS_DIR \f0\fs24 is where the Qt plugins are installed. \f1\fs20 QTBIN \f0\fs24 is where the Qt command-line programs are found. The default is for a binary installation of Qt. If built from source, you may need to change these.\ \ \f1\fs20 BISON \f0\fs24 is the base path to Bison. If building on Tiger (not \i on \i0 Leopard \i for \i0 Tiger), a user-built bison 2.3 is required. Leopard has a usable bison.\ \ \f1\fs20 GPSBABEL \f0\fs24 is the full path to the gpsbabel CLI program. Used for bundling gpsbabel.\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \cf0 \ul Library forms\ulnone - this is where you tell the project what type of library you have, as many of them are available in framework forms as well as libraries.\ \ Most of them are a choice between 'fw' for framework and 'shared' or 'static' for a library. See the comments in the xcconfig for details, and other possible choices.\ \ Frameworks are the easiest to configure - just set the option to \f1\fs20 fw \f0\fs24 , and all PREFIX, INC and LIB options are set for you. Frameworks assume either a system framework, or the framework is in \f1\fs20 /Library/Frameworks \f0\fs24 .\ \ For library forms, the PREFIX (described later) defaults to \f1\fs20 /usr/local \f0\fs24 . If this is where your libraries are installed, setting the form to \f1\fs20 shared \f0\fs24 or \f1\fs20 static \f0\fs24 is all that's needed.\ \ The version for GRASS and Python can't be detected by the config file, so make sure these are correct.\ \ See detailed dependency notes below.\ \ \ \ul Bundle options\ulnone - Some libraries and programs can be bundled in the Qgis.app package for a more portable Qgis.app. These are pretty straightforward - yes or no. At some time I will add more checking logic, but for now be explicit. Generally, you don't need to bundle frameworks or system libraries. The only logic checks whether the dynamic library or program exists, so it automatically excludes static libraries and frameworks, but it doesn't check whether it's a system library, so you could end up bundling libsqlite from the system.\ \ \ul Prefixes\ulnone - If you have unix libraries installed in a location other than \f1\fs20 /usr/local \f0\fs24 , the next section is where you can change those. \ul Make sure to check these for any library forms\ulnone .\ \ \ \ul Notes for dependencies\ulnone \ \ - Postgres - An alternative to bundling Postgres is to build Qgis with a static libpq. There are \f1\fs20 shared \f0\fs24 and \f1\fs20 static \f0\fs24 forms in the settings.\ \ - GRASS - GRASS.app \ul must\ulnone be installed as it was built. If it was moved or renamed after installation, GRASS support in Qgis won't work. This goes for building Qgis as well as running it to use full GRASS support.\ \ - Python/SIP/PyQt - this is a complex installation. Python can be either in the system or separately installed in \f1\fs20 /Library/Frameworks \f0\fs24 . SIP/PyQt has both binary program and Python components. Programs and Python modules will be installed inside the Python framework for a \f1\fs20 /Library/Frameworks \f0\fs24 install. But the system Python has a user location for Python modules, and programs should be installed elsewhere, like /usr/local/bin (follow the Qgis install instructions for SIP/PyQt).\ \ SIP/PyQt programs are found with the \f1\fs20 PYTHON_USRBIN \f0\fs24 setting. This is automatic if you follow the Qgis SIP/PyQt install instructions.\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b \cf0 Extra Bundling \b0 \ \ Other support items not needed by the standard Qgis build can be bundled for a custom Qgis build: extra plugins, libraries, frameworks, Python modules. For example, some PyQt-based extra modules (ie Qwt5) are installed inside the PyQt folder, and these won't be found if they are not bundled with the Qgis copy of PyQt.\ \ Duplicate the file \f1\fs20 bundle-template.sh \f0\fs24 with the name \f1\fs20 bundle.sh \f0\fs24 . Add needed copy and processing commands to this. See the comments in \f1\fs20 bundle.sh \f0\fs24 for details. \f1\fs20 bundle.sh \f0\fs24 is meant to be reusable, just like \f1\fs20 qgis_user.xcconfig \f0\fs24 .\ \ \ \b Build Targets \b0 \ \ The \ul Full QGIS\ulnone target will build Qgis with Python support and all default and optional plugins.\ \ Xcode doesn't have a way to conditionally build targets, just code within sources (with standard macro switches). It \i will \i0 try to keep building as much as it can after errors. The last target built is the Qgis application itself, which has all the bundling and cleanup steps. So, if a dependency is missing for a plugin, it will have errors and fail to build, then the app bundling and cleanup will work with what succeeded.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \cf0 \ul Cleaning\ulnone - to clean the project \b Clean All \b0 . This actually leaves qgsconfig.h and qgssvnversion.h in the build folder.\ \ For a complete clean, trash the build folder from the project folder (NOT from the project itself!).\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b \cf0 Build Products\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b0 \cf0 \ When finished building, The final \ul Qgis.app\ulnone is put in the \f1\fs20 mac/xcode/build/[SDKSYS]/Release \f0\fs24 (or \f1\fs20 /Debug \f0\fs24 ) folder.\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b \cf0 Debugging\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \b0 \cf0 \ There are 2 "configurations" - \ul Release\ulnone and \ul Debug\ulnone . Use the Release configuration unless you have a need to debug Qgis.\ \ The Debug configuration will use the debug version of Qt, if installed, but that is not required. To use the debug Qt frameworks, you must change a setting before starting the debugger: in the \b Executables \b0 section of the left pane of the main project window, select the Qgis item and \b Get Info \b0 . In the \b General \b0 tab of the info window, select \ul Use debug suffix when loading frameworks\ulnone .\ \ See the Xcode documentation for more info on using the debugger.\ \ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural \cf0 - William Kyngesburye\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural {\field{\*\fldinst{HYPERLINK "mailto:kyngchaos@kyngchaos.com"}}{\fldrslt \cf0 kyngchaos@kyngchaos.com}} \fs20 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural {\field{\*\fldinst{HYPERLINK "http://www.kyngchaos.com"}}{\fldrslt \fs24 \cf0 http://www.kyngchaos.com/}} \fs24 \ }