PyQt set up for using in Maya

323 views
Skip to first unread message

matthew park

unread,
Oct 28, 2013, 12:55:15 AM10/28/13
to python_in...@googlegroups.com
Hi there, 

I am trying to set up to make PyQt is available in maya script editor. 
Since there is no handy installer for 2014, I had to do manually with a guide document.
Here is what I did.
Installed Qt4.8.2
configured opensourced Qt in visual studios prompt

downloaded 'sip-4.14.5' and 'PyQt-win-gpl-4.10' unzip them in one folder
c:\Maya2014Scripts\sip-4.14.5
c:\Maya2014Scripts\PyQt-win-gpl-4.10

Edited qt.confile under (C:\Program Files\Autodesk\Maya2014\bin)
[Paths] 
Prefix= Libraries=../lib
 Binaries=../bin
 Headers=../include/Qt
 Data=../ 
Plugins=../qt-plugins
Translations=../qt-translations


Unzip the /include/qt-4.8.2-64-include.tar.gz into /include/Qt
Unzip the /mkspecs/qt-4.8.2-64-mkspecs.tar.gz into /mkspecs


Build and install SIP and PyQt
From this point, I've kept on getting error about complaining 'path not found = %~dp' for SIP and no more proceeded.
Please help me out!
Basically I don't know how to install and build for PyQt and SIP for Maya2014.
I got batch script from the instruction page as below, but don't know where I execute this script in. Just command prompt or visual stuidos prompt? I don't know. Any specific folder, seems like it's visual drive

Here is the script below.

- For SIP

@echo off
set MAYAQTBUILD=%~dp0
set MAYAQTBUILD=%MAYAQTBUILD:~0,-1%
if exist v:\nul subst v: /d
subst v: "%MAYAQTBUILD%"
v:
set SIPDIR=v:\sip-4.14.5
set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0
if [%LIBPATH%]==[] call "%MSVC_DIR%\VC\vcvarsall" amd64
set MAYA_LOCATION=C:\Program Files\Autodesk\Maya2014
set INCLUDE=%INCLUDE%;%MAYA_LOCATION%\include\python2.7;%MAYA_LOCATION%\Python\include
set LIB=%LIB%;%MAYA_LOCATION%\lib
cd %SIPDIR%
"%MAYA_LOCATION%\bin\mayapy" configure.py
nmake
nmake install



- For PyQt
@echo off
set MAYAQTBUILD=%~dp0
set MAYAQTBUILD=%MAYAQTBUILD:~0,-1%
if exist v:\nul subst v: /d
subst v: "%MAYAQTBUILD%"
v:
set MAYA_LOCATION=C:\Program Files\Autodesk\Maya2014
if exist m:\nul subst m: /d
subst m: "%MAYA_LOCATION%"
set MAYA_LOCATION=m:
set QTDIR=%MAYA_LOCATION%
set MSVC_VERSION=2010
set QMAKESPEC=%QTDIR%\mkspecs\win32-msvc%MSVC_VERSION%
if not exist "%QMAKESPEC%\qmake.conf" (
echo "You need to uncompress %MAYA_LOCATION%\mkspecs\qt-4.8.2-64-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.2-64-include.tar.gz in %MAYA_LOCATION%\include\Qt !"
goto :end
)
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'"
goto :end
)
set SIPDIR=v:\sip-4.14.5
set PYQTDIR=v:\PyQt-win-gpl-4.10
set MSVC_DIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0
if [%LIBPATH%]==[] call "%MSVC_DIR%\VC\vcvarsall" amd64
set INCLUDE=%INCLUDE%;%MAYA_LOCATION%\include\python2.7;%MAYA_LOCATION%\Python\include
set LIB=%LIB%;%MAYA_LOCATION%\lib
cd %PYQTDIR%
set PATH=%QTDIR%\bin;%PATH%
"%MAYA_LOCATION%\bin\mayapy" configure.py LIBDIR_QT=%QTDIR%\lib INCDIR_QT=%QTDIR%\include\Qt MOC=%QTDIR%\bin\moc.exe -w --no-designer-plugin
nmake
nmake install
:end
pause



Thanks you very much for your warm hand!!

Matt,

Marcus Ottosson

unread,
Nov 1, 2013, 8:46:01 AM11/1/13
to python_in...@googlegroups.com
Why not just use a pre-packaged binary of PyQt4? :O

Ideally, you'd use the same version as Maya uses, but its no requirement as long as it's close.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMczULaor-R3CArosDFht2r8OwRw0t803Qdnj4xfXpd9e_piOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

Reply all
Reply to author
Forward
0 new messages