Commit 8a677cc4 authored by Sylvain Thery's avatar Sylvain Thery

traduction readmes

parent 82d8876f
......@@ -24,7 +24,40 @@ Les applications (Examples et Tutos) sont dans le répertoire Apps
Les binaires sont générés dans le repertoire bin
Des exemples de données:
- fichiers trianbgz
- fichiers png (contenant des images voxel 3D)
- fichiers trianbgz, off, etc
sont accessible à l'adresse suivante:
https://iggservis.u-strasbg.fr/Data/data.zip
=========================================================================================
ENGLISH VERSION
=========================================================================================
Linux dependencies:
install the following packages:
ccmake libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev
To compile CGoGN:
- Go ThirdParty, cd build, type "cmake .." and then make (with -j x if you have x core on your machine)
We can set some option to not compile everything (see the README.TXT in ThirdParty)
You can also compile debug by creating a directory that ended Debug build instead
- Go to build and type "cmake .." and then make
Options (Boolean) are also available here:
BUILD_SHARED_LIBS (F) experimental!
WITH_ASSIMP (T)
WITH_NUMERICAL (T)
WITH_ZINRI (T)
WITH_QT (T)
to minimize dependencies and compilation time /
- the compilation of each sub-parts is done by going in the subdirectories of build
Applications (examples and tutorials) are in the Apps directory
The binaries are generated in the bin directory
Examples of data:
- Trianbgz files, off, etc.
are accessible at the following address:
https://iggservis.u-strasbg.fr/Data/data.zip
Principe des applications dans CGoGN_Apps
Principe des applications dans CGoGN_Apps (english version bellow
......@@ -24,7 +24,6 @@ IF (NOT WIN32)
ENDIF (NOT WIN32)
Le CMakeLists (Release par exemple) doit ensuite contenir:
SET(CMAKE_BUILD_TYPE Release)
......@@ -66,3 +65,80 @@ ici WITH_QT, WITH_ASSIMP, WITH_NUMERICAL, WITH_ZINRI.
Ceci ajoutera automatiquement tout ce qu'il faut aux variables COMMON_INCLUDES
et COMMON_LIBS.
On peut aussi utiliser cmake avec l'option -D (moins pratique).
=========================================================================================
ENGLISH VERSION
=========================================================================================
Create a directory CGoGN_Apps where you want. Inside create subdirectories, one for each application.
The CMakeLists.txt to the root of the application must begin with
cmake_minimum_required(VERSION 2.8)
PROJECT(NOM_DE_L_APPLICATION)
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN CACHE STRING "CGoGN root dir")
INCLUDE(${CGoGN_ROOT_DIR}/apps_cmake.txt)
The .. / .. / CGoGN corresponds to the relative path to your version of CGoGN
(here placed at the same level as CGoGN_Apps)
If you want to do in release and debug directories:
add_subdirectory(${CMAKE_SOURCE_DIR}/Release Release)
IF (NOT WIN32)
add_subdirectory(${CMAKE_SOURCE_DIR}/Debug Debug)
ENDIF (NOT WIN32)
The CMakeLists (here in Release) must then contain:
SET(CMAKE_BUILD_TYPE Release)
IF(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) )
ELSE (WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/Release/ )
ENDIF (WIN32)
# Watch out for the debug version, two solutions:
# Debug and Release to be if you want to use ThirdParty in release version
# or Debug only, but you have to compile ThirdParty in debug
include_directories(
${CGoGN_ROOT_DIR}/include # for CGoGN
${COMMON_INCLUDES} # for thirdparty & system
${CMAKE_CURRENT_SOURCE_DIR} # for application
${CMAKE_CURRENT_BINARY_DIR} # for qt (ui,moc,etc.) if necessary
)
# for a QT application
QT4_WRAP_UI( source_ui ../source.ui )
QT4_WRAP_CPP( source_moc ../source.h )
add_executable( mon_exec
${CMAKE_SOURCE_DIR}/mon_source.cpp
# for a QT application
${source_moc}
${source_ui}
)
target_link_libraries( mon_exec ${CGoGN_LIBS_R} ${COMMON_LIBS})
To compile the cleanest way is to build a directory, to go inside and make ccmake .. (I have written "..")
ccmake (or an equivalent type cmake-gui) is used to update the variables, WITH_QT here, WITH_ASSIMP,
WITH_NUMERICAL, WITH_ZINRI.
This will automatically add it all the variables COMMON_INCLUDES and COMMON_LIBS.
You can also use cmake with -D option (less convenient).
Pour utiliser Eclipse (testé avec la version Helios, Galileo & Indigo)
English version bellow
* Configurer un projet dans Eclipse :
- Faire un nouveau projet C++
......@@ -57,3 +58,67 @@ Dans Preferences -> Shaders Preferences, on peut désormais configurer certaines
- Installer CMakeEditor pour Eclipse en ajoutant l'URL dans Help -> Install New Software ... : http://cmakeed.sourceforge.net/eclipse/
- Installer et redémarrer
- Dans Preferences -> General -> Editors -> File Associations il est possible d'associer les CMakeLists.txt à ce logiciel d'édition
=========================================================================================
ENGLISH VERSION
=========================================================================================
To use Eclipse (tested with version Helios, Galileo & Indigo)
* Setting up a project in Eclipse:
- Make a new C + + project
- Select Makefile project -> Empty Project
- Choose As "Location": root CGoGN
- Select Toolchain: GCC Linux
* Compilation with the small hammer (icon)
In the project properties:
-> C / C + + Build:
In the configuration Default | Active:
add to Build Directory path /build
you can then add configurations to compile what we want by just changing the Build directory:
CGoGNRelease: build / Release (compile the lib release)
CGoGNDebug: build / Debug (compiles in debug lib)
Apps: build / Apps (compile the examples and tutorials)
Tutorial: Build / Apps / Tutorial (compiles tutorials)
etc. ..
This added to the directory of CGoGN a .project. and .cproject files.
* Inter-dependencies projects and autocompletion
If the project X depends on another project, then:
Project X -> Properties -> Project references: check the project which it depends.
* Qt dependencies:
To avoid Eclipse rejects the Qt syntax (the Qt includes the Q_OBJECT, callbacks):
- Download the Qt plugin "eclipse-integration" http://qt.nokia.com/developer/eclipse-integration/
- Unzip the archive and copy its contents into the installation directory of Eclipse (plugins and features)
- Restart Eclipse at least once with the - clean (proofreading local directories)
Normally in Window-> Preferences of Eclipse, Qt appears in the menu.
- Add the Qt directory (/ usr / bin on Debian / Ubuntu) and the directory include (/ usr/include/qt4).
Then, for each project, add the following includes in Properties -> C / C + + general -> Paths and Symbols
among the C + + includes:
- / Usr/include/qt4
- / Usr/include/qt4/Qt
- / Usr/include/qt4/QtCore
- / Usr/include/qt4/QtGui
- / Usr/include/qt4/QtOpenGL
NOTE: at the bottom of this window, the button "Export Settings" allows you to export the configuration to XML
import it into other projects.
- Finally, a small right-click the project -> Index -> Freshen all files and go.
* Syntax of shaders
- Download and unzip EclipseShaders: http://sourceforge.net/projects/glshaders/
- Copy the directories features and plugins in the eclipse installation directory
- Restart Eclipse at least once with the - clean (proofreading local directories)
Eclipse will now recognize the files. And frag. Green.
To assign other files in the program GLSLeditor:
- Preferences -> General -> Editors -> File Associations
In Preferences -> Shaders Preferences, you can now configure some options related to the shader.
* Syntax highlighting for CMake files
- Install CMakeEditor for Eclipse by adding the URL in Help -> Install New Software ... : Http://cmakeed.sourceforge.net/eclipse/
- Install and restart
- In Preferences -> General -> Editors -> File Associations You can associate the CMakeLists.txt to editing software
......@@ -16,4 +16,22 @@ Pour compiler CGoGN sur MAC (testé sur OS X 10.6)
export LIBRARY_PATH=/opt/local/lib:/usr/X11/lib
=========================================================================================
ENGLISH VERSION
=========================================================================================
To compile CGoGN on MAC (tested on OSX 10.6 and OSX 10.7.2)
1) create a link from sys/malloc to malloc.h in usr/include:
cd /usr/include; sudo ln -s sys/malloc.h .
This solve compilation problems of some linux codes on mac
2) install with macports or homebrew
zlib, glew, boost (sudo port install xxxx)
3) install Qt (http://qt.nokia.com/downloads/)
4) Add if not already done (by homebrew) in bash_profile:
export LD_LIBRARY_PATH=/opt/local/lib
export C_INCLUDE_PATH=/opt/local/include:/usr/X11/include
export CPLUS_INCLUDE_PATH=/opt/local/include:/usr/X11/include
export LIBRARY_PATH=/opt/local/lib:/usr/X11/lib
Compilation sous VisualExpress C++ (english version bellow)
Prérequis:
Visual Studio ou C++ Express (au moins 2005, si possible 2010)
CMake (au moins 2.8)
......@@ -62,3 +64,80 @@ Remarque: gain de performance non négligeable en 64 bits (20/25%)
(Merci à Olivier Génevaux pour son expertise en compilation sous Windows !)
=========================================================================================
ENGLISH VERSION
=========================================================================================
Prerequisites:
Visual Studio and C + + Express (at least 2005, possibly 2010)
CMake (at least 2.8)
Unzip the windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) is the root of CGoGN
Install boost and Qt
Warning installing the binaries of Qt in a version of different compilers (VS2008/VS2010)
allows you to run but not in debug mode!
If you use BoostPro (http://www.boostpro.com) install all versions multithreaded dll
to avoid the pb of compilation.
The safest but longest is to compile Qt yourself and Boost (good luck)
For the "ThirdParty libs"
Run CMake (gui)
Put the path to the root of CGoGN + / ThirdParty sources for
Put the path to the root of CGoGN + / ThirdParty / build to build in release
Put the path to the root of CGoGN + / ThirdParty / buildDebug to build in debug
Under windows the two versions are needed.
The following applies to two directories:
Click on Configure
Choosing the right compiler (your version of Visual C + +)
Change the variables in functions that you want to compile (README.TXT for ThirdParty)
Edit CMAKE_PREFIX_PATH if necessary (see note dependencies)
Click again on Configure
Click on Generate
Go compile under visual (in release)
For CGoGN:
Restart CMake
Put the path to the root of CGoGN for sources
Put the path to the root of CGoGN + / build (for example) to build
Click on Configure
Choosing the right compiler (your version of Visual C + +)
Change the variables as ThirdParty (and CMAKE_PREFIX_PATH if necessary)
Click again on Configure
Click on Generate
Go to Visual and double-click on CGoGN.sln!
For running executables you have to add the path to the dll dependencies in the variable
path environment (or copy the dll in a directory already in the path)
Note Dependencies:
If you want to use your own versions of dependency (Zlib / glew / Boost / Qt)
CMAKE_PREFIX_PATH change (see below)
Attention to Boost the prefix path does not work (use BOOST_ROOT and others if necessary)
Compiling 64-bit:
The libraries and the examples are compiled in 64bit Windows.
Tested with Visual Express C + + 2010 + Windows SDK 7.1
Dependencies are accessible in http://iggservis.u-strasbg.fr/Data/dependencies64.zip
Caution must be changed and select projects in Windows7.1SDK tools platform
in Configuration / General, to use the correct compiler and lib related.
Note: significant performance gain in 64-bit (20/25%)
(Thanks to Olivier Génevaux for its expertise in compilation under Windows!)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment