QString dir;
char* cenv;
- // Try ${SALOME_ROOT_DIR}/share/salome/resources directory
+ // Try ${KERNEL_ROOT_DIR}/share/salome/resources directory
cenv = getenv( "KERNEL_ROOT_DIR" );
if ( cenv ) {
dir.sprintf( "%s", cenv );
return fileInfo.filePath();
}
}
- // Try ${SALOME_SITE_DIR}/share/salome/resources directory
- cenv = getenv( "SALOME_SITE_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 ${SALOME_ROOT_DIR}/share/salome/resources directory
- cenv = getenv( "SALOME_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();
- }
- }
return filename;
}
QString addSlash( const QString& path )
}
else {
QString command = "";
- if ( getenv("SALOME_ROOT_DIR") )
- command = QString( getenv( "SALOME_ROOT_DIR" ) ) + "/bin/runIDLparser -Wbcatalog=" + XmlFile;
- else if ( getenv("KERNEL_ROOT_DIR") )
+ 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("KERNEL_ROOT_DIR variable is not defined"),
tr("TOOLS_BUT_OK") );
}
if (!Author.isEmpty()) command += ",author=" + Author;