From: vsr Date: Thu, 8 May 2008 10:58:12 +0000 (+0000) Subject: 1. Prepare for version 3.2.10 X-Git-Tag: V_3_2_10~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e5a6a80aad2ad202d4f5a0c68bee2c14e2566406;p=tools%2Finstall.git 1. Prepare for version 3.2.10 2. Add 'install to single dir' option --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index c605690..ade820c 100755 Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ diff --git a/src/SALOME_HelpWindow.cxx b/src/SALOME_HelpWindow.cxx index 83d8b3a..bbaafd1 100644 --- a/src/SALOME_HelpWindow.cxx +++ b/src/SALOME_HelpWindow.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "SALOME_HelpWindow.hxx" #include "SALOME_InstallWizard.hxx" diff --git a/src/SALOME_HelpWindow.hxx b/src/SALOME_HelpWindow.hxx index da05333..d3599fd 100644 --- a/src/SALOME_HelpWindow.hxx +++ b/src/SALOME_HelpWindow.hxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #ifndef __SALOME_HelpWindow #define __SALOME_HelpWindow diff --git a/src/SALOME_INSTALL.pro b/src/SALOME_INSTALL.pro index 5fff4d8..62d663a 100644 --- a/src/SALOME_INSTALL.pro +++ b/src/SALOME_INSTALL.pro @@ -3,7 +3,7 @@ # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) # Project : SALOME # Module : Installation Wizard -# Copyright : 2002-2007 CEA +# Copyright : 2002-2008 CEA TEMPLATE = app CONFIG += qt warn_on release thread diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index 583380c..66cfd6c 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "globals.h" @@ -419,7 +419,7 @@ public: .arg( __IW_VERSION_MINOR__ ) \ .arg( __IW_VERSION_PATCH__ ) ); QLabel* copyright = new QLabel( this, "copyright" ); - copyright->setText( "Copyright © 2004-2007 CEA" ); + copyright->setText( "Copyright © 2002-2008 CEA" ); QFont font = title->font(); font.setPointSize( (int)( font.pointSize() * 1.8 ) ); title->setFont( font ); @@ -463,7 +463,8 @@ public: SALOME_InstallWizard::SALOME_InstallWizard(const QString& aXmlFileName, const QString& aTargetDir, const QString& aTmpDir, - const bool aForceSrc) + const bool aForceSrc, + const bool aSingleDir) : InstallWizard( qApp->desktop(), "SALOME_InstallWizard", false, 0 ), helpWindow( NULL ), moreMode( false ), @@ -519,7 +520,7 @@ SALOME_InstallWizard::SALOME_InstallWizard(const QString& aXmlFileName, // create introduction page setupIntroPage(); // create products page - setupProductsPage(aForceSrc); + setupProductsPage(aForceSrc, aSingleDir); // create prestart page setupCheckPage(); // create progress page @@ -675,7 +676,7 @@ void SALOME_InstallWizard::setupIntroPage() * Creates products page */ // ================================================================ -void SALOME_InstallWizard::setupProductsPage(const bool forceSrc) +void SALOME_InstallWizard::setupProductsPage(const bool forceSrc, const bool singleDir) { // // create page @@ -750,6 +751,9 @@ void SALOME_InstallWizard::setupProductsPage(const bool forceSrc) selectBinBtn = new QMyCheckBox( tr( "SALOME binaries" ), moreBox ); selectBinBtn->setTristate( true ); setAboutInfo( selectBinBtn, tr( "Click this button to select/deselect SALOME binaries" ) ); + singleDirBtn = new QMyCheckBox( tr( "Install to a single directory" ), moreBox ); + setAboutInfo( singleDirBtn, tr( "Check this box if you want to install binaries of\nall SALOME modules into a single directory." ) ); + singleDirBtn->setChecked(singleDir); selectSrcBtn = new QMyCheckBox( tr( "SALOME sources" ), moreBox ); selectSrcBtn->setTristate( true ); setAboutInfo( selectSrcBtn, tr( "Click this button to select/deselect SALOME sources" ) ); @@ -758,8 +762,9 @@ void SALOME_InstallWizard::setupProductsPage(const bool forceSrc) QGridLayout* btnLayout = new QGridLayout; btnLayout->setMargin( 0 ); btnLayout->setSpacing( 6 ); btnLayout->addMultiCellWidget( unselectBtn, 0, 0, 0, 1 ); btnLayout->addMultiCellWidget( selectBinBtn, 1, 1, 0, 1 ); - btnLayout->addMultiCellWidget( selectSrcBtn, 2, 2, 0, 1 ); - btnLayout->addWidget( buildSrcBtn, 3, 1 ); + btnLayout->addWidget( singleDirBtn, 2, 1 ); + btnLayout->addMultiCellWidget( selectSrcBtn, 3, 3, 0, 1 ); + btnLayout->addWidget( buildSrcBtn, 4, 1 ); btnLayout->addColSpacing( 0, 20 ); btnLayout->setColStretch( 1, 10 ); // @@ -847,6 +852,8 @@ void SALOME_InstallWizard::setupProductsPage(const bool forceSrc) this, SLOT( onProdBtn() ) ); connect( buildSrcBtn, SIGNAL( stateChanged(int) ), this, SLOT( onProdBtn() ) ); + connect( singleDirBtn, SIGNAL( stateChanged(int) ), + this, SLOT( onInstallToSingle() ) ); connect( allFromSrcBtn, SIGNAL( stateChanged(int) ), this, SLOT( onBuildAll() ) ); // connecting signals @@ -1479,6 +1486,7 @@ void SALOME_InstallWizard::checkProductPage() selectSrcBtn->blockSignals( true ); selectBinBtn->blockSignals( true ); + singleDirBtn->blockSignals( true ); int totSrc = 0, selSrc = 0; MapProducts::Iterator itProd; @@ -1513,9 +1521,11 @@ void SALOME_InstallWizard::checkProductPage() } } selectBinBtn->setState( selBin == 0 ? QButton::Off : ( selBin == totBin ? QButton::On : QButton::NoChange ) ); + singleDirBtn->setEnabled( selectBinBtn->isEnabled() && selectBinBtn->isChecked() ); selectSrcBtn->blockSignals( false ); selectBinBtn->blockSignals( false ); + singleDirBtn->blockSignals( false ); long tots = 0, temps = 0; @@ -1649,6 +1659,13 @@ void SALOME_InstallWizard::launchScript() // ... product name - currently instaled product shellProcess->addArgument( item->text(0) ); + // ... flag to install single all SALOME binaries to one installation directory, + // if this option was selected + if ( singleDirBtn->isChecked() ) { // && productsMap[ item ].hasContext( "salome binaries" ) && productsView->isBinaries( item ) + // add flag to install salome binaries to the same directory + shellProcess->addArgument( "1" ); + } + // run script if ( !shellProcess->start() ) { // error handling can be here @@ -1674,8 +1691,10 @@ void SALOME_InstallWizard::launchScript() script += QUOTE( QFileInfo( QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME ).absFilePath() ) + " "; script += QUOTE( QFileInfo( QDir::cleanDirPath( QDir::currentDirPath() + "/Products" ) ).absFilePath() ) + " "; script += QUOTE( QFileInfo( QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() ) ).absFilePath() ) + " "; - script += depproducts + " "; - script += item->text(0); + script += depproducts + " "; // dependencies + script += item->text(0) + " "; // product + if ( singleDirBtn->isChecked() ) // single directory flag + script += "1"; ___MESSAGE___( "... --> " << script.latin1() ); if ( system( script.latin1() ) ) { ___MESSAGE___( "ERROR" ); @@ -2570,6 +2589,16 @@ void SALOME_InstallWizard::resetToDefaultState() productsView->blockSignals( false ); } +// ================================================================ +/*! + * SALOME_InstallWizard::onInstallToSingle + * Install SALOME binaries to a single directory check box slot + */ +// ================================================================ +void SALOME_InstallWizard::onInstallToSingle() +{ +} + // ================================================================ /*! * SALOME_InstallWizard::onBuildAll diff --git a/src/SALOME_InstallWizard.hxx b/src/SALOME_InstallWizard.hxx index 11c7ffe..a72c441 100644 --- a/src/SALOME_InstallWizard.hxx +++ b/src/SALOME_InstallWizard.hxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #ifndef __SALOME_InstallWizard #define __SALOME_InstallWizard @@ -147,7 +147,8 @@ class SALOME_InstallWizard: public InstallWizard SALOME_InstallWizard(const QString& aXmlFileName, const QString& aTargetDir = QString::null, const QString& aTmpDir = QString::null, - const bool aForceSrc = false); + const bool aForceSrc = false, + const bool aSingleDir = false); // destructor virtual ~SALOME_InstallWizard( ); @@ -204,7 +205,7 @@ class SALOME_InstallWizard: public InstallWizard // creates introduction page void setupIntroPage(); // creates products page - void setupProductsPage(const bool forceSrc = false); + void setupProductsPage(const bool forceSrc = false, const bool singleDir = false); // creates directories page void setupDirPage(); // creates prestart page @@ -265,6 +266,8 @@ class SALOME_InstallWizard: public InstallWizard void onProdBtn(); // button slot void onMoreBtn(); + // check box + void onInstallToSingle(); // check box void onBuildAll(); @@ -331,6 +334,7 @@ class SALOME_InstallWizard: public InstallWizard QPushButton* unselectBtn; // button QWidget* lessBox; // container for the mode widgets QMyCheckBox* allFromSrcBtn; // check box + QMyCheckBox* singleDirBtn; // check box // --> prestart page QWidget* prestartPage; // page itself QTextEdit* choices; // choice text view diff --git a/src/SALOME_ProductsView.cxx b/src/SALOME_ProductsView.cxx index c68ae02..a47e5c7 100644 --- a/src/SALOME_ProductsView.cxx +++ b/src/SALOME_ProductsView.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "SALOME_ProductsView.hxx" #include diff --git a/src/SALOME_ProductsView.hxx b/src/SALOME_ProductsView.hxx index 0a2d27e..96f7526 100644 --- a/src/SALOME_ProductsView.hxx +++ b/src/SALOME_ProductsView.hxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #ifndef __SALOME_ProductsView #define __SALOME_ProductsView diff --git a/src/SALOME_ProgressView.cxx b/src/SALOME_ProgressView.cxx index 6d5e94e..731c91c 100644 --- a/src/SALOME_ProgressView.cxx +++ b/src/SALOME_ProgressView.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "SALOME_ProgressView.hxx" diff --git a/src/SALOME_ProgressView.hxx b/src/SALOME_ProgressView.hxx index 155ca46..269f914 100644 --- a/src/SALOME_ProgressView.hxx +++ b/src/SALOME_ProgressView.hxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #ifndef __SALOME_ProgressView #define __SALOME_ProgressView diff --git a/src/SALOME_XmlHandler.cxx b/src/SALOME_XmlHandler.cxx index f0a8be4..2bfa36d 100644 --- a/src/SALOME_XmlHandler.cxx +++ b/src/SALOME_XmlHandler.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "globals.h" diff --git a/src/SALOME_XmlHandler.hxx b/src/SALOME_XmlHandler.hxx index bda9d92..e686f1e 100644 --- a/src/SALOME_XmlHandler.hxx +++ b/src/SALOME_XmlHandler.hxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #ifndef __SALOME_XmlHandler #define __SALOME_XmlHandler diff --git a/src/globals.h b/src/globals.h index 7e812b1..538c23e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #if !defined( ___GLOBALS ) #define ___GLOBALS @@ -17,7 +17,7 @@ #define __IW_VERSION_MAJOR__ 1 #define __IW_VERSION_MINOR__ 0 -#define __IW_VERSION_PATCH__ 3 +#define __IW_VERSION_PATCH__ 4 #define __IW_VERSION__ (__IW_VERSION_MAJOR__*10000 + \ __IW_VERSION_MINOR__*100 + \ diff --git a/src/icons.cxx b/src/icons.cxx index 04b1d43..4af1894 100644 --- a/src/icons.cxx +++ b/src/icons.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "icons.h" diff --git a/src/icons.h b/src/icons.h index 3ac9d21..d76e9b2 100644 --- a/src/icons.h +++ b/src/icons.h @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #ifndef ___ICONS_h #define ___ICONS_h diff --git a/src/main.cxx b/src/main.cxx index 15ae14f..9c2162e 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -3,7 +3,7 @@ // Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2002-2007 CEA +// Copyright : 2002-2008 CEA #include "globals.h" @@ -56,17 +56,18 @@ int main( int argc, char **argv ) bool has_target = false; bool has_tmp = false; bool force_src = false; + bool single_dir = false; for( int i = 1; i < argc; i++ ) { QString a = QString( argv[i] ); if ( a == "--version" || a == "-v" ) { - printf("SALOME Installation Wizard version %d.%d.%d ", + printf("SALOME Installation Wizard version %d.%d.%d (Qt version %d.%d.%d)\n", ( __IW_VERSION__ / 10000 ), ( __IW_VERSION__ / 100 % 100 ), - ( __IW_VERSION__ % 100 ) ); - printf("(Qt version %d.%d.%d)\n", + ( __IW_VERSION__ % 100 ), ( QT_VERSION >> 16 ) & 0xFF, ( QT_VERSION >> 8 ) & 0xFF, ( QT_VERSION ) & 0xFF ); + printf("Copyright (C) 2002-2008 CEA\n"); return 0; } else if ( a == "--target" || a == "-d" ) { @@ -102,6 +103,9 @@ int main( int argc, char **argv ) else if ( a == "--all-from-sources" || a == "-a" ) { force_src = true; } + else if ( a == "--single-directory" || a == "-s" ) { + single_dir = true; + } } if ( has_xml && xmlFileName.isEmpty() ) { printf("Please specify the configuration XML file!\n"); @@ -125,7 +129,7 @@ int main( int argc, char **argv ) int result = -1; QFile xmlfile(xmlFileName); if ( xmlfile.exists() ) { - SALOME_InstallWizard wizard(xmlFileName, targetDirPath, tmpDirPath, force_src); + SALOME_InstallWizard wizard(xmlFileName, targetDirPath, tmpDirPath, force_src, single_dir); a.setMainWidget( &wizard ); wizard.show(); result = a.exec();