Skip to content

Commit

Permalink
Added changes for PyQt5 build for Maya 2017 under Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayaprakash committed Oct 26, 2016
1 parent a2d6501 commit f6c02a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
25 changes: 14 additions & 11 deletions win/pyqt.bat
Expand Up @@ -4,28 +4,31 @@ if ["%MAYAPYQTBUILD%"]==[""] call "%XXX%setup.bat"

set QMAKESPEC=%QTDIR%\mkspecs\%_QMAKESPEC_%
if not exist "%QMAKESPEC%\qmake.conf" (
echo "You need to uncompress %MAYA_LOCATION%\mkspecs\qt-4.8.6-mkspecs.tar.gz !"
echo "You need to uncompress %MAYA_LOCATION%\mkspecs\qt-5.6.1-mkspecs.tar.gz !"
goto end
)
if not exist "%MAYA_LOCATION%\include\Qt\QtCore\qdir.h" (
echo "You need to uncompress %MAYA_LOCATION%\include\qt-4.8.6-include.tar.gz in %MAYA_LOCATION%\include\Qt !"
echo "You need to uncompress %MAYA_LOCATION%\include\qt-5.6.1-include.tar.gz in %MAYA_LOCATION%\include\Qt !"
goto end
)
findstr /L /C:"Headers=../include/Qt" "%MAYA_LOCATION%\bin\qt.conf" >nul 2>&1
findstr /L /C:"Headers=include/Qt" "%MAYA_LOCATION%\bin\qt.conf" >nul 2>&1
if ERRORLEVEL 1 (
echo "You need to edit %MAYA_LOCATION%\bin\qt.conf to use 'Headers=../include/Qt'"
echo "You need to edit %MAYA_LOCATION%\bin\qt.conf to use 'Headers=include/Qt'"
goto end
)
findstr /L /C:"-lqtmain -lshell32" "%QTDIR%\mkspecs\common\msvc-desktop.conf" >nul 2>&1
if ERRORLEVEL 1 (
echo "You need to edit %QTDIR%\mkspecs\common\msvc-desktop.conf to use 'QMAKE_LIBS_QT_ENTRY = -lqtmain -lshell32'"
goto end
)
if not exist "%MAYA_LOCATION%\include\Qt\qtnfc.disabled" (
echo "You need to rename %MAYA_LOCATION%\include\Qt\qtnfc to %MAYA_LOCATION\include\Qt\qtnfc.disabled"
goto end
)

pushd %PYQTDIR%

pushd pylupdate
del moc_translator.cpp 2> nul
del moc_translator.obj 2> nul
%QTDIR%\bin\moc.exe -o moc_translator.cpp translator.h
popd

"%MAYA_LOCATION%\bin\mayapy" configure.py -p %QMAKESPEC% LIBDIR_QT="%QTDIR%\lib" INCDIR_QT="%QTDIR%\include\Qt" MOC="%QTDIR%\bin\moc.exe" -w --no-designer-plugin
"%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
nmake
nmake install
popd
Expand Down
10 changes: 5 additions & 5 deletions win/setup.bat
@@ -1,9 +1,9 @@
@echo off

set MAYAVERSION=2016.5
set ADSKQTVERSION=4.8.6
set SIPVERSION=4.18
set PYQTVERSION=4.11.4
set MAYAVERSION=2017
set ADSKQTVERSION=5.6.1
set SIPVERSION=4.18.1
set PYQTVERSION=5.7
set MAYADRIVE=m:
set BUILDDRIVE=v:

Expand All @@ -19,7 +19,7 @@ if exist %BUILDDRIVE%\nul subst %BUILDDRIVE% /d
subst %BUILDDRIVE% "%MAYAPYQTBUILD%"

set SIPDIR=%BUILDDRIVE%\sip-%SIPVERSION%
set PYQTDIR=%BUILDDRIVE%\PyQt-win-gpl-%PYQTVERSION%
set PYQTDIR=%BUILDDRIVE%\PyQt5_gpl-%PYQTVERSION%
rem set ADSKQTDIR=%BUILDDRIVE%\qt-%ADSKQTVERSION%
set QTDIR=%MAYA_LOCATION%

Expand Down

0 comments on commit f6c02a9

Please sign in to comment.