# you must define SALOME_ROOT_DIR and SALOME_SITE_DIR (if you need it)
+if test -n KERNEL_ROOT_DIR
+then
+ export PATH=$KERNEL_ROOT_DIR/bin/salome:${PATH}
+ export LD_LIBRARY_PATH=$KERNEL_ROOT_DIR/lib/salome:${LD_LIBRARY_PATH}
+ export PYTHONPATH=${KERNEL_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/$PYTHON_VERSION/site-packages/salome:${KERNEL_ROOT_DIR}/share/salome/resources:${PYTHONPATH}
+ # add bin, because some script are in (KERNEL_SWIG) !!!!
+ export PYTHONPATH=${KERNEL_ROOT_DIR}/bin/salome:${PYTHONPATH}
+ echo "#############################################"
+ echo $PATH
+ echo "------------------------"
+ echo $LD_LIBRARY_PATH
+ echo "------------------------"
+ echo $PYTHONPATH
+ echo "#############################################"
+fi
+
if test -n $SALOME_ROOT_DIR
then
export PATH=$SALOME_ROOT_DIR/bin/salome:${PATH}
#sleep 2
echo "Starting runNotify.sh"
-notifd -c ${SALOME_ROOT_DIR}/share/salome/resources/channel.cfg -DFactoryIORFileName=/tmp/${LOGNAME}_rdifact.ior -DChannelIORFileName=/tmp/${LOGNAME}_rdichan.ior&
+notifd -c ${KERNEL_ROOT_DIR}/share/salome/resources/channel.cfg -DFactoryIORFileName=/tmp/${LOGNAME}_rdifact.ior -DChannelIORFileName=/tmp/${LOGNAME}_rdichan.ior&
echo "SALOME_Container FactoryServer -ORBInitRef NameService=corbaname::localhost"
SALOME_Container FactoryServer -ORBInitRef NameService=corbaname::localhost &
dir = dir + "libToolsGUI.dll" ;
#else
dir = dir + "libToolsGUI.so" ;
+#endif
+ MESSAGE ( " GUI library = " << dir );
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ToolsLib = fileInfo.fileName() ;
+ found = true;
+ }
+ }
+
+ if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) {
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = QAD_Tools::addSlash(dir) ;
+#ifdef WNT
+ dir = dir + "libToolsGUI.dll" ;
+#else
+ dir = dir + "libToolsGUI.so" ;
#endif
MESSAGE ( " GUI library = " << dir );
fileInfo.setFile(dir) ;
found = true;
}
}
+
+ if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) {
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + QAD_XmlHandler::_bibmap[ id ].latin1() ;
+ MESSAGE ( " GUI library = " << dir );
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ToolsLib = fileInfo.fileName() ;
+ found = true;
+ }
+ }
}
ToolsLibrary.SetName(TCollection_AsciiString((char*)ToolsLib.latin1()).ToCString());
dir = dir + "libOCCViewer.dll" ;
#else
dir = dir + "libOCCViewer.so" ;
+#endif
+ MESSAGE ( " GUI library = " << dir )
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ComponentLib = fileInfo.fileName();
+ found = true;
+ MESSAGE (" Found ")
+ } else
+ MESSAGE (" Not found ")
+ }
+
+ if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) {
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = QAD_Tools::addSlash(dir) ;
+#ifdef WNT
+ dir = dir + "libOCCViewer.dll" ;
+#else
+ dir = dir + "libOCCViewer.so" ;
#endif
MESSAGE ( " GUI library = " << dir )
fileInfo.setFile(dir) ;
dir = dir + "libVTKViewer.dll" ;
#else
dir = dir + "libVTKViewer.so" ;
+#endif
+ MESSAGE ( " GUI library = " << dir );
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ComponentLib = fileInfo.fileName();
+ found = true;
+ MESSAGE (" Found ");
+ } else
+ MESSAGE (" Not found ");
+ }
+
+ if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) {
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = QAD_Tools::addSlash(dir) ;
+#ifdef WNT
+ dir = dir + "libVTKViewer.dll" ;
+#else
+ dir = dir + "libVTKViewer.so" ;
#endif
MESSAGE ( " GUI library = " << dir );
fileInfo.setFile(dir) ;
dir = dir + "libSUPERVGraph.dll" ;
#else
dir = dir + "libSUPERVGraph.so" ;
+#endif
+ MESSAGE ( " GUI library = " << dir )
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ComponentLib = fileInfo.fileName() ;
+ found = true;
+ MESSAGE (" Found ")
+ } else
+ MESSAGE (" Not found ")
+ }
+
+ if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) {
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = QAD_Tools::addSlash(dir) ;
+#ifdef WNT
+ dir = dir + "libSUPERVGraph.dll" ;
+#else
+ dir = dir + "libSUPERVGraph.so" ;
#endif
MESSAGE ( " GUI library = " << dir )
fileInfo.setFile(dir) ;
dir = dir + "libPlot2d.dll" ;
#else
dir = dir + "libPlot2d.so" ;
+#endif
+ MESSAGE ( " GUI library = " << dir )
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ComponentLib = fileInfo.fileName() ;
+ found = true;
+ MESSAGE (" Found ")
+ } else
+ MESSAGE (" Not found ")
+ }
+
+ if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) {
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = QAD_Tools::addSlash(dir) ;
+#ifdef WNT
+ dir = dir + "libPlot2d.dll" ;
+#else
+ dir = dir + "libPlot2d.so" ;
#endif
MESSAGE ( " GUI library = " << dir )
fileInfo.setFile(dir) ;
MESSAGE ( " Not found " )
}
}
+ if ( !found && getenv("KERNEL_ROOT_DIR") ) {
+ dir.fill('\0');
+ dir.sprintf("%s", getenv("KERNEL_ROOT_DIR"));
+ dir = QAD_Tools::addSlash(dir) ;
+ dir = dir + "lib" ;
+ dir = QAD_Tools::addSlash(dir) ;
+#ifdef WNT
+ dir = dir + "lib" + parentComp.latin1() + "GUI.dll" ;
+#else
+ dir = dir + "lib" + parentComp.latin1() + "GUI.so" ;
+#endif
+ MESSAGE ( " GUI library = " << dir )
+ fileInfo.setFile(dir) ;
+ if (fileInfo.exists()) {
+ ComponentLib = fileInfo.fileName() ;
+ found = true;
+ MESSAGE ( " found " )
+ } else {
+ MESSAGE ( " Not found " )
+ }
+ }
if (ComponentLib.isEmpty()) {
waitCursor.stop();
tr ("TOOLS_BUT_OK") );
}
else {
- QString command = QString( getenv( "SALOME_ROOT_DIR" ) ) + "/bin/runIDLparser -Wbcatalog=" + XmlFile;
+ QString command = "";
+ if ( getenv("SALOME_ROOT_DIR") )
+ command = QString( getenv( "SALOME_ROOT_DIR" ) ) + "/bin/runIDLparser -Wbcatalog=" + XmlFile;
+ else if ( getenv("KERNEL_ROOT_DIR") )
+ command = QString( getenv( "KERNEL_ROOT_DIR" ) ) + "/bin/runIDLparser -Wbcatalog=" + XmlFile;
+ else {
+ QAD_MessageBox::error1( this,
+ tr("TOOLS_ERR_ERROR"),
+ tr("SALOME_ROOT_DIR or KERNEL_ROOT_DIR variables are not defined"),
+ tr("TOOLS_BUT_OK") );
+ }
if (!Author.isEmpty()) command += ",author=" + Author;
if (!Version.isEmpty()) command += ",version=" + Version;
if (!PngFile.isEmpty()) {