1For building SoQt on macOS platform, you should in general follow the 2instructions in the INSTALL file. 3 4This file contains additional information about building SoQt on Mac OS X. 5For more information on getting started, known issues, and more, see 6https://bitbucket.org/Coin3D/coin/wiki/Mac%20information%20page. 7 8General information 9==================== 10 11Building SoQt on Mac OS X should be straightforward. If it isn't, we 12consider this a bug, so please let us know and we'll be happy to fix it. 13 14If you install Coin from the binary SDK, please note that you also 15have to install the CoinTools.pkg, since the coin-config utility is 16needed by SoQt/configure. 17 18SoQt is installed as SoQt.framework by default. For more information 19about frameworks, please refer to the README.MACOSX file that comes 20with Coin. 21 22Note that we do not support Mac OS 10.0.x. It will probably work just 23fine if you compile SoQt yourself, but we don't guarantee that. Please 24upgrade at least to 10.1, you will be amazed by the increase in 25performance and stability. 26 27 28Qt/Mac vs. Qt/X11 29================= 30 31SoQt is dependent on Trolltech's Qt library. On Mac OS X, you have two options: 32 331. Use the native Qt/Mac 342. Use X11 and Qt/X11 35 36Qt/Mac is the Mac OS X native implementation of Qt. This will usually 37be your first choice, since it does not require any additional 38software to be installed, and provides the full Aqua look'n'feel. 39 40Alternatively, you can install Apple's X11 for Mac OS X, and use 41Qt/X11, the version of Qt used on all other UNIX systems. You will 42find instructions on how to do this below. 43 44 45Using SoQt together with the X11 Window system 46============================================== 47 48To use SoQt with X11 and Qt/X11, follow these steps: 49 50 511. Install X11 for Mac OS X. 52 53X11 for Mac OS X offers a complete X Window System implementation for 54running X11-based applications on Mac OS X. It includes the full 55X11R6.6 technology including an X11 window server, Quartz window 56manager, libraries, and basic utilities such as xterm, and is fully 57integrated with Mac OS X. 58 59X11 is not installed by default, but in installer package should be 60included with your Mac OS X CDs. (If X11 is installed, you should be 61able to launch it via /Applications/Utilities/X11.app. If you do not 62have this application, you need to install X11.) 63 64Note that only Apple's X11 is supported. (XDarwin, the X installation 65through fink, or anything else will probably not work.) 66 672. Build and install the X11 version of Coin. 68 69In order to use X11 instead of Quartz/Aqua, use the --enable-darwin-x11 70configure option. You need to build both Coin and SoQt using this option. 71 72So: 73 74 $ /path/to/Coin/configure --enable-darwin-x11 75 $ make && sudo make install 76 773. Install Qt/X11. 78 79SoQt depends on Qt/X11. It does not really matter how you install Qt, 80but I suggest you use fink or DarwinPorts. 81 824. Install SoQt. 83 84Again, use the --enable-darwin-x11 configure option like you did for Coin. 85 86 $ /path/to/SoQt/configure --enable-darwin-x11 87 $ make && sudo make install 88 89That should be all. 90 91 92Common problems (and solutions) 93=============================== 94 95Problems with older versions of Qt/Mac 96--------------------------------------- 97 98The first Qt/Mac releases contained a number of serious bugs that also 99affect SoQt. If you encounter strange behaviour, it might very well be 100that upgrading to the latest version of Qt/Mac will fix the problem. 101 102 103Undefined QTDIR in bash 104----------------------- 105 106Note that if you use bash as your default shell, you must make it read 107your .bashrc file - it does not do that by default. 108 109So if you have defined QTDIR in your ~/.bashrc, and still configure 110fails with because it cannot find Qt, check if QTDIR is actually set: 111 112 % echo $QTDIR 113 114If this is empty, you have a problem. Make sure you are actually using 115bash - 116 117 % echo $SHELL 118 119... and that the content of your ~/.bashrc looks reasonable, something 120like this: 121 122 export QTDIR=/usr/local/qt 123 export PATH=$QTDIR/bin:$PATH 124 export MANPATH=$QTDIR/doc/man:$MANPATH 125 export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$QTDIR/lib 126 127If you are using bash, and your .bashrc is correct, but QTDIR doesn't 128get set, you have to make bash read your .bashrc file. To do that, 129create a file called ~/.bash_profile with the following content: 130 131 if [ -f ~/.bashrc ]; then 132 . ~/.bashrc 133 fi 134 135Open a new Terminal window - things should work now. If you still have 136problems, something else is wrong. In that case, feel free to let us know. 137 138