mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
114 lines
5.0 KiB
Plaintext
114 lines
5.0 KiB
Plaintext
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
|
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
|
{\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\
|
|
Developer Notes\
|
|
\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
|
|
|
|
\b \cf0 Sources\
|
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
|
|
|
\b0 \cf0 \
|
|
\'95 Adding sources and other files and folders to the project.\
|
|
\
|
|
Always use \ul Relative to Project\ulnone reference type.\
|
|
\
|
|
Cmake files can't be used to dynamically generate source lists in the Xcode targets. Any additions and deletions of source files in the cmake configuration must be manually mirrored in the Xcode project.\
|
|
\
|
|
\'95\'a0Layout\
|
|
\
|
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-360\ql\qnatural\pardirnatural
|
|
\cf0 \ul \ulc0 Configuration Files\ulnone - Xcode config files. dependency config, system target, core moc lists set here.\
|
|
\ul Sources\ulnone - standard Qgis sources\
|
|
\ul generated\ulnone - intermediate sources generated by bison, flex, moc, uic, rcc in script phases. Subfolders will start empty of files, and contents appear red in the project until generated.\
|
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
|
\cf0 \
|
|
\'95 Custom Rules\
|
|
\
|
|
- moc\
|
|
\
|
|
source file names matching: *.h\
|
|
script: $QTMOC $QT_CXXFLAGS -o "$DERIVED_FILES_DIR/moc_$INPUT_FILE_BASE.cpp" "$INPUT_FILE_PATH"\
|
|
with output files: $(DERIVED_FILES_DIR)/moc_$(INPUT_FILE_BASE).cpp\
|
|
\
|
|
- qrc\
|
|
\
|
|
sources: *.qrc\
|
|
script: $QTRCC -name $INPUT_FILE_BASE -o "$DERIVED_FILES_DIR/qrc_$INPUT_FILE_BASE.cpp" "$INPUT_FILE_PATH"\
|
|
output: $(DERIVED_FILES_DIR)/qrc_$(INPUT_FILE_BASE).cpp\
|
|
\
|
|
- ui\
|
|
\
|
|
do ui generation in a script phase because:\
|
|
\
|
|
- Xcode will attempt to process generated *.h with moc rule\
|
|
- parallel processing might not finish ui's before a cpp source needs it\
|
|
\
|
|
plugins need a user-defined setting to set the TARGET_PLUGINDIR of the plugin.\
|
|
\
|
|
\'95 Header paths\
|
|
\
|
|
- to access ui headers in qgis_gui from other targets:\
|
|
\
|
|
"$(TARGET_TEMP_DIR)/../qgis_gui.build/DerivedSources"\
|
|
\
|
|
\
|
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
|
|
|
\b \cf0 Targets
|
|
\b0 \
|
|
\
|
|
There is no way to conditionaly compile whole targets, or individual sources. So fo now, all conditional sources are required. Conditional targets must be built manually.\
|
|
\
|
|
Linked libraries can be conditionalized in the config file.\
|
|
\
|
|
Sources can be conditionalized inside the source, with one big #ifdef block.\
|
|
\
|
|
Another possibility is to indirectly add sources in a script phase as generated - copy the true source if condition true, dump dummy empty source if false. The target always compiles the generated source. Wouldn't work for whole targets, as bogus binary is generated.\
|
|
\
|
|
\
|
|
Targets can be destructive (most are) - for example, everything is built directly into the application bundle, which is really the domain of the Qgis.app target. This simplifies packaging for optional plugins. This means that if just the app target is cleaned, all link and copy phases of all other targets must be redone.\
|
|
\
|
|
\
|
|
The app target must be built last. This is so that the Qt bundling phase install_name_tool step will get all built libraries and plugins. Also, the bundled and stripped-of-headers Qt frameworks would interfere with building all other targets.\
|
|
\
|
|
\
|
|
libqgispython must be in MacOS/lib. Qgis attempts to load it dynamically, with a hardwired path.\
|
|
\
|
|
\
|
|
|
|
\b Adding Providers and Plugins (C++)\
|
|
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
|
|
|
\b0 \cf0 \
|
|
1. Add sources to project\
|
|
\
|
|
2. Duplicate provider or plugin template target and rename\
|
|
\
|
|
3. Add sources to target\
|
|
\
|
|
4. Edit target settings (make sure to change both Debug and Release configurations):\
|
|
\
|
|
a. Product Name\
|
|
b. Header Search Paths - add extra source folders needed, and config _INC vars\
|
|
c. Other Linker Flags - add config *_LIB vars as needed\
|
|
d. Preprocessor Macros - add extra defs if needed\
|
|
e. TARGET_PLUGINDIR - name of folder of plugin source\
|
|
\
|
|
\
|
|
\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 \
|
|
} |