Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation [2009/09/18 21:44]
admin
documentation [2016/01/25 16:35] (current)
admin [Requirements]
Line 22: Line 22:
 # installing PyOpenGL # installing PyOpenGL
 C:​\Python25\easy_install.exe PyOpenGL</​code>​ C:​\Python25\easy_install.exe PyOpenGL</​code>​
 +
 +
 +
  
  
 ==== Install ==== ==== Install ====
  
-On windows, you may simply install the last ''​exe''​ installer that you can find [[http://​gforge.inria.fr/​frs/?​group_id=773|here]] ​+On windows, you may simply install the last ''​exe''​ installer that you can find [[http://​gforge.inria.fr/​frs/?​group_id=773|here]]. However, distribution are not frequent.
  
 To test it, you may launch examples [Start Menu]/​Programs/​PyQGLViewer/​examples. To test it, you may launch examples [Start Menu]/​Programs/​PyQGLViewer/​examples.
  
 +You can look at the OpenAlea distribution of PyQGLViewer. See the [[http://​openalea.gforge.inria.fr/​|OpenAlea website]].
 +
 +In particular for Linux (Ubuntu mainly) you can install it this way:
 +<code bash>
 +sudo add-apt-repository ppa:​christophe-pradal/​openalea
 +sudo add-apt-repository ppa:​christophe-pradal/​vplants
 +sudo apt-get install pyqglviewer
 +</​code>​
 +
 +It will install a libQGLViewer package and PyQGLViewer. ​
 +
 +For windows,​after download and installing easy_install. You can type
 +<code bash>
 +easy_install -f http:://​openalea.geforge.inria.fr/​pi openalea.deploy
 +alea_install pyqglviewer
 +</​code>​
 +Or use the normal installation of openalea et vplants.
 +
 +This may changed in the future. So look at the OpenAlea documentation to have an update procedure.
  
 ===== How to build and install the project from sources ===== ===== How to build and install the project from sources =====
Line 41: Line 63:
  
 A directory ''​PyQGLViewer/''​ should be created. A directory ''​PyQGLViewer/''​ should be created.
 +
  
  
Line 49: Line 72:
  
 <note important> ​ <note important> ​
-PyQt4 should be installed with its sip and development files. Binaries version provides by Riverbank ​unfortunatly ​do not include all these development files. You may have to recompile it.+PyQt4 should be installed with its sip and development files. Binaries version provides by Riverbank ​unfortunately ​do not include all these development files. You may have to recompile it.
 </​note>​ </​note>​
  
-=== Building ​a custom version ​of QGLViewer ===+=== Building ​ of QGLViewer === 
 + 
 +To build ''​PyQGlViewer'',​ you need to have libQGLViewer.  
 +It is part of most Linux distribution. On Mac, it comes with macports. On Windows, with Cygwin. 
 + 
 +If it is not the case or if you want to use a more recent version of the lib. 
 +You  will need to build it from sources.
  
-To build ''​PyQGlViewer'',​ you need to build a customized version of +You should first download a version of the sources:
-libQGLViewer. ​You should first download a version of the sources:+
  
 [[http://​artis.imag.fr/​~Gilles.Debunne/​QGLViewer/​download.html|http://​artis.imag.fr/​~Gilles.Debunne/​QGLViewer/​download.html]] [[http://​artis.imag.fr/​~Gilles.Debunne/​QGLViewer/​download.html|http://​artis.imag.fr/​~Gilles.Debunne/​QGLViewer/​download.html]]
Line 61: Line 89:
 Unzip the archive on your disk. For instance Unzip the archive on your disk. For instance
 <code bash>tar xvzf libQGLViewer-x.x.x.tar.gz </​code>​ <code bash>tar xvzf libQGLViewer-x.x.x.tar.gz </​code>​
- 
-A directory ''​libQGLViewer-x.x.x''​ should be created. You have to compile the sources it. To be compatible with SIP, 
-you first need to patch these sources. ​ 
- 
-The patch file ''​libQGLViewer-x.x.x-py.patch''​ can been found in ''​PyQGLViewer/​src''​ dir.  
- 
-<note info> ​ 
-For info, it has been build with the following command 
-<code bash>​diff -abur ../​libQGLViewer-x.x.x . > libQGLViewer-x.x.x-py.patch </​code>​ 
- 
-For windows, the ''​patch''​ and ''​diff''​ tools can in the [[http://​gnuwin32.sourceforge.net/​packages.html|gnuwin32 project]] 
- 
-</​note>​ 
- 
-To apply this patch, you should go in the parent directory of ''​libQGLViewer-x.x.x''​ 
-and invoke the command 
-<code bash>cd libQGLViewer-x.x.x 
-patch -p 0 -i ../​PyQGLViewer/​src/​libQGLViewer-x.x.x-py.patch ​ </​code>​ 
- 
-<note important> ​ 
-The patch file has been built on windows sources. The end of line character is different on unix systems. 
-On linux, you may thus have to convert first the patch file to unix convention with the following comand. 
- 
-<code bash>​dos2unix libQGLViewer-x.x.x-py.patch </​code>​ 
- 
-</​note>​ 
- 
-<​note> ​ 
-Previous patches with lower versions than 2.3.4 where built from above repository. Thus to apply them you had to call 
-<code bash>​patch -p 0 -i PyQGLViewer/​src/​libQGLViewer-x.x.x-py.patch ​ </​code>​ 
-However they were not reusable from one version to the other. 
-</​note>​ 
  
 Source are now ready to compile. ​ Source are now ready to compile. ​
Line 102: Line 98:
 </​code>​ </​code>​
 On windows to install the lib you should copy the ''​QGLViewer2.dll''​ On windows to install the lib you should copy the ''​QGLViewer2.dll''​
-in library repository such as ''​C:\WINDOWS\system32''​+in library repository such as ''​%QTDIR%\bin''​
  
-<code bash>​copy release\QGLViewer2.dll ​C:\WINDOWS\system32+<code bash>​copy release\QGLViewer2.dll ​%QTDIR%\bin 
 +copy release\QGLViewer2.lib %QTDIR%\lib
 </​code>​ </​code>​
  
Line 221: Line 218:
 === Version === === Version ===
  
-You can check the version of the QGLViewer with global hexadecimal value ''​QGLViewerVersion''​.+You can check the version of the QGLViewer with the global hexadecimal value ''​QGLViewerVersion''​.
 Moreover, the following convenience function gives the version as a string: Moreover, the following convenience function gives the version as a string:
  
 <code python>​def QGLViewerVersionString():​ <code python>​def QGLViewerVersionString():​
     """​ Return version of QGLViewer in a string format """</​code>​     """​ Return version of QGLViewer in a string format """</​code>​
 +
 +You can also check the version of the wrappers with the global hexadecimal value ''​_ _version_ _''​
 +or the function ''​PyQGLViewerVersionString''​ for the string version.
  
  
 
Back to top
documentation.1253303070.txt.gz · Last modified: 2009/09/18 21:44 by admin
Valid CSS Driven by DokuWiki Valid XHTML 1.0