├── .gitignore ├── LICENSE ├── README.md ├── doc ├── How to build PyQt Maya 2020.docx └── How to build PyQt Maya 2020.pdf ├── linux ├── getPyQtSources ├── getSipSources ├── pyqt └── sip ├── osx ├── getPyQtSources ├── getSipSources ├── pyqt └── sip ├── tests ├── pyqt5-test.py └── sip-test.py └── win ├── buildAll.bat ├── pyqt.bat ├── setup.bat └── sip.bat /.gitignore: -------------------------------------------------------------------------------- 1 | # Build and Release Folders 2 | bin/ 3 | bin-debug/ 4 | bin-release/ 5 | 6 | # Other files and folders 7 | .settings/ 8 | 9 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` 10 | # should NOT be excluded as they contain compiler settings and other important 11 | # information for Eclipse / Flash Builder. 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Cyrille 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Maya-PyQt-Scripts 2 | Scripts to easily build PyQt for Maya 3 | ## Maya 2020 4 | 5 | Maya 2020 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2020. There are some changes in Maya 2020 and Qt 5.12.5, you may want to check out the new guide if you are going to compile it with Maya 2020. 6 | 7 | You can find more explanations about building PyQt and instructions about using these scripts on the blog at: 8 | 9 | https://around-the-corner.typepad.com/adn/2019/12/how-to-build-pyqt5-for-autodesk-maya-2020.html 10 | 11 | 12 | ## Maya 2019 13 | Maya 2019 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2019. There are some changes since PyQt5.11, you may want to check out the new guide if you are compiling with the latest PyQt5. 14 | 15 | You can find more explanations about building PyQt and instructions about using these scripts on the blog at: 16 | 17 | https://around-the-corner.typepad.com/adn/2019/01/how-to-build-pyqt5-for-autodesk-maya-2019.html 18 | 19 | Thanks to Temujin2887 suggested that --no-designer-plugin could be removed since Maya 2018. If you need the QtDesigner plugin, please modify pyqt script file and remove this flag. 20 | 21 | ## Maya 2018 22 | Maya 2018 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2018 23 | 24 | ## Maya 2017 25 | Maya 2017 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2017 26 | 27 | You can find more explanations about building PyQt and instructions about using these scripts on the blog at: 28 | 29 | http://around-the-corner.typepad.com/adn/2017/06/how-to-build-pyqt5-for-autodesk-maya-2017-64bit.html 30 | 31 | 32 | ## Maya 2016.5 33 | Maya 2016.5 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2016.5 34 | 35 | You can find more explanations about building PyQt and instructions about using these scripts on the blog at: 36 | 37 | http://around-the-corner.typepad.com/adn/2016/10/building-sip-and-pyqt-for-maya-20165.html 38 | 39 | 40 | ## Maya 2016 41 | Maya 2016 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2016. 42 | 43 | You can find more explanations about building PyQt and instructions about using these scripts on the blog at: 44 | 45 | http://around-the-corner.typepad.com/adn/2015/05/building-sip-and-pyqt-for-maya-2016.html 46 | 47 | 48 | ## Maya 2015 49 | Maya 2015 includes most of the tools we need to build PyQt without the need of compiling Qt source & tools - so there is no need to rebuild Qt for Maya 2015. 50 | 51 | You can find more explanations about building PyQt and instructions about using these scripts on the blog at: 52 | 53 | http://around-the-corner.typepad.com/adn/2014/04/building-sip-and-pyqt-for-maya-2015.html 54 | 55 | 56 | ## Maya 2014 57 | You can find the scripts used for building Qt, PyQt, [here](https://github.com/cyrillef/Maya-PyQt-Scripts/releases/tag/v2014.0). 58 | 59 | Maya 2014 is shipping with PySide, therefore there is no more need to build PySide. 60 | 61 | libxml, openSSL, OpenAL, python2.7, qt-4.8.2-64, and tbb are also coming by default in the Maya include and lib folder, so unless you have a very 62 | specific need, you would not need to rebuild any of those libraries like before. 63 | 64 | You can find more explanations about building PyQt and PySide and instructions about using these scripts on the blog at: 65 | 66 | http://around-the-corner.typepad.com/adn/2013/04/building-sip-and-pyqt-for-maya-2014.html 67 | 68 | 69 | ## Maya 2013-5 70 | You can find the scripts used for building Qt, PyQt and PySide for Maya 2013.5, [here](https://github.com/cyrillef/Maya-PyQt-Scripts/releases/tag/v2013.5). 71 | The windows scripts get updated for Maya 2013-5. They are similar to the Maya 2013 procedures and instructions, but you do not need to rebuild openssl this time. 72 | 73 | 74 | ## Maya 2013 75 | You can find the scripts used for building Qt, PyQt and PySide for Maya 2013, [here](https://github.com/cyrillef/Maya-PyQt-Scripts/releases/tag/v2013.0). 76 | You can find more explanations about building PyQt and PySide and instructions about using these scripts on the blog at: 77 | 78 | http://around-the-corner.typepad.com/adn/2012/10/building-qt-pyqt-pyside-for-maya-2013.html 79 | 80 | and 81 | 82 | http://around-the-corner.typepad.com/adn/2012/10/building-qt-pyqt-pyside-for-maya-2013-part-2.html 83 | 84 | 85 | -------- 86 | 87 | ## License 88 | 89 | This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details. 90 | 91 | 92 | ## Written by 93 | 94 | Cyrille Fauvel (Autodesk Developer Network) 95 | Chengxi Li (Autodesk Developer Network) 96 | Lanh Hong (Autodesk Developer Network) 97 | http://www.autodesk.com/adn 98 | http://around-the-corner.typepad.com/
99 | -------------------------------------------------------------------------------- /doc/How to build PyQt Maya 2020.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyrillef/Maya-PyQt-Scripts/1ec16f42b2148fec1928f1a92fcab12f8ac03fa7/doc/How to build PyQt Maya 2020.docx -------------------------------------------------------------------------------- /doc/How to build PyQt Maya 2020.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyrillef/Maya-PyQt-Scripts/1ec16f42b2148fec1928f1a92fcab12f8ac03fa7/doc/How to build PyQt Maya 2020.pdf -------------------------------------------------------------------------------- /linux/getPyQtSources: -------------------------------------------------------------------------------- 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 | wget -c --no-check-certificate https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.13.2/PyQt5-5.13.2.tar.gz 8 | 9 | tar -zxf PyQt5-5.13.2.tar.gz 10 | rm -rf PyQt5-5.13.2.tar.gz 11 | 12 | popd 13 | -------------------------------------------------------------------------------- /linux/getSipSources: -------------------------------------------------------------------------------- 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 | wget -c --no-check-certificate https://www.riverbankcomputing.com/static/Downloads/sip/4.19.19/sip-4.19.19.tar.gz 8 | 9 | tar -zxf sip-4.19.19.tar.gz 10 | rm -rf sip-4.19.19.tar.gz 11 | 12 | popd 13 | -------------------------------------------------------------------------------- /linux/pyqt: -------------------------------------------------------------------------------- 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=/usr/autodesk/maya2020 8 | export QTDIR=$MAYA_LOCATION 9 | export DEVKIT_LOCATION=$MAYA_LOCATION 10 | export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64 11 | export INCDIR_QT=$MAYA_LOCATION/include/Qt 12 | export LIBDIR_QT=$QTDIR/lib 13 | 14 | error=0 15 | if [ ! -f $QMAKESPEC/qmake.conf ]; 16 | then 17 | echo "You need to install qt-5.12.5-mkspecs.tar.gz in $QTDIR/mkspecs !" 18 | error=1 19 | fi 20 | if [ ! -f $INCDIR_QT/QtCore/qdir.h ]; 21 | then 22 | echo "You need to uncompress $MAYA_LOCATION/include/qt-5.12.5-include.tar.gz in $INCDIR_QT !" 23 | error=1 24 | fi 25 | # qt.conf - $QTDIR/bin/qt.conf 26 | if [ ! -f $QTDIR/bin/qt.conf ]; 27 | then 28 | echo "You need to copy $QTDIR/Resources/qt.conf in $QTDIR/bin !" 29 | error=1 30 | fi 31 | 32 | # The grep string should be in single quote('), if it is in double quote (""), 33 | # shell will expand the variable, hence the intension of the below grep will fail 34 | test=`grep 'Headers=$(DEVKIT_LOCATION)/include/Qt' $QTDIR/bin/qt.conf` 35 | if [ -z "$test" ]; 36 | then 37 | echo "You need to edit $QTDIR/bin/qt.conf to use 'Headers=$(DEVKIT_LOCATION)/include/Qt'" 38 | error=1 39 | fi 40 | 41 | if [ $error -eq 1 ]; 42 | then 43 | exit 44 | fi 45 | 46 | export SIPDIR=$MAYAQTBUILD/sip-4.19.19 47 | export PYQTDIR=$MAYAQTBUILD/PyQt5-5.13.2 48 | 49 | pushd $PYQTDIR 50 | export PATH=$QTDIR/bin:$PATH 51 | $QTDIR/bin/mayapy ./configure.py LIBDIR_QT=$LIBDIR_QT INCDIR_QT=$INCDIR_QT MOC=$QTDIR/bin/moc -w --no-designer-plugin 52 | make -j 8 53 | sudo make install 54 | popd 55 | 56 | popd 57 | -------------------------------------------------------------------------------- /linux/sip: -------------------------------------------------------------------------------- 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 SIPDIR=$MAYAQTBUILD/sip-4.19.19 8 | export MAYA_LOCATION=/usr/autodesk/maya2020 9 | 10 | pushd $SIPDIR 11 | $MAYA_LOCATION/bin/mayapy ./configure.py --sip-module PyQt5.sip 12 | make 13 | sudo make install 14 | popd 15 | 16 | popd 17 | -------------------------------------------------------------------------------- /osx/getPyQtSources: -------------------------------------------------------------------------------- 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 | wget -c --no-check-certificate https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.13.2/PyQt5-5.13.2.tar.gz 8 | 9 | tar -zxf PyQt5-5.13.2.tar.gz 10 | rm -rf PyQt5-5.13.2.tar.gz 11 | 12 | popd 13 | -------------------------------------------------------------------------------- /osx/getSipSources: -------------------------------------------------------------------------------- 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 | wget -c --no-check-certificate https://www.riverbankcomputing.com/static/Downloads/sip/4.19.19/sip-4.19.19.tar.gz 8 | 9 | tar -zxf sip-4.19.19.tar.gz 10 | rm -rf sip-4.19.19.tar.gz 11 | 12 | popd 13 | -------------------------------------------------------------------------------- /osx/pyqt: -------------------------------------------------------------------------------- 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/maya2020/Maya.app/Contents 8 | export DEVKIT_LOCATION=/Applications/Autodesk/maya2020 9 | export QTDIR=$DEVKIT_LOCATION/devkit 10 | export QMAKESPEC=$DEVKIT_LOCATION/mkspecs/macx-clang 11 | export INCDIR_QT=$DEVKIT_LOCATION/include/Qt 12 | export LIBDIR_QT=$MAYA_LOCATION/MacOS 13 | 14 | error=0 15 | if [ ! -f $QMAKESPEC/qmake.conf ]; 16 | then 17 | echo "You need to install qt-5.12.5-mkspecs.tar.gz in $QTDIR/mkspecs !" 18 | error=1 19 | fi 20 | if [ ! -f $INCDIR_QT/QtCore/qdir.h ]; 21 | then 22 | echo "You need to uncompress $MAYA_LOCATION/devkit/include/qt-5.12.5-include.tar.gz in $INCDIR_QT !" 23 | error=1 24 | fi 25 | # qt.conf - /Applications/Autodesk/maya2020/Maya.app/Contents/Resources 26 | if [ ! -f $QTDIR/bin/qt.conf ]; 27 | then 28 | echo "You need to copy $QTDIR/Resources/qt.conf in $QTDIR/bin !" 29 | error=1 30 | fi 31 | 32 | test=`grep 'Data=$(DEVKIT_LOCATION)' $QTDIR/bin/qt.conf` 33 | if [ -z "$test" ]; 34 | then 35 | echo "You need to edit $QTDIR/bin/qt.conf to use 'Data=\$(DEVKIT_LOCATION)'" 36 | error=1 37 | fi 38 | test=`grep 'Headers=$(DEVKIT_LOCATION)/include/Qt' $QTDIR/bin/qt.conf` 39 | if [ -z "$test" ]; 40 | then 41 | echo "You need to edit $QTDIR/bin/qt.conf to use 'Headers=\$(DEVKIT_LOCATION)/include/Qt'" 42 | error=1 43 | fi 44 | test=`grep 'Libraries=$(MAYA_LOCATION)/MacOS' $QTDIR/bin/qt.conf` 45 | if [ -z "$test" ]; 46 | then 47 | echo "You need to edit $QTDIR/bin/qt.conf to use 'Libraries=\$(MAYA_LOCATION)/MacOS'" 48 | error=1 49 | fi 50 | 51 | if [ $error -eq 1 ]; 52 | then 53 | exit 54 | fi 55 | 56 | export DYLD_LIBRARY_PATH=$MAYA_LOCATION/MacOS 57 | export DYLD_FRAMEWORK_PATH=$MAYA_LOCATION/Frameworks 58 | 59 | export SIPDIR=$MAYAQTBUILD/sip-4.19.19 60 | export PYQTDIR=$MAYAQTBUILD/PyQt5-5.13.2 61 | 62 | export SIP_EXE=$MAYA_LOCATION/Frameworks/Python.framework/Versions/2.7/bin/sip 63 | export SIP_INCLUDE=$MAYA_LOCATION/Frameworks/Python.framework/Versions/2.7/include/python2.7 64 | 65 | pushd $PYQTDIR 66 | export PATH=$QTDIR/bin:$PATH 67 | 68 | echo 69 | echo Environment 70 | echo ----------- 71 | set 72 | echo ----------- 73 | echo QT Settings 74 | echo ----------- 75 | qmake -query 76 | echo ----------- 77 | echo 78 | $MAYA_LOCATION/bin/mayapy ./configure.py QMAKE_MAC_SDK=macosx10.14 QMAKE_RPATHDIR+=$LIBDIR_QT --sip=$SIP_EXE --sip-incdir=$SIP_INCLUDE -w --no-designer-plugin 79 | make -j 8 80 | sudo make install 81 | popd 82 | 83 | popd 84 | -------------------------------------------------------------------------------- /osx/sip: -------------------------------------------------------------------------------- 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 SIPDIR=$MAYAQTBUILD/sip-4.19.19 8 | export MAYA_LOCATION=/Applications/Autodesk/maya2020 9 | 10 | pushd $SIPDIR 11 | $MAYA_LOCATION/Maya.app/Contents/bin/mayapy ./configure.py --arch=x86_64 --sip-module PyQt5.sip 12 | make 13 | sudo make install 14 | popd 15 | 16 | popd 17 | -------------------------------------------------------------------------------- /tests/pyqt5-test.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from PyQt5.QtWidgets import (QWidget, QToolTip, QPushButton) 3 | from PyQt5.QtGui import QFont 4 | 5 | 6 | class Example(QWidget): 7 | 8 | def __init__(self): 9 | super(Example,self).__init__() 10 | 11 | self.initUI() 12 | 13 | 14 | def initUI(self): 15 | 16 | QToolTip.setFont(QFont('SansSerif', 10)) 17 | 18 | self.setToolTip('This is a QWidget widget') 19 | 20 | btn = QPushButton('Button', self) 21 | btn.setToolTip('This is a QPushButton widget') 22 | btn.resize(btn.sizeHint()) 23 | btn.move(50, 50) 24 | 25 | self.setGeometry(300, 300, 300, 200) 26 | self.setWindowTitle('Tooltips') 27 | self.show() 28 | 29 | 30 | 31 | ex = Example() 32 | 33 | -------------------------------------------------------------------------------- /tests/sip-test.py: -------------------------------------------------------------------------------- 1 | import sip 2 | sip.setapi ('QString', 2) 3 | sip.setapi ('QVariant', 2) 4 | from PyQt4 import QtGui, QtCore 5 | btn =QtGui.QPushButton (QtGui.__file__) 6 | btn.show () 7 | -------------------------------------------------------------------------------- /win/buildAll.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | pushd %~d0 4 | 5 | call "setup.bat" 6 | call "sip.bat" 7 | call "pyqt.bat" 8 | 9 | popd 10 | -------------------------------------------------------------------------------- /win/pyqt.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set XXX=%~dp0 3 | if ["%MAYAPYQTBUILD%"]==[""] call "%XXX%setup.bat" 4 | 5 | set QMAKESPEC=%QTDIR%\mkspecs\%_QMAKESPEC_% 6 | if not exist "%QMAKESPEC%\qmake.conf" ( 7 | echo "You need to uncompress %MAYA_LOCATION%\mkspecs\qt_5.12.5_vc14-mkspecs.zip !" 8 | goto end 9 | ) 10 | if not exist "%MAYA_LOCATION%\include\Qt\QtCore\qdir.h" ( 11 | echo "You need to uncompress %MAYA_LOCATION%\include\qt_5.12.5_vc14-include.zip in %MAYA_LOCATION%\include\Qt !" 12 | goto end 13 | ) 14 | findstr /L /C:"Headers=include/Qt" "%MAYA_LOCATION%\bin\qt.conf" >nul 2>&1 15 | if ERRORLEVEL 1 ( 16 | echo "You need to edit %MAYA_LOCATION%\bin\qt.conf to use 'Headers=include/Qt'" 17 | goto end 18 | ) 19 | findstr /L /C:"-lqtmain -lshell32" "%QTDIR%\mkspecs\common\msvc-desktop.conf" >nul 2>&1 20 | if ERRORLEVEL 1 ( 21 | echo "You need to edit %QTDIR%\mkspecs\common\msvc-desktop.conf to use 'QMAKE_LIBS_QT_ENTRY = -lqtmain -lshell32'" 22 | goto end 23 | ) 24 | if not exist "%MAYA_LOCATION%\include\Qt\qtnfc.disabled" ( 25 | echo "You need to rename %MAYA_LOCATION%\include\Qt\qtnfc to %MAYA_LOCATION\include\Qt\qtnfc.disabled" 26 | goto end 27 | ) 28 | 29 | pushd %PYQTDIR% 30 | 31 | "%MAYA_LOCATION%\bin\mayapy" configure.py --spec %QMAKESPEC% LIBDIR_QT="%QTDIR%\lib" INCDIR_QT="%QTDIR%\include\Qt" MOC="%QTDIR%\bin\moc.exe" --sip="%QTDIR%\Python\sip.exe" --sip-incdir="%QTDIR%\Python\include" -w --no-designer-plugin 32 | nmake 33 | nmake install 34 | popd 35 | 36 | :end 37 | -------------------------------------------------------------------------------- /win/setup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set MAYAVERSION=2020 4 | set ADSKQTVERSION=5.12.5 5 | set SIPVERSION=4.19.19 6 | set PYQTVERSION=5.13.2 7 | set MAYADRIVE=m: 8 | set BUILDDRIVE=v: 9 | 10 | if exist %MAYADRIVE%\nul subst %MAYADRIVE% /d 11 | subst %MAYADRIVE% "C:\Program Files\Autodesk\Maya%MAYAVERSION%" 12 | set MAYA_LOCATION=%MAYADRIVE% 13 | 14 | set MAYAPYQTBUILD=%~dp0 15 | rem Removing trailing \ 16 | set MAYAPYQTBUILD=%MAYAPYQTBUILD:~0,-1% 17 | 18 | if exist %BUILDDRIVE%\nul subst %BUILDDRIVE% /d 19 | subst %BUILDDRIVE% "%MAYAPYQTBUILD%" 20 | 21 | set SIPDIR=%BUILDDRIVE%\sip-%SIPVERSION% 22 | set PYQTDIR=%BUILDDRIVE%\PyQt5-%PYQTVERSION% 23 | rem set ADSKQTDIR=%BUILDDRIVE%\qt-%ADSKQTVERSION% 24 | set QTDIR=%MAYA_LOCATION% 25 | 26 | set PATH=%QTDIR%\bin;%PATH% 27 | set MSVC_VERSION=2017 28 | set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0 29 | set QMAKESPEC=%QTDIR%\mkspecs\win32-msvc 30 | set _QMAKESPEC_=win32-msvc 31 | 32 | if ["%LIBPATH%"]==[""] call "%MSVC_DIR%\VC\vcvarsall" amd64 33 | 34 | set INCLUDE=%INCLUDE%;%MAYA_LOCATION%\include\Python 35 | set LIB=%LIB%;%MAYA_LOCATION%\lib 36 | -------------------------------------------------------------------------------- /win/sip.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set XXX=%~dp0 3 | if ["%MAYAPYQTBUILD%"]==[""] call "%XXX%setup.bat" 4 | 5 | pushd %SIPDIR% 6 | rem "%MAYA_LOCATION%\bin\mayapy" configure-ng.py --spec %_QMAKESPEC_% 7 | "%MAYA_LOCATION%\bin\mayapy" configure.py --sip-module PyQt5.sip 8 | nmake 9 | nmake install 10 | popd 11 | --------------------------------------------------------------------------------