[
tempdir=<temp_directory>
- ]</font><b><font color="#000099"><br>
+ ]</font>
+<br><font color="#000000">
+ [
+optionallibs=<optional_libraries> ]</font>
+<b><font color="#000099"><br>
/> </font></b>
<br>
<font color="#000000"><b>
</ul>
<font color="#000000">The temporary directory is
the path to the directory for the temporary files.</font>
+<ul>
+ <li> <font color="#000000"><b>optionallibs</b></font></li>
+</ul>
+<font color="#000000">A list of names of libraries.
+An absence of these libraries in the user's system
+doesn't affect on the correct work of SALOME platform.</font>
<h4> <b><buttons> section</b></h4>
This is an optional section and may contains one or more
<product> sections.
<hr><br>
</font>
</body>
-</html>
\ No newline at end of file
+</html>
// ================================================================
/*!
* SALOME_InstallWizard::runCheckFLib
- * Run the Fortran libraries checking
+ * Run the Fortran and other required libraries checking
*/
// ================================================================
void SALOME_InstallWizard::runCheckFLib()
// Check Fortran libraries
checkFLibProc->clearArguments();
// ... update status label
- statusLab->setText( tr( "Check Fortran libraries..." ) );
+ statusLab->setText( tr( "Check Fortran and other required libraries..." ) );
// ... search "not found" libraries
checkFLibProc->setWorkingDirectory( QDir( rootDirPath() ).filePath( "config_files" ) );
checkFLibProc->addArgument( "checkFortran.sh" );
// ================================================================
/*!
* SALOME_InstallWizard::checkFLibResult
- * Slot to take result of Fortran libraries checking
+ * Slot to take result of Fortran and other required libraries checking
*/
// ================================================================
void SALOME_InstallWizard::checkFLibResult()
{
if ( checkFLibProc->normalExit() && checkFLibProc->exitStatus() == 1 ) {
- QStringList notFoundLibsList;
+ QStringList notFoundLibsList, notFoundOptLibsList;
QString record = "";
+ QStringList prefOptLibs = getOptionalLibs();
+ // create list of strings with all 'not found' libraries
while ( checkFLibProc->canReadLineStdout() ) {
- record = checkFLibProc->readLineStdout();
- if ( !record.isEmpty() && !notFoundLibsList.contains( record ) )
- notFoundLibsList.append( record );
- }
- QMessageBox::warning( this,
- tr( "Warning" ),
- tr( "The following libraries are absent on current system:\n"
- "%1").arg( notFoundLibsList.join( "\n" ) ),
- QMessageBox::Ok,
- QMessageBox::NoButton,
- QMessageBox::NoButton );
+ record = checkFLibProc->readLineStdout().stripWhiteSpace();
+ if ( !record.isEmpty() ) {
+ record = QStringList::split( " ", record )[0];
+ if ( !notFoundLibsList.contains( record ) &&
+ !notFoundOptLibsList.contains( record ) ) {
+ bool isOptional = false;
+ QStringList::Iterator it_opt;
+ for ( it_opt = prefOptLibs.begin(); it_opt != prefOptLibs.end(); ++it_opt )
+ if ( record.startsWith( (*it_opt).stripWhiteSpace(), false ) ) {
+ isOptional = true;
+ break;
+ }
+ isOptional ? notFoundOptLibsList.append( record ) \
+ : notFoundLibsList.append( record );
+ }
+ }
+ }
+ QString msg = tr( "Some libraries are absent!<br><br>" );
+ if ( !notFoundLibsList.isEmpty() ) {
+ msg += tr( "One or several <b>mandatory</b> libraries listed below are not found. SALOME <u>may not work</u> properly.<br>" );
+ msg += notFoundLibsList.join( "<br>" );
+ msg += "<br><br>";
+ }
+ if ( !notFoundOptLibsList.isEmpty() ) {
+ msg += tr( "One or several <b>optional</b> libraries listed below are not found. This <u>does not affect</u> on the correct work of SALOME platform.<br>" );
+ msg += notFoundOptLibsList.join( "<br>" );
+ }
+ if ( !notFoundLibsList.isEmpty() )
+ QMessageBox::warning( this,
+ tr( "Warning" ),
+ msg,
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
+ else if ( !notFoundOptLibsList.isEmpty() )
+ QMessageBox::information( this,
+ tr( "Information" ),
+ msg,
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
}
// Update GUI and check installation errors
completeInstallation();
void setCopyright( const QString& copyright ) { myCopyright = copyright; }
// set license
void setLicense( const QString& license ) { myLicense = license; }
+ // set list of optional libraries
+ void setOptionalLibs( const QString& optlibs ) { myOptLibs = QStringList::split( ",", optlibs ); }
// get version
QString getVersion() { return myVersion; }
QString getCopyright() { return myCopyright; }
// get license
QString getLicense() { return myLicense; }
+ // get list of optional libraries
+ QStringList getOptionalLibs() { return myOptLibs; }
// get platform
QString getPlatform() { return !refPlatform.isEmpty() ? refPlatform : curPlatform; }
// get corresponding XML file
QString myLicense; // license info
QString myTargetPath; // target directory path
QString myTmpPath; // temporary directory path
+ QStringList myOptLibs; // list of optional libraries
HelpWindow* helpWindow; // help window
QProcess* shellProcess; // shell process (install script)
// ================================================================
void StructureParser::getConfigInfo(const QDomElement &theElem)
{
- QString myVersion, myCaption, myCopyright, myLicense, myPlatforms;
+ QString myVersion, myCaption, myCopyright, myLicense, myPlatforms, myOptLibs;
if ( theElem.attribute( "version" ) ) {
myVersion = theElem.attribute( "version" ).stripWhiteSpace();
if ( myWizard && !myVersion.isEmpty() )
if ( myTempDir )
myTempDir->setText( substituteVars( theElem.attribute( "tempdir" ) ) );
}
+ if ( theElem.attribute( "optionallibs" ) ) {
+ myOptLibs = theElem.attribute( "optionallibs" ).stripWhiteSpace();
+ if ( myWizard && !myOptLibs.isEmpty() )
+ myWizard->setOptionalLibs( myOptLibs );
+ }
}
// ================================================================
/*!