addLogo( pixmap( pxLogo ) );
// set defaults
- setVersion( "3.2.6" );
+ setVersion( "3.2.7" );
setCaption( tr( "SALOME %1" ).arg( myVersion ) );
setCopyright( tr( "Copyright (C) 2007 CEA" ) );
- setLicense( tr( "All right reserved" ) );
+ setLicense( tr( "All rights reserved." ) );
___MESSAGE___( "Configuration file : " << xmlFileName.latin1() );
___MESSAGE___( "Target directory : " << myTargetPath.latin1() );
QLabel* srcCompileLab3 = new QLabel( " " +
tr( "it is a long time operation and it can take more than 24 hours depending\n on the computer." ),
buttonGrp );
- removeSrcBtn = new QMyCheckBox( tr( "Remove sources and temporary files after compilation" ), typePage );
+ removeSrcBtn = new QCheckBox( tr( "Remove sources and temporary files after compilation" ), typePage );
setAboutInfo( removeSrcBtn, tr( "Check this option if you want to remove sources of the products\nwith all the temporary files after build finishing" ) );
- removeSrcBtn->setState( QButton::Off );
+ removeSrcBtn->setChecked( false );
removeSrcBtn->setEnabled( false );
+ rmSrcPrevState = removeSrcBtn->isChecked();
srcCompileLayout->addMultiCellWidget( srcCompileBtn, 0, 0, 0, 2 );
srcCompileLayout->addMultiCell ( spacer6, 1, 2, 0, 0 );
pageLayout->addWidget( buttonGrp, 0, 0 );
// connecting signals
connect( buttonGrp, SIGNAL( clicked(int) ), this, SLOT ( onButtonGroup(int) ) );
- connect( removeSrcBtn, SIGNAL( toggled( bool ) ), this, SLOT( onRemoveSrcBtn() ) );
// adding page
addPage( typePage, tr( "Installation type" ) );
}
item = (QCheckListItem*)( prereqsView->firstChild() );
while( item ) {
if ( productsMap.contains( item ) ) {
- if ( productsMap[ item ].hasType( "salome sources" ) ||
- productsMap[ item ].hasType( "salome binaries" ) ) {
- item = (QCheckListItem*)( item->nextSibling() );
- continue; // skip SALOME sources and binaries
- }
if ( item->isOn() ) {
text += "<li><b>" + item->text() + " " + productsMap[ item ].getVersion() + "</b><br>";
nbProd++;
// ########## check if any products are selected to be installed
long totSize, tempSize;
bool anySelected = checkSize( &totSize, &tempSize );
- if ( installType == Compile && removeSrcBtn->state() == QButton::On ) {
+ if ( installType == Compile && removeSrcBtn->isOn() ) {
totSize += tempSize;
}
if ( !anySelected ) {
Dependancies dep = mapIter.data();
if ( !item->isOn() )
continue;
- if ( installType == Compile && removeSrcBtn->state() == QButton::On )
- tots += dep.getSize( Binaries );
- else
- tots += dep.getSize( installType );
+ tots += ( QStringList::split( " ", item->text(1) )[0] ).toLong();
maxSrcTmp = max( maxSrcTmp, dep.getSize( Compile ) - dep.getSize( Binaries ) );
temps += dep.getTempSize( installType );
nbSelected++;
}
if ( totSize )
- if ( installType == Compile && removeSrcBtn->state() == QButton::On )
+ if ( installType == Compile && removeSrcBtn->isOn() )
temps += maxSrcTmp;
*totSize = tots;
if ( tempSize )
completeInstallation();
}
// ================================================================
+/*!
+ * SALOME_InstallWizard::updateSizeColumn
+ * Sets required size for each product according to
+ * installation type and 'Remove SRC & TMP' checkbox state
+ */
+// ================================================================
+void SALOME_InstallWizard::updateSizeColumn()
+{
+ long prodSize = 0;
+ bool removeSrc = removeSrcBtn->isChecked();
+ MapProducts::Iterator mapIter;
+ for ( mapIter = productsMap.begin(); mapIter != productsMap.end(); ++mapIter ) {
+ QCheckListItem* item = mapIter.key();
+ Dependancies dep = mapIter.data();
+ // get required size for current product
+ long binSize = dep.getSize( Binaries );
+ long srcSize = dep.getSize( Sources );
+ long bldSize = dep.getSize( Compile );
+ InstallationType instType = getInstType();
+ if ( instType == Binaries ) {
+ if ( dep.getType() == "component" )
+ prodSize = binSize + srcSize;
+ else
+ prodSize = ( binSize != 0 ? binSize : srcSize );
+ }
+ else if ( instType == Sources )
+ prodSize = srcSize;
+ else
+ if ( removeSrc )
+ prodSize = ( binSize != 0 ? binSize : srcSize );
+ else {
+ prodSize = ( bldSize != 0 ? bldSize : srcSize );
+ }
+ // fill in 'Size' field
+ item->setText( 1, QString::number( prodSize )+" KB" );
+ }
+}
+// ================================================================
/*!
* SALOME_InstallWizard::checkProductPage
* Checks products page validity (directories and products selection) and
if ( itProd1.data().getType() == "prerequisite" ) {
MapProducts::Iterator itProd2;
for ( itProd2 = productsMap.begin(); itProd2 != productsMap.end(); ++itProd2 ) {
- // if ( itProd2.data().getType() == "component" ) {
if ( itProd2.key()->isOn() ) {
QStringList prereqsList = productsMap[ itProd2.key() ].getDependancies();
for ( int k = 0; k < (int)prereqsList.count(); k++ ) {
// ... sources directory
shellProcess->addArgument( QDir::cleanDirPath( getSrcPath() ) );
// ... remove sources and tmp files or not?
- if ( installType == Compile && removeSrcBtn->state() == QButton::On )
+ if ( installType == Compile && removeSrcBtn->isOn() )
shellProcess->addArgument( "TRUE" );
else
shellProcess->addArgument( "FALSE" );
}
else {
QString itemName = itProd.data().getName();
- if ( itemName != "KERNEL" && itemName != "MED" && itemName != "SAMPLES" ) {
+ if ( itemName != "KERNEL" && itemName != "MED" &&
+ itemName != "SAMPLES" && itemName != "DOCUMENTATION" ) {
itProd.key()->setOn( false );
itProd.key()->setEnabled( false );
}
if ( buttonGrp->id( buttonGrp->selected() ) == -1 )
binBtn->animateClick(); // set default installation type
}
- if ( aPage == platformsPage ) {
+ else if ( aPage == platformsPage ) {
// installation platforms page
MapXmlFiles::Iterator it;
if ( previousPage == typePage ) {
if ( tempFolder->text().isEmpty() )
parser->setTempDir( tempFolder );
parser->readXmlFile( xmlFileName );
+ // update required size for each product
+ updateSizeColumn();
// take into account command line parameters
if ( !myTargetPath.isEmpty() )
targetFolder->setText( myTargetPath );
if ( modulesView->childCount() > 0 && !modulesView->selectedItem() )
modulesView->setSelected( modulesView->firstChild(), true );
stateChanged = false;
+ }
+ else if ( rmSrcPrevState != removeSrcBtn->isChecked() ) {
+ // only update required size for each product
+ updateSizeColumn();
+ rmSrcPrevState = removeSrcBtn->isChecked();
}
}
else if ( aPage == productsPage ) {
else if ( aPage == platformsPage ) {
refPlatform = platBtnGrp->find( rbIndex )->name();
xmlFileName = platformsMap[ refPlatform ];
- cout << xmlFileName << endl;
+// cout << xmlFileName << endl;
setNextEnabled( platformsPage, true );
}
if ( prevType != installType ||
// ================================================================
void SALOME_InstallWizard::onStart()
{
- cout << "" << endl;
if ( nextButton()->text() == tr( "&Stop" ) ) {
statusLab->setText( tr( "Aborting installation..." ) );
shellProcess->kill();
/*!
* SALOME_InstallWizard::onSelectionChanged
* Called when selection is changed in the products list view
+ * to fill in the 'Information about product' text box
*/
// ================================================================
void SALOME_InstallWizard::onSelectionChanged()
QListViewItem* item = modulesView->selectedItem();
if ( snd == prereqsView )
item = prereqsView->selectedItem();
- else if ( snd != modulesView )
- return;
- productInfo->clear();
if ( !item )
return;
+ productInfo->clear();
QCheckListItem* anItem = (QCheckListItem*)item;
if ( !productsMap.contains( anItem ) )
return;
if ( !dep.getDescription().isEmpty() ) {
text += "<i>" + dep.getDescription() + "</i><br><br>";
}
- long totSize = 0, tempSize = 0;
- if ( installType == Compile && removeSrcBtn->state() == QButton::On )
- totSize = dep.getSize( Binaries );
- else
- totSize = dep.getSize( installType );
- tempSize = dep.getTempSize( installType );
- text += tr( "Disk space required" ) + ": " + QString::number( totSize ) + " KB<br>";
- text += tr( "Disk space for tmp files required" ) + ": " + QString::number( tempSize ) + " KB<br>";
+ /* AKL: 07/08/28 - hide required disk space for tmp files for each product ==>
+ long tempSize = 0;
+ tempSize = dep.getTempSize( installType );
+ text += tr( "Disk space for tmp files required" ) + ": " + QString::number( tempSize ) + " KB<br>";
+ AKL: 07/08/28 - hide required disk space for tmp files for each product <==
+ */
+ text += tr( "Disk space required" ) + ": " + item->text(1) + "<br>";
text += "<br>";
QString req = ( dep.getDependancies().count() > 0 ? dep.getDependancies().join(", ") : tr( "none" ) );
text += tr( "Prerequisites" ) + ": " + req;