|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +MAYAQTBUILD="`dirname \"$0\"`" # Relative |
| 4 | +export MAYAQTBUILD="`( cd \"$MAYAQTBUILD\" && pwd )`" # Absolutized and normalized |
| 5 | +pushd $MAYAQTBUILD |
| 6 | + |
| 7 | +export MAYA_LOCATION=/Applications/Autodesk/maya2014 |
| 8 | +export QTDIR=$MAYA_LOCATION/Maya.app/Contents |
| 9 | +export QMAKESPEC=$QTDIR/mkspecs/macx-g++ |
| 10 | +export INCDIR_QT=$MAYA_LOCATION/devkit/include/Qt |
| 11 | +export LIBDIR_QT=$QTDIR/MacOS |
| 12 | + |
| 13 | +if [ ! -f $QMAKESPEC/qmake.conf ]; |
| 14 | +then |
| 15 | + echo "You need to install qt-4.8.2-64-mkspecs.tar.gz in $QTDIR/mkspecs !" |
| 16 | + exit |
| 17 | +fi |
| 18 | +if [ ! -f $INCDIR_QT/QtCore/qdir.h ]; |
| 19 | +then |
| 20 | + echo "You need to uncompress $MAYA_LOCATION/devkit/include/qt-4.8.2-include.tar.gz in $INCDIR_QT !" |
| 21 | + exit |
| 22 | +fi |
| 23 | +# qt.conf - /Applications/Autodesk/maya2014/Maya.app/Contents/Resources |
| 24 | +if [ ! -f $QTDIR/bin/qt.conf ]; |
| 25 | +then |
| 26 | + echo "You need to copy $QTDIR/Resources/qt.conf in $QTDIR/bin !" |
| 27 | + exit |
| 28 | +fi |
| 29 | + |
| 30 | +test=`grep "Data=../.." $QTDIR/bin/qt.conf` |
| 31 | +if [ ! -z "$test" ]; |
| 32 | +then |
| 33 | + echo "You need to edit $QTDIR/bin/qt.conf to use 'Data=..'" |
| 34 | + exit |
| 35 | +fi |
| 36 | +test=`grep "Headers=../../include" $QTDIR/bin/qt.conf` |
| 37 | +if [ ! -z "$test" ]; |
| 38 | +then |
| 39 | + echo "You need to edit $QTDIR/bin/qt.conf to use 'Headers=../../../devkit/include/Qt'" |
| 40 | + exit |
| 41 | +fi |
| 42 | +test=`grep "Libraries=../lib" $QTDIR/bin/qt.conf` |
| 43 | +if [ ! -z "$test" ]; |
| 44 | +then |
| 45 | + echo "You need to edit $QTDIR/bin/qt.conf to use 'Libraries =../MacOS'" |
| 46 | + exit |
| 47 | +fi |
| 48 | +test=`grep "Plugins = qt-plugins" $QTDIR/bin/qt.conf` |
| 49 | +if [ ! -z "$test" ]; |
| 50 | +then |
| 51 | + echo "You need to edit $QTDIR/bin/qt.conf to use 'Plugins=../qt-plugins'" |
| 52 | + exit |
| 53 | +fi |
| 54 | +test=`grep "Translations = qt-translations" $QTDIR/bin/qt.conf` |
| 55 | +if [ ! -z "$test" ]; |
| 56 | +then |
| 57 | + echo "You need to edit $QTDIR/bin/qt.conf to use 'Translations=../qt-translations'" |
| 58 | + exit |
| 59 | +fi |
| 60 | + |
| 61 | +for mod in Core Declarative Designer DesignerComponents Gui Help Multimedia Network OpenGL Script ScriptTools Sql Svg WebKit Xml XmlPatterns |
| 62 | +do |
| 63 | + if [ ! -f $QTDIR/MacOS/libQt${mod}.dylib ]; |
| 64 | + then |
| 65 | + echo "You need to copy a fake Qt$mod dylib - cp $QTDIR/MacOS/Qt$mod $QTDIR/MacOS/libQt${mod}.dylib !" |
| 66 | + #cp $QTDIR/MacOS/Qt$mod $QTDIR/MacOS/libQt${mod}.dylib |
| 67 | + exit |
| 68 | + fi |
| 69 | +done |
| 70 | +if [ ! -f $QTDIR/MacOS/libphonon.dylib ]; |
| 71 | +then |
| 72 | + echo "You need to copy a fake phonon dylib - cp $QTDIR/MacOS/phonon $QTDIR/MacOS/libphonon.dylib !" |
| 73 | + #cp $QTDIR/MacOS/phonon $QTDIR/MacOS/libphonon.dylib |
| 74 | + exit |
| 75 | +fi |
| 76 | + |
| 77 | +export DYLD_LIBRARY_PATH=$QTDIR/MacOS |
| 78 | +export DYLD_FRAMEWORK_PATH=$QTDIR/Frameworks |
| 79 | + |
| 80 | +export SIPDIR=$MAYAQTBUILD/sip-4.14.5 |
| 81 | +export PYQTDIR=$MAYAQTBUILD/PyQt-mac-gpl-4.10 |
| 82 | + |
| 83 | +pushd $PYQTDIR |
| 84 | +export PATH=$QTDIR/bin:$PATH |
| 85 | +$QTDIR/bin/mayapy ./configure.py LIBDIR_QT=$LIBDIR_QT INCDIR_QT=$INCDIR_QT MOC=$QTDIR/bin/moc -w --no-designer-plugin -g |
| 86 | +make -j 8 |
| 87 | +sudo make install |
| 88 | +popd |
| 89 | + |
| 90 | +popd |
0 commit comments