Maya 2012 PyQt4 x86
2011/04/20
Download: PyQt 4.8.3 x86 (compiled against Qt 4.7.1) for Maya 2012
x64: Nathan Horne compiled a version, available on his website
In case you want to build it yourself, here’s the guide (based on Ozgur Yilmaz’s guide): The final build will include everything that you’ll find in the default PyQt installer.
Pre-requisites:
- sip source (e.g. 4.12.1)
- qscintilla2 source (e.g. 2.5.1)
- pyqt4 source (e.g. 4.8.3)
- Nullsoft installer maker
- MySQL Community Server 5.x (download the version that has -win32 in its name)
- OpenSSL (e.g. 1.0.0d)
- Qt 4.7.1 pre-compiled LGPL libraries (except you want to compile the libraries yourself)
- (get the Qt SDK if you don’t want to use the pre-compiled libraries and compile them yourself instead)
- Python 2.6
- Perl (OpenSSL needs this to compile)
- MS Visual C++ Express 2008
Unpack everything except Perl and Python into the directory c:\qt. Put Python in c:\python26 for convenience. Perl can be installed anywhere. Make sure python.exe and perl.exe are in the PATH.
Compiling:
Open up the Visual Studio 2008 x86 Command Prompt from start menu/programs/etc. First we need to set some additional environment variables:
-
set PATH=c:\qt\4.7.1\bin;%PATH%
-
set LIB=c:\qt\4.7.1\lib;%LIB%
-
set INCLUDE=c:\qt\4.7.1\include;%INCLUDE%
-
set QMAKESPEC=c:\qt\4.7.1\mkspecs\win32-msvc2008
-
set QTDIR=c:\qt\4.7.1\qt
Compile SIP:
-
cd sip-4.12.1
-
python configure.py -p win32-msvc2008
-
nmake
-
nmake install
Compile PyQt4:
-
cd PyQt-win-gpl-4.8.3
-
python configure.py -w (answer yes to the question)
-
nmake
-
nmake install
Compile QScintilla:
-
cd QScintilla-gpl-2.5.1\Qt4
-
qmake qscintilla.pro
-
nmake
-
nmake install
-
cd ..\Python
-
python configure.py
-
nmake
-
nmake install
-
cd ..\designer-Qt4
-
qmake designer.pro
-
nmake
-
nmake install
Compile PyQt4 mySQL driver:
-
set LIB=c:\qt\mysql-5.5.11-win32\lib;%LIB%
-
set INCLUDE=c:\qt\mysql-5.5.11-win32\include;%INCLUDE%
-
cd 4.7.1
-
cd src\plugins\sqldrivers\mysql
-
qmake mysql.pro
-
nmake
-
nmake install
Building Qt Translations:
-
cd 4.7.1
-
cd translations
-
qmake translations.pro
-
nmake
Compile OpenSSL: (make sure perl.exe is in your path!)
-
cd openssl-1.0.0d
-
perl Configure VC-WIN32 no-asm --prefix=c:/openssl
-
ms\do_ms
-
nmake -f ms\ntdll.mak
-
nmake -f ms\ntdll.mak install
Creating the installer exe:
In the PyQt folder open PyQt.nsi in a text editor and make the following changes:
-
!define PYQT_PYTHON_MAJOR "2"
-
!define PYQT_PYTHON_MINOR "6"
-
!define PYQT_ARCH "x86"
-
!define MYSQL_SRC_DIR "C:\Qt\mysql-5.5.11-win32"
Now do some file copying…
- In the mysql folder copy all the dll files from the lib folder to the bin folder.
- Copy the sip folder from c:\qt\pyqt-win-gpl-4.8.3 to c:\python26\lib\site-packages\pyqt4.
- Copy sip.exe from c:\Qt\sip-4.12.1\sipgen to c:\python26\lib\site-packages\pyqt4\bin.
- Copy sip.h from c:\Qt\sip-4.12.1\sipgen to c:\python26\lib\site-packages\pyqt4\include.
- the Qt dlls will be copied automatically by the installer
In the explorer right click the nsi file and chose “Compile NSIS Script”.
If all goes well then a installer named PyQt-Py2.6-x86-gpl-4.8.3-1.exe should be created.
Pfew – finally DONE!