Browse Source

Finally fixed the Mac OS 32bit/64bit chaos

QGC4.4
pixhawk 15 years ago
parent
commit
3d2866df48
  1. 24
      mavground.pri
  2. 21
      src/Core.cc
  3. 13
      src/ui/MainWindow.cc

24
mavground.pri

@ -37,8 +37,8 @@ LANGUAGE = C++
#CONFIG += static debug #CONFIG += static debug
#CONFIG += static release console #CONFIG += static release console
CONFIG += static debug_and_release console CONFIG += static debug_and_release console
QMAKE_CFLAGS += -j8 #QMAKE_CFLAGS += -j8
QMAKE_CXXFLAGS += -j8 #QMAKE_CXXFLAGS += -j8
OBJECTS_DIR = $$BUILDDIR/obj OBJECTS_DIR = $$BUILDDIR/obj
MOC_DIR = $$BUILDDIR/moc MOC_DIR = $$BUILDDIR/moc
@ -60,10 +60,20 @@ message(Qt version $$[QT_VERSION])
# MAC OS X # MAC OS X
macx { macx {
message(Building for Mac OS X 64bit) CONFIG += x86 #x86_64
CONFIG -= static phonon
CONFIG += x86_64 HARDWARE_PLATFORM = $$system(uname -a)
CONFIG -= x86 static phonon contains( HARDWARE_PLATFORM, x86_64 ) {
# x64 Mac OS X Snow Leopard 10.6 and later
CONFIG += x86_64
CONFIG -= x86 static phonon
message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
} else {
# x86 Mac OS X Leopard 10.5 and earlier
CONFIG += x86 static phonon
message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
}
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
@ -88,8 +98,6 @@ macx {
# GNU/Linux # GNU/Linux
linux-g++ { linux-g++ {
message(Building for GNU/Linux)
debug { debug {
DESTDIR = $$BASEDIR DESTDIR = $$BASEDIR
@ -105,10 +113,12 @@ linux-g++ {
# 64-bit Linux # 64-bit Linux
LIBS += \ LIBS += \
-L$$BASEDIR/lib/flite/linux64 -L$$BASEDIR/lib/flite/linux64
message(Building for GNU/Linux 64bit/x64)
} else { } else {
# 32-bit Linux # 32-bit Linux
LIBS += \ LIBS += \
-L$$BASEDIR/lib/flite/linux32 -L$$BASEDIR/lib/flite/linux32
message(Building for GNU/Linux 32bit/i386)
} }
LIBS += -lm \ LIBS += -lm \
-lflite_cmu_us_awb \ -lflite_cmu_us_awb \

21
src/Core.cc

@ -61,6 +61,14 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
this->setApplicationName("OpenMAV Ground Control Station"); this->setApplicationName("OpenMAV Ground Control Station");
this->setApplicationVersion("v. 0.0.5"); this->setApplicationVersion("v. 0.0.5");
this->setOrganizationName(QLatin1String("OpenMAV Association")); this->setOrganizationName(QLatin1String("OpenMAV Association"));
this->setOrganizationDomain("http://qgroundcontrol.org");
// Show splash screen
QPixmap splashImage(":images/splash.png");
QSplashScreen* splashScreen = new QSplashScreen(splashImage, Qt::WindowStaysOnTopHint);
splashScreen->show();
splashScreen->showMessage(tr("Loading application fonts"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
QSettings::setDefaultFormat(QSettings::IniFormat); QSettings::setDefaultFormat(QSettings::IniFormat);
// Exit main application when last window is closed // Exit main application when last window is closed
connect(this, SIGNAL(lastWindowClosed()), this, SLOT(quit())); connect(this, SIGNAL(lastWindowClosed()), this, SLOT(quit()));
@ -73,17 +81,12 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
fontDatabase.addApplicationFont(fontFileName); fontDatabase.addApplicationFont(fontFileName);
setFont(fontDatabase.font(fontFamilyName, "Roman", 12)); setFont(fontDatabase.font(fontFamilyName, "Roman", 12));
// Show splash screen
QPixmap splashImage(":images/splash.png");
QSplashScreen* splashScreen = new QSplashScreen(splashImage, Qt::WindowStaysOnTopHint);
splashScreen->show();
// Start the comm link manager // Start the comm link manager
splashScreen->showMessage(tr("Starting Communication Links")); splashScreen->showMessage(tr("Starting Communication Links"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
startLinkManager(); startLinkManager();
// Start the UAS Manager // Start the UAS Manager
splashScreen->showMessage(tr("Starting UAS Manager")); splashScreen->showMessage(tr("Starting UAS Manager"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
startUASManager(); startUASManager();
// Start audio output // Start audio output
@ -93,7 +96,7 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
//tarsus->start(); //tarsus->start();
// Start the user interface // Start the user interface
splashScreen->showMessage(tr("Starting User Interface")); splashScreen->showMessage(tr("Starting User Interface"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
startUI(); startUI();
// Remove splash screen // Remove splash screen
@ -140,7 +143,5 @@ void Core::startUI()
{ {
// Start UI // Start UI
mainWindow = new MainWindow(); mainWindow = new MainWindow();
// Make UI visible
mainWindow->show();
} }

13
src/ui/MainWindow.cc

@ -60,6 +60,9 @@ This file is part of the PIXHAWK project
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{ {
this->hide();
this->setVisible(false);
// Quick hack // Quick hack
//comp = new LogCompressor("/home/pixhawk/Desktop/test.txt"); //comp = new LogCompressor("/home/pixhawk/Desktop/test.txt");
@ -142,10 +145,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
// Add status bar // Add status bar
setStatusBar(createStatusBar()); setStatusBar(createStatusBar());
// Load widgets
loadWidgets();
// Adjust the size
adjustSize();
// Create actions // Create actions
connectActions(); connectActions();
@ -173,6 +172,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
//CommConfigurationWindow* simulationWidget = new CommConfigurationWindow(simulationLink, mavlink, this); //CommConfigurationWindow* simulationWidget = new CommConfigurationWindow(simulationLink, mavlink, this);
//ui.menuNetwork->addAction(commWidget->getAction()); //ui.menuNetwork->addAction(commWidget->getAction());
simulationLink->connect(); simulationLink->connect();
// Load widgets and show application window
loadWidgets();
// Adjust the size
adjustSize();
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()

Loading…
Cancel
Save