QString str = "Loading: ";
myMessages[0] = "Checking naming service...";
myMessages[1] = str + "SALOME_Registry_Server" + "...";
- myMessages[2] = str + "SALOME_Container SuperVisionContainer" + "...";
+ myMessages[2] = str + "SALOMEDS_Server" + "...";
myMessages[3] = str + "SALOME_ModuleCatalog_Server" + "...";
- myMessages[4] = str + "SALOME_ContainerPy.py FactoryServerPy" + "...";
- myMessages[5] = str + "SALOME_Container FactoryServer" + "...";
- myMessages[6] = str + "SALOMEDS_Server" + "...";
- myMessages[7] = str + "SALOME_Session_Server" + "...";
+ myMessages[4] = str + "SALOME_Session_Server" + "...";
+ myMessages[5] = "";
+ myMessages[6] = "";
+ myMessages[7] = "";
r->getArgs( _argc, &_argv);
case 2:
//checking - existence of SALOME_Registry_Server
case 3:
- //checking - existence of SALOME_Container SuperVisionContainer
+ //checking - existence of SALOMEDS_Server
case 4:
//checking - existence of SALOME_ModuleCatalog_Server
case 5:
- //checking - existence of SALOME_ContainerPy.py FactoryServerPy
+ //checking - existence of SALOME_Session_Server
case 6:
//checking - existence of SALOME_Container FactoryServer
case 7:
- //checking - existence of SALOMEDS_Server
+ //checking - existence of SALOME_ContainerPy.py FactoryServerPy
case 8:
- //checking - existence of SALOME_Session_Server
-
+ //checking - existence of SALOME_Container SuperVisionContainer
+
IsPassed = pingServer(iteration, errDescription);
if (!IsPassed)
}
}
break;
- case 3:
- {
- string hostname = GetHostname();
- string containerName = "/Containers/";
- containerName += hostname;
- containerName += "/SuperVisionContainer";
-
- CORBA::Object_var obj = NS.Resolve(containerName.c_str());
- Engines::Container_var SVcontainer = Engines::Container::_narrow(obj) ;
- if (!CORBA::is_nil(SVcontainer))
+ case 3:
+ {
+ CORBA::Object_var obj = NS.Resolve("/myStudyManager");
+ SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow(obj) ;
+ if (!CORBA::is_nil(studyManager))
+
+
+
+
+
{
- SVcontainer->ping();
+ MESSAGE("/myStudyManager is found");
+ studyManager->ping();
result = true;
- MESSAGE("SuperVisionContainer container was activated");
+ MESSAGE("StudyManager was activated");
return result;
}
}
}
}
break;
- case 8:
+ case 5:
{
CORBA::Object_var obj = NS.Resolve("Kernel/Session");
SALOME::Session_var session = SALOME::Session::_narrow(obj) ;
}
}
break;
- case 5:
+ case 7:
{
string hostname = GetHostname();
string containerName = "/Containers/";
}
}
break;
- case 7:
- {
- CORBA::Object_var obj = NS.Resolve("/myStudyManager");
- SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow(obj) ;
- if (!CORBA::is_nil(studyManager))
+ case 8:
+ {
+ string hostname = GetHostname();
+ string containerName = "/Containers/";
+ containerName += hostname;
+ containerName += "/SuperVisionContainer";
+
+ CORBA::Object_var obj = NS.Resolve(containerName.c_str());
+ Engines::Container_var SVcontainer = Engines::Container::_narrow(obj) ;
+ if (!CORBA::is_nil(SVcontainer))
{
- MESSAGE("/myStudyManager is found");
- studyManager->ping();
+ SVcontainer->ping();
+
result = true;
- MESSAGE("StudyManager was activated");
+ MESSAGE("SuperVisionContainer container was activated");
return result;
}
}
case 2:
serverName = "SALOME_Registry_Server is not loaded. ";
break;
- case 7:
+ case 3:
serverName = "SALOMEDS_Server is not loaded. ";
break;
case 4:
serverName = "SALOME_ModuleCatalog_Server is not loaded. ";
break;
- case 8:
+ case 5:
serverName = "SALOME_Session_Server is not loaded. ";
break;
case 6:
serverName = "SALOME_Container FactoryServer is not loaded. ";
break;
- case 5:
+ case 7:
serverName = "SALOME_ContainerPy.py FactoryServerPy is not loaded. ";
break;
- case 3:
+ case 8:
serverName = "SALOME_Container SuperVisionContainer is not loaded. ";
break;
}
QString dir;
char* cenv;
+ // Try ${SALOME_ROOT_DIR}/share/salome/resources directory
+ cenv = getenv( "KERNEL_ROOT_DIR" );
+ if ( cenv ) {
+ dir.sprintf( "%s", cenv );
+ if ( !dir.isEmpty() ) {
+ dir = addSlash(dir) ;
+ dir = dir + "share" ;
+ dir = addSlash(dir) ;
+ dir = dir + "salome" ;
+ dir = addSlash(dir) ;
+ dir = dir + "resources" ;
+ dir = addSlash(dir) ;
+ QFileInfo fileInfo( dir + filename );
+ if ( fileInfo.isFile() && fileInfo.exists() )
+ return fileInfo.filePath();
+ }
+ }
// Try CSF_ResourcesDefaults env.var directory ( or directory list )
cenv = getenv( "CSF_ResourcesDefaults" );
if ( cenv ) {