From: san Date: Wed, 3 Dec 2008 13:19:00 +0000 (+0000) Subject: Debugging Python initialization X-Git-Tag: PARAVIS_TEST~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da6d8fb0bccd1fc8bd9111f72c2298f2141bff95;p=modules%2Fparavis.git Debugging Python initialization --- diff --git a/adm_local/unix/config_files/check_ParaView.m4 b/adm_local/unix/config_files/check_ParaView.m4 index 69f6a80d..5c311f88 100644 --- a/adm_local/unix/config_files/check_ParaView.m4 +++ b/adm_local/unix/config_files/check_ParaView.m4 @@ -90,7 +90,6 @@ fi LOCAL_INCLUDES="$OGL_INCLUDES" LOCAL_LIBS="-lvtksys -lvtkzlib -lvtkpng -lvtkjpeg -lvtktiff -lvtkexpat -lvtksqlite -lvtkmetaio -lvtkverdict -lvtkNetCDF -lvtkDICOMParser -lvtkfreetype -lvtkftgl -lvtkexoIIc -lvtkhdf5 -lvtklibxml2 -lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid -lvtkParallel -lvtkWidgets -lvtkClientServer -lvtkCommonCS -lvtkFilteringCS -lvtkIOCS -lvtkImagingCS -lvtkGraphicsCS -lvtkGenericFiltering -lvtkGenericFilteringCS -lvtkRenderingCS -lvtkHybridCS -lvtkParallelCS -lvtkPVCommandOptions -lKWCommon -lvtkInfovis -lvtkInfovisCS -lvtkPVServerCommon -lvtkPVServerCommonCS -lvtkCommonPythonD -lvtkFilteringPythonD -lvtkIOPythonD -lXdmf -lvtkXdmf -lvtkXdmfCS -lvtkWidgetsCS -lvtkVolumeRendering -lvtkVolumeRenderingCS -lvtkPVFilters -lvtkPVFiltersCS -lvtkViews -lvtkPVServerManagerPythonD -lvtkPVServerCommonPythonD -lvtkPVPythonInterpretor -lvtkPVServerManager -lQVTK -lpqWidgets -lQtTesting -lQtChart -lpqCore -lQtPython -lpqComponents $LXLIB -lX11 -lXt" -TRY_LINK_LIBS="$LOCAL_LIBS" dnl VTK install dir if test -z $with_paraview ; then @@ -128,9 +127,7 @@ fi LOCAL_INCLUDES="-I$PVSRCHOME/VTK/Common -I$PVSRCHOME/Qt/Core -I$PVSRCHOME/Qt/Components -I$PVSRCHOME/Servers/Filters -I$PVSRCHOME/Servers/Common -I$PVSRCHOME/Servers/Filters -I$PVSRCHOME/Servers/ServerManager -I$PVSRCHOME/Utilities/VTKClientServer -I$PVSRCHOME/VTK/Filtering -I$PVSRCHOME/VTK/GenericFiltering -I$PVSRCHOME/VTK/Graphics -I$PVSRCHOME/VTK/Hybrid -I$PVSRCHOME/VTK/Imaging -I$PVSRCHOME/VTK/Infovis -I$PVSRCHOME/VTK/IO -I$PVSRCHOME/VTK/Parallel -I$PVSRCHOME/VTK/Rendering -I$PVSRCHOME/VTK/Utilities -I$PVSRCHOME/VTK/Views -I$PVSRCHOME/VTK/VolumeRendering -I$PVSRCHOME/VTK/Widgets -I$PVINSTALLHOME/Qt/Core -I$PVINSTALLHOME/Qt/Components -I$PVINSTALLHOME/Utilities/VTKClientServer -I$PVINSTALLHOME/Servers/Common -I$PVINSTALLHOME/Servers/Filters -I$PVINSTALLHOME/Servers/ServerManager -I$PVINSTALLHOME/VTK -I$PVINSTALLHOME/VTK/Common -I$PVINSTALLHOME/VTK/Filtering -I$PVINSTALLHOME/VTK/GenericFiltering -I$PVINSTALLHOME/VTK/Graphics -I$PVINSTALLHOME/VTK/Hybrid -I$PVINSTALLHOME/VTK/Imaging -I$PVINSTALLHOME/VTK/Infovis -I$PVINSTALLHOME/VTK/IO -I$PVINSTALLHOME/VTK/Parallel -I$PVINSTALLHOME/VTK/Rendering -I$PVINSTALLHOME/VTK/Utilities -I$PVINSTALLHOME/VTK/Views -I$PVINSTALLHOME/VTK/VolumeRendering -I$PVINSTALLHOME/VTK/Widgets $LOCAL_INCLUDES" -#LOCAL_LIBS="-L$PVINSTALLHOME/bin -lvtksys -lvtkzlib -lvtkpng -lvtkjpeg -lvtktiff -lvtkexpat -lvtksqlite -lvtkmetaio -lvtkverdict -lvtkNetCDF -lvtkDICOMParser -lvtkfreetype -lvtkftgl -lvtkexoIIc -licet -licet_mpi -licet_strategies $LOCAL_LIBS" - -TRY_LINK_LIBS="-L$PVINSTALLHOME/bin -lvtksys $TRY_LINK_LIBS" +LOCAL_LIBS="-L$PVINSTALLHOME/bin $LOCAL_LIBS" dnl vtk headers CPPFLAGS_old="$CPPFLAGS" @@ -149,7 +146,7 @@ then AC_MSG_CHECKING(linking ParaView component library) LIBS_old="$LIBS" - LIBS="$LIBS $QT_LIBS $TRY_LINK_LIBS" + LIBS="$LIBS $QT_LIBS $LOCAL_LIBS" CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $QT_INCLUDES $PARAVIEW_INCLUDES" @@ -173,8 +170,7 @@ then AC_MSG_WARN(unable to link with ParaView component library) else AC_MSG_RESULT(yes) - #PARAVIEW_LIBS="$LOCAL_LIBS" - PARAVIEW_LIBS="$TRY_LINK_LIBS" + PARAVIEW_LIBS="$LOCAL_LIBS" fi AC_MSG_RESULT(for ParaView: $paraview_ok) diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 20e85cea..15aee11a 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -169,70 +169,17 @@ void PVGUI_Module::initialize( CAM_Application* app ) { LightApp_Module::initialize( app ); + // Uncomment to debug ParaView initialization + // "aa" used instead of "i" as GDB doesn't like "i" variables :) /* - int i = 1; - while( i ){ - i = i; + int aa = 1; + while( aa ){ + aa = aa; } */ - + pvInit(); - /* - createAction( lgLoadFile, tr( "TOP_LOAD_FILE" ), QIcon(), tr( "MEN_LOAD_FILE" ), - tr( "STB_LOAD_FILE" ), 0, desk, false, this, SLOT( onLoadFile() ) ); - createAction( lgDisplayLine, tr( "TOP_DISPLAY_LINE" ), QIcon(), tr( "MEN_DISPLAY_LINE" ), - tr( "STB_DISPLAY_LINE" ), 0, desk, false, this, SLOT( onDisplayLine() ) ); - createAction( lgEraseLine, tr( "TOP_ERASE_LINE" ), QIcon(), tr( "MEN_ERASE_LINE" ), - tr( "STB_ERASE_LINE" ), 0, desk, false, this, SLOT( onEraseLine() ) ); - createAction( lgSaveFile, tr( "TOP_SAVE_FILE" ), QIcon(), tr( "MEN_SAVE_FILE" ), - tr( "STB_SAVE_FILE" ), 0, desk, false, this, SLOT( onSaveFile() ) ); - createAction( lgEditLine, tr( "TOP_EDIT_LINE" ), QIcon(), tr( "MEN_EDIT_LINE" ), - tr( "STB_EDIT_LINE" ), 0, desk, false, this, SLOT( onEditLine() ) ); - createAction( lgAddLine, tr( "TOP_ADD_LINE" ), QIcon(), tr( "MEN_ADD_LINE" ), - tr( "STB_ADD_LINE" ), 0, desk, false, this, SLOT( onAddLine() ) ); - createAction( lgDelLine, tr( "TOP_DEL_LINE" ), QIcon(), tr( "MEN_DEL_LINE" ), - tr( "STB_DEL_LINE" ), 0, desk, false, this, SLOT( onDelLine() ) ); - createAction( lgClear, tr( "TOP_CLEAR_ALL" ), QIcon(), tr( "MEN_CLEAR_ALL" ), - tr( "STB_CLEAR_ALL" ), 0, desk, false, this, SLOT( onClear() ) ); - - int aFileMnu = createMenu( tr( "MEN_FILE" ), -1, -1 ); - createMenu( separator(), aFileMnu, -1, 10 ); - createMenu( lgLoadFile, aFileMnu, 10 ); - createMenu( lgSaveFile, aFileMnu, 10 ); - - int aLightMnu = createMenu( tr( "MEN_LIGHT" ), -1, -1, 50 ); - createMenu( lgAddLine, aLightMnu, 10 ); - createMenu( lgEditLine, aLightMnu, 10 ); - createMenu( lgDelLine, aLightMnu, 10 ); - createMenu( separator(), aLightMnu, -1, 10 ); - createMenu( lgClear, aLightMnu, 10 ); - - QString rule = "(client='ObjectBrowser' or client='OCCViewer') and selcount=1 and type='TextLine' and !empty"; - - popupMgr()->insert ( action( lgDisplayLine ), -1, 0 ); - popupMgr()->setRule( action( lgDisplayLine ), rule + " and !visible" ); - - popupMgr()->insert ( action( lgEraseLine ), -1, 0 ); - popupMgr()->setRule( action( lgEraseLine ), rule + " and activeView='OCCViewer' and visible" ); - - rule = "client='ObjectBrowser' and selcount=1 and type='TextLine'"; - - popupMgr()->insert ( action( lgEditLine ), -1, 0 ); - popupMgr()->setRule( action( lgEditLine ), rule ); - - popupMgr()->insert ( action( lgAddLine ), -1, 0 ); - popupMgr()->setRule( action( lgAddLine ), rule ); - - popupMgr()->insert ( separator(), -1, 0 ); - - popupMgr()->insert ( action( lgDelLine ), -1, 0 ); - popupMgr()->setRule( action( lgDelLine ), rule ); - - rule = "client='ObjectBrowser'"; - - popupMgr()->insert ( action( lgClear ), -1, 0 ); - popupMgr()->setRule( action( lgClear ), rule );*/ } /*! @@ -242,8 +189,7 @@ void PVGUI_Module::initialize( CAM_Application* app ) void PVGUI_Module::windows( QMap& m ) const { m.insert( LightApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea ); - // TODO: creation of Python console leads to SIGSEGV on Python initialization... - //m.insert( LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea ); + m.insert( LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea ); // ParaView diagnostic output redirected here m.insert( LightApp_Application::WT_LogWindow, Qt::BottomDockWidgetArea ); }