Difference between revisions of "Compiling from Source"
(→Unix) |
(→Unix) |
||
Line 22: | Line 22: | ||
* Python interface: Python, SWIG | * Python interface: Python, SWIG | ||
+ | * Renderer: VTK | ||
+ | * Export: OpenCascade | ||
+ | * GUI: wxWidgets, Renderer, Python interface | ||
+ | * Unit tests: CPPUnit | ||
If you want to get the source code from the Subversion repository (recommended) you will need to following the instructions below. Alternatively the stable source code can be downloaded as a tarball. | If you want to get the source code from the Subversion repository (recommended) you will need to following the instructions below. Alternatively the stable source code can be downloaded as a tarball. | ||
+ | |||
+ | Note: If you are installing to a system where you don't have root access you won't be able to install the software using the default configure script. This is because by default software is installed to the /usr/local directory. If you are not a systems administrator then you will quite rightly not have write access to this folder. All is not lost! You can still install software into your home directory. In order to do this you should always call the configure script with the following parameter: --prefix=$HOME. This goes for all the software to be installed below. All executables will then be placed in ~/bin, libraries in ~/lib, includes in ~/include, etc... | ||
=== Get TexGen from Subversion repository === | === Get TexGen from Subversion repository === | ||
Line 29: | Line 35: | ||
==== Install Subversion ==== | ==== Install Subversion ==== | ||
[http://subversion.tigris.org/servlets/ProjectDocumentList?collapseFolder=260&folderID=260 Download Subversion] and unpack | [http://subversion.tigris.org/servlets/ProjectDocumentList?collapseFolder=260&folderID=260 Download Subversion] and unpack | ||
− | ./configure --with-ssl | + | ./configure --with-ssl ''--prefix=$HOME'' |
make | make | ||
make install | make install | ||
+ | |||
+ | Notes: You will need to install Subversion with SSL support since TexGen is hosted on sourceforge which uses SSL. If you don't configure with the --with-ssh flag you will get an error when trying to checkout TexGen in the next step. | ||
==== Checkout ==== | ==== Checkout ==== | ||
Line 42: | Line 50: | ||
[http://www.cmake.org/HTML/Download.html Download CMake] and unpack | [http://www.cmake.org/HTML/Download.html Download CMake] and unpack | ||
Open shell in extracted folder and type: | Open shell in extracted folder and type: | ||
− | ./configure | + | ./configure ''--prefix=$HOME'' |
make | make | ||
make install | make install | ||
Line 64: | Line 72: | ||
[http://www.python.org/download/ Download Python] and unpack | [http://www.python.org/download/ Download Python] and unpack | ||
Open shell in extracted folder and type: | Open shell in extracted folder and type: | ||
− | ./configure | + | ./configure ''--prefix=$HOME'' |
make | make | ||
make install | make install | ||
Line 70: | Line 78: | ||
[http://www.swig.org/download.html Download SWIG] and unpack | [http://www.swig.org/download.html Download SWIG] and unpack | ||
Open shell in extracted folder and type: | Open shell in extracted folder and type: | ||
− | ./configure | + | ./configure ''--prefix=$HOME'' |
make | make | ||
make install | make install |
Revision as of 16:05, 9 March 2007
More to come on compiling from source...
The following programs are needed to build TexGen:
The following libraries are needed to link to TexGen:
However it is possible to build modules individually without compiling modules you do not need. Refer to the TexGen API for a list of modules and their dependencies.
The latest source release can be downloaded here. Download the latest file release named texgen-3.x.x.tar.gz.
Alternatively the very latest development source can be downloaded using the Subversion version control system. This code may be unstable, it is not recommended unless there is a good reason to have the very latest version. The Subversion server is hosted on SourceForge, instructions on downloading from it are available here.
Unix
To get a minimum build of TexGen with none of the additional modules you only require CMake and of course the standard C++ compiling tools. It is recommended to begin with a minimum build, once that is working try adding modules one at a time. A list of modules along with dependencies is shown below:
- Python interface: Python, SWIG
- Renderer: VTK
- Export: OpenCascade
- GUI: wxWidgets, Renderer, Python interface
- Unit tests: CPPUnit
If you want to get the source code from the Subversion repository (recommended) you will need to following the instructions below. Alternatively the stable source code can be downloaded as a tarball.
Note: If you are installing to a system where you don't have root access you won't be able to install the software using the default configure script. This is because by default software is installed to the /usr/local directory. If you are not a systems administrator then you will quite rightly not have write access to this folder. All is not lost! You can still install software into your home directory. In order to do this you should always call the configure script with the following parameter: --prefix=$HOME. This goes for all the software to be installed below. All executables will then be placed in ~/bin, libraries in ~/lib, includes in ~/include, etc...
Get TexGen from Subversion repository
Install Subversion
Download Subversion and unpack
./configure --with-ssl --prefix=$HOME make make install
Notes: You will need to install Subversion with SSL support since TexGen is hosted on sourceforge which uses SSL. If you don't configure with the --with-ssh flag you will get an error when trying to checkout TexGen in the next step.
Checkout
svn co https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen
Compile source
Install CMake
Download CMake and unpack Open shell in extracted folder and type:
./configure --prefix=$HOME make make install
Compile TexGen core
Open shell in TexGen and type:
mkdir bin cd bin ccmake ../
Press 'c', when a warning pops up press 'e' to close it. You will now need to specify which components of TexGen to build and where their dependencies can be found. Use the up and down arrows to move the caret and press enter to modify options. In this way switch off BUILD_GUI, BUILD_PYTHON_INTERFACE and BUILD_RENDERER. If you want to install to your home directory also change the CMAKE_INSTALL_PREFIX to ~/.
Now press 'c' again to update the changes.
Hopefully now that all the additional modules have been switched off no errors will be shown. Press 'g' to generate the makefiles and exit. Now type:
make make install
Compiling optional modules
Python interface
Download Python and unpack Open shell in extracted folder and type:
./configure --prefix=$HOME make make install
Download SWIG and unpack Open shell in extracted folder and type:
./configure --prefix=$HOME make make install
Open shell at TexGen/bin folder and type:
ccmake ../
Use the up and down arrows to reach BUILD_PYTHON_INTERFACE and press Enter to switch it on. Then press 'c' to configure. You will probably get a warning saying you need to specify the location of SWIG and/or Python, press 'e' to close it.
Set the PYTHON_INCLUDE_PATH, PYTHON_LIBRARY, PYTHON_SITEPACKAGES_DIR, SWIG_DIR and SWIG_EXECUTABLE parameters correctly where necessary. If you have installed packages to your home directory then they should look something like this:
PYTHON_INCLUDE_PATH: ~/include/python2.5 PYTHON_SITEPACKAGES_DIR: ~/lib/python2.5/site-packages SWIG_DIR: ~/bin SWIG_EXECUTABLE: ~/bin/swig
Once that is done press 'c' again. You may need perform this process over several iterations. When everything is set correctly press 'g' to generate the makefiles.
Now type:
make make install