2 // Created : Thu Dec 18 12:01:00 2002
3 // Author : Vadim SANDLER
5 // Module : Installation Wizard
6 // Copyright : 2004-2005 CEA
10 #include "SALOME_InstallWizard.hxx"
11 #include <qapplication.h>
13 #include <qmessagebox.h>
15 #define __IW_VERSION__ 0x010000
17 // ================================================================
20 * Qt's messages handler funcion
22 // ================================================================
23 void MessageOutput( QtMsgType type,
44 // ================================================================
49 // ================================================================
50 int main( int argc, char **argv )
52 qInstallMsgHandler( MessageOutput );
55 for( int i = 1; i < argc; i++ ) {
56 QString a = QString( argv[i] );
57 if ( a == "--version" || a == "-v" ) {
58 printf("SALOME Installation Wizard version %d.%d.%d ",
59 ( __IW_VERSION__ >> 16 ) & 0xFF,
60 ( __IW_VERSION__ >> 8 ) & 0xFF,
61 ( __IW_VERSION__ ) & 0xFF );
62 printf("(Qt version %d.%d.%d)\n",
63 ( QT_VERSION >> 16 ) & 0xFF,
64 ( QT_VERSION >> 8 ) & 0xFF,
65 ( QT_VERSION ) & 0xFF );
68 if ( xmlFileName.isEmpty() )
71 if ( xmlFileName.isEmpty() )
72 xmlFileName = "config.xml";
74 QApplication a( argc, argv );
75 a.setFont( QFont( "Sans", 12 ) );
78 QFile xmlfile(xmlFileName);
79 if ( xmlfile.exists() ) {
80 SALOME_InstallWizard wizard(xmlFileName);
81 a.setMainWidget( &wizard );
86 QMessageBox::critical( 0,
87 QObject::tr( "Error" ),
88 QObject::tr( "Can't open config file:\n%1\n\nQuitting...").arg( xmlFileName ),
90 QMessageBox::NoButton,
91 QMessageBox::NoButton );