sys.exit( -1 )
#
-# sanity check PyQt
+# sanity check Qt and PyQt
#
try:
fail( "PyQt Version %s is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION )
major, minor = PYQT_VERSION_STR.split( '.' )
-if major < 3 or ( major == 3 and minor < 10 ):
+if int(major) < 3 or ( int(major) == 3 and int(minor) < 10 ):
fail( "PyQt Version %s is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION_STR )
import sys
-from commander.mainwindow import MainWindow
+try:
+ from commander.mainwindow import MainWindow
+except ImportError:
+ fail( "Error: Can't load GUI parts. Did you 'qmake commander.pro && make' in $OEDIR/commander/?" )
from qt import *
#------------------------------------------------------------------------#
# main
#------------------------------------------------------------------------#
-app = QApplication( sys.argv )
-mw = MainWindow()
-mw.show()
-app.setMainWidget( mw )
-app.exec_loop()
-
+from commander.application import CommanderApplication
+app = CommanderApplication( sys.argv )
+app.initialize()
+app.run()