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 // ================================================================
18 * Qt's messages handler funcion
20 // ================================================================
21 void MessageOutput( QtMsgType type,
42 // ================================================================
47 // ================================================================
48 int main( int argc, char **argv )
50 qInstallMsgHandler( MessageOutput );
53 for( int i = 1; i < argc; i++ ) {
54 QString a = QString( argv[i] );
55 if ( a == "--version" || a == "-v" ) {
56 printf("SALOME Installation Wizard version %d.%d.%d ",
57 ( __IW_VERSION__ / 10000 ),
58 ( __IW_VERSION__ / 100 % 100 ),
59 ( __IW_VERSION__ % 100 ) );
60 printf("(Qt version %d.%d.%d)\n",
61 ( QT_VERSION >> 16 ) & 0xFF,
62 ( QT_VERSION >> 8 ) & 0xFF,
63 ( QT_VERSION ) & 0xFF );
66 if ( xmlFileName.isEmpty() )
69 if ( xmlFileName.isEmpty() )
70 xmlFileName = "config.xml";
72 QApplication a( argc, argv );
73 a.setFont( QFont( "Sans", 12 ) );
76 QFile xmlfile(xmlFileName);
77 if ( xmlfile.exists() ) {
78 SALOME_InstallWizard wizard(xmlFileName);
79 a.setMainWidget( &wizard );
84 QMessageBox::critical( 0,
85 QObject::tr( "Error" ),
86 QObject::tr( "Can't open config file:\n%1\n\nQuitting...").arg( xmlFileName ),
88 QMessageBox::NoButton,
89 QMessageBox::NoButton );