You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mac/xcode/ReadMe-Developers.rtf
+27-28Lines changed: 27 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -29,21 +29,34 @@ Cmake files can't be used to dynamically generate source lists in the Xcode targ
29
29
\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.\
Xcode doesn't handle its dependency calculations well with intermediate sources created with custom rules (needed for bison, flex, moc, uic, rcc). The result is excessive recompilation. bison and flex need custom rules, though there are Xcode rules for those, because those don't handle C++ file extensions.\
34
+
- moc\
35
35
\
36
-
So, script phases are used instead and timestamps are compared manually in them.\
3. find the new moc source in the 'generated' subfolder in the project folder in the Finder. Drag it into the project's corresponding 'generated/*' folder (remember to add relative to project).\
48
+
do ui generation in a script phase because:\
45
49
\
46
-
4. add this source to the corresponding core/gui/app target\
50
+
- Xcode will attempt to process generated *.h with moc rule\
51
+
- parallel processing might not finish ui's before a cpp source needs it\
52
+
\
53
+
plugins need a user-defined setting to set the TARGET_PLUGINDIR of the plugin.\
54
+
\
55
+
\'95 Header paths\
56
+
\
57
+
- to access ui headers in qgis_gui from other targets:\
@@ -53,11 +66,11 @@ So, script phases are used instead and timestamps are compared manually in them.
53
66
\
54
67
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.\
55
68
\
56
-
Linked libraries can be conditionalize in the config file.\
69
+
Linked libraries can be conditionalized in the config file.\
57
70
\
58
71
Sources can be conditionalized inside the source, with one big #ifdef block.\
59
72
\
60
-
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.\
73
+
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.\
61
74
\
62
75
\
63
76
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.\
@@ -78,29 +91,15 @@ libqgispython must be in MacOS/lib. Qgis attempts to load it dynamically, with
78
91
\
79
92
2. Duplicate provider or plugin template target and rename\
80
93
\
81
-
3. Edit Generate Sources phase script\
82
-
- set QTUIC_FILES to names of ui files without extensions\
83
-
- set QTMOC_FILES to names of moc files without extensions\
84
-
- set QTRCC_FILE to name of qrc file without extension\
85
-
- set LIBNAME and DIRNAME\
86
-
- set LIBTYPE\
87
-
\
88
-
4. if any of moc/uic/rcc have files to process:\
89
-
\
90
-
a. Build target (without sources) to generate sources.\
91
-
\
92
-
b. Drag folder created into project \ul generated\ulnone group (add as relative to project).\
93
-
\
94
-
c. add rm command to \ul extra clean\ulnone target script.\
95
-
\
96
-
5. Add sources to target\
94
+
3. Add sources to target\
97
95
\
98
-
6. Edit target settings:\
96
+
4. Edit target settings:\
99
97
\
100
98
a. Product Name\
101
99
b. Header Search Paths - add extra source folders needed, and config _INC vars\
102
-
c. Other Linker Flags - add config _LIB vars as needed\
100
+
c. Other Linker Flags - add config *_LIB vars as needed\
103
101
d. Preprocessor Macros - add extra defs if needed\
102
+
e. TARGET_PLUGINDIR - name of folder of plugin source\
This builds QGIS, as an alternative to the CLI Unix build (both build the Mac application). By default everything is built universal for both PPC and Intel.\
24
+
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.\
25
25
\
26
-
Dependent libraries are optionally copied into the application bundle and embedded library paths are adjusted.\
26
+
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).\
\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 this.\
130
+
\f0\fs24 is where the Qt applications and plugins are installed.
131
+
\f1\fs20 QTBIN
132
+
\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.\
131
133
\
132
134
133
135
\f1\fs20 BISON
@@ -188,7 +190,7 @@ Some of the bundle targets don't exist yet, but can easily be created as needed.
188
190
\f1\fs20 static
189
191
\f0\fs24 forms in the settings.\
190
192
\
191
-
- GRASS - GRASS.app \ul must\ulnone be installed in /Applications directly, as it was built, not in a subfolder in /Applications or some other folder. This goes for building Qgis as well as running it to use full GRASS support.\
193
+
- 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.\
@@ -203,11 +205,11 @@ Xcode doesn't have a way to conditionally build targets, just code within source
203
205
\i will
204
206
\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.\
205
207
\
206
-
\ul Cleaning\ulnone - the clean the project, first set the \ul extra clean\ulnone target as active and build it. Then
208
+
\ul Cleaning\ulnone - to clean the project
207
209
\b Clean All
208
-
\b0 .\
210
+
\b0 . This actually leaves qgsconfig.h and qgssvnversion.h in the build folder.\
209
211
\
210
-
Or instead, trash the build and generated folders from the project folder (NOT from the project itself!).\
212
+
For a complete clean, trash the build folder from the project folder (NOT from the project itself!).\
0 commit comments