doc:devel:vtk
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:devel:vtk [2013/10/02 17:02] – [Windows : Release & Debug / Wrapper vtk-python (r&d) / Marlène & Luc] papeleux | doc:devel:vtk [2016/03/30 15:23] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
memo comment compiler vtk (5.10.1) pour les Libs | memo comment compiler vtk (5.10.1) pour les Libs | ||
+ | |||
+ | |||
+ | ===== Windows : Release & Debug / Wrapper vtk-python (r&d) / Luc (version 140109) ===== | ||
+ | |||
+ | * Détarer les sources : VTK\vtk-5.10.1 | ||
+ | * Créer le répertoire de compilation : VTK\VTKBuild | ||
+ | * Modifier les sources VTK : | ||
+ | * VTK Debug : ajout du postfix " | ||
+ | |||
+ | < | ||
+ | # Append the library version information to the library target | ||
+ | # properties. | ||
+ | # block this. | ||
+ | IF(NOT VTK_NO_LIBRARY_VERSION) | ||
+ | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} | ||
+ | VERSION " | ||
+ | SOVERSION " | ||
+ | ) | ||
+ | | ||
+ | |||
+ | SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES} DEBUG_POSTFIX _d ) | ||
+ | </ | ||
+ | |||
+ | * Wrappers Python debug : postfix " | ||
+ | < | ||
+ | # Python extension modules on Windows must have the extension " | ||
+ | # instead of " | ||
+ | # this suffix. | ||
+ | IF(WIN32 AND NOT CYGWIN) | ||
+ | SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES SUFFIX " | ||
+ | SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES DEBUG_POSTFIX " | ||
+ | ENDIF(WIN32 AND NOT CYGWIN) | ||
+ | </ | ||
+ | |||
+ | * installation des wrappers python_d : modifier VTK\vtk-5.10.1\Wrapping\Python\setup.py.in | ||
+ | |||
+ | lignes 85-100 : | ||
+ | < | ||
+ | def get_libs(): | ||
+ | """ | ||
+ | libs = [] | ||
+ | |||
+ | # Select platform-specific components of the module file names. | ||
+ | if os.name == ' | ||
+ | dir = vtk_lib_dir | ||
+ | prefix = ' | ||
+ | suffix = get_config_var(' | ||
+ | else: | ||
+ | dir = vtk_bin_dir.replace('/', | ||
+ | prefix = ' | ||
+ | if vtk_build_type == ' | ||
+ | suffix = ' | ||
+ | else: | ||
+ | suffix = ' | ||
+ | </ | ||
+ | |||
+ | * patcher vtktclutil.cxx pour utilisation tcltk8.6: | ||
+ | http:// | ||
+ | "/ | ||
+ | < | ||
+ | ligne 21 - 24 : | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | extern " | ||
+ | |||
+ | devient 21-30 : | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6) | ||
+ | #define vtkTclGetErrorLine(m) (m-> | ||
+ | #else | ||
+ | #define vtkTclGetErrorLine(m) (Tcl_GetErrorLine(m)) | ||
+ | #endif | ||
+ | |||
+ | extern " | ||
+ | |||
+ | ligne 488-500 : | ||
+ | if (Tcl_GetVar(arg2-> | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | | ||
+ | devient 494-506: | ||
+ | |||
+ | if (Tcl_GetVar(arg2-> | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | |||
+ | ligne 721-732 : | ||
+ | if (Tcl_GetVar(this-> | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | | ||
+ | " | ||
+ | devient 727-739: | ||
+ | if (Tcl_GetVar(this-> | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | vtkGenericWarningMacro(" | ||
+ | | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | * Executer CMake : modifier les options suivante | ||
+ | * BUILD_SHARED_LIBS : ON | ||
+ | * CMAKE_INSTALL_PREFIX : '' | ||
+ | * CMAKE_CXX_MP_FLAG : ON (permet de compiler en parallele en local) | ||
+ | * VTK_DEBUG_LEAKS : OFF (pour une version à distribuer, peut-être ON pour developpement) | ||
+ | * VTK_USE_GL2PS : ON (advanced option) | ||
+ | * VTK_USE_QT : ON | ||
+ | * VTK_WRAP_PYTHON : ON | ||
+ | * VTK_WRAP_TCL : ON | ||
+ | * Les autres options doivent " | ||
+ | |||
+ | |||
+ | * Compiler ALL_BUILD (Debug) (Commencer par debug) | ||
+ | * Installer | ||
+ | * Compiler ALL_BUILD (Release) | ||
+ | * Installer | ||
+ | |||
+ | <note warning> Attention : certains fichiers debug seront écrasés par leur version release, mais normalement c'est les même ... raison pour laquelle on démarre par la version debug </ | ||
+ | |||
+ | |||
+ | * Modifier les chemins relatifs des librairies en variables d' | ||
+ | * remplacer le lieu d' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * idem pour les chemins vers tcl/ | ||
+ | * '' | ||
+ | * includes de vtk_freetype, | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * enlever les chemins absolu vers " | ||
+ | | ||
+ | * Copier le répertoire '' | ||
+ | * Installer les wrappers python (crée le répertoire LibsVS2012\Python\Lib\site_packages\VTK-5.10.1-py2.6.egg): | ||
+ | * ouvrir une invite de commande et aller dans '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * Vérification: | ||
+ | |||
+ | |||
===== Windows : Release & Debug / Wrapper vtk-python (r&d) / Marlène & Luc ===== | ===== Windows : Release & Debug / Wrapper vtk-python (r&d) / Marlène & Luc ===== | ||
Line 225: | Line 412: | ||
* ouvrir une invite de commande et aller dans '' | * ouvrir une invite de commande et aller dans '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
- | + | * Vérification: | |
- | Vérification: | + | |