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