Skip to content

Commit 0307ec3

Browse files
author
kyngchaos
committed
workaround for 32bit PyQt detection on OSX Snow
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12180 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c15f7b0 commit 0307ec3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

doc/INSTALL.t2t

+11-6
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,13 @@ sudo ln -s /usr/local/ local
387387

388388
== Install Qt4 from .dmg ==
389389

390-
You need a minimum of Qt-4.3.0. I suggest getting the latest (at time of writing).
390+
You need a minimum of Qt-4.3.0. I suggest getting the latest.
391391

392392
__Snow Leopard note:__ If you are building on Snow Leopard, you will need to
393393
decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
394394
support in the Qt Cocoa branch. Appropriate installers are available for both
395395
as of Qt-4.5.2, and the release candidate of Qt-4.6.0-cocoa works fairly well
396396
with Qgis as tested with nightly snapshots of sip and pyqt.
397-
Unfortunately, the 32-bit branch of Qt currently does not build using cmake with
398-
python bindings. You can achieve support for python in Qgis with
399-
the Xcode build method noted below.
400397

401398
```
402399
http://qt.nokia.com/downloads
@@ -786,16 +783,24 @@ cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
786783
..
787784
```
788785

789-
__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.
786+
__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.
790787

791-
For 32-bit Qt (Carbon) with GRASS-6.4, add '-D CMAKE_CXX_FLAGS="-arch i386" -D CMAKE_OSX_ARCHITECTURES=i386':
788+
For 32-bit Qt (Carbon) with GRASS-6.4, create a 32bit python script and add arch flags to the configuration:
792789

793790
```
791+
sudo cat >/usr/local/bin/python32 <<EOF
792+
#!/bin/sh
793+
exec arch -i386 /usr/bin/python2.6 \${1+"\$@"}
794+
EOF
795+
796+
sudo chmod +x /usr/local/bin/python32
797+
794798
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
795799
-D SIP_BINARY_PATH=/usr/local/bin/sip \
796800
-D CMAKE_CXX_FLAGS="-arch i386" -D CMAKE_OSX_ARCHITECTURES=i386 \
797801
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
798802
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
803+
-D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
799804
..
800805
```
801806

0 commit comments

Comments
 (0)