Commit 4fbe9e20 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #459 from DonLakeFlyer/ProjectFileCleanup

Project file cleanup
parents 48f06761 3347d285
......@@ -52,6 +52,7 @@ user_config.pri
thirdParty/qserialport-build-desktop/
thirdParty/qserialport/bin/
thirdParty/qserialport/lib/
libs/thirdParty/libxbee/lib/
GeneratedFiles/
*.autosave
......
This diff is collapsed.
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------
QMAKE_POST_LINK += $$quote(echo "Copying files")
#
# Copy the application resources to the associated place alongside the application
#
COPY_RESOURCE_LIST = \
$$BASEDIR/files \
$$BASEDIR/qml \
$$BASEDIR/data
WindowsBuild {
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
COPY_RESOURCE_LIST = $$replace(COPY_RESOURCE_LIST, "/","\\")
CONCATCMD = $$escape_expand(\\n)
}
LinuxBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
CONCATCMD = &&
}
MacBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
CONCATCMD = &&
}
for(COPY_DIR, COPY_RESOURCE_LIST):QMAKE_POST_LINK += $$CONCATCMD $$QMAKE_COPY_DIR $${COPY_DIR} $$DESTDIR_COPY_RESOURCE_LIST
#
# Perform platform specific setup
#
MacBuild {
# Copy non-standard libraries and frameworks into app package
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/Frameworks
# Fix library paths inside executable
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgViewer.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgText.dylib \
libosgWidget.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# Fix library paths within libraries (inter-library dependencies)
# OSG GA LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG DB LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgDB.dylib \
libosgUtil.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG TEXT LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG UTIL LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG VIEWER LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgViewer.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG WIDGET LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgWidget.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib \
libosgViewer.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# CORE OSG LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$DESTDIR/$${TARGET}.app/Contents/libs/libosg.dylib
# SDL Framework
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
WindowsBuild {
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
DESTDIR_WIN = $$replace(DESTDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY_DIR "$$(QTDIR)\\plugins" "$$DESTDIR_WIN")
COPY_FILE_DESTDIR = $$DESTDIR_WIN
DebugBuild: DLL_QT_DEBUGCHAR = "d"
ReleaseBuild: DLL_QT_DEBUGCHAR = ""
COPY_FILE_LIST = \
$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll \
$$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
$$(QTDIR)\\bin\\phonon$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtCore$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtGui$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtMultimedia$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtNetwork$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtOpenGL$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtSql$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtSvg$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtTest$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtWebKit$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtXml$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtXmlPatterns$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtDeclarative$${DLL_QT_DEBUGCHAR}4.dll \
$$(QTDIR)\\bin\\QtScript$${DLL_QT_DEBUGCHAR}4.dll
for(COPY_FILE, COPY_FILE_LIST) {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "$$COPY_FILE" "$$COPY_FILE_DESTDIR")
}
ReleaseBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp")
# Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
# I'm not certain of the path for VS2008, so this only works for VS2010.
win32-msvc2010 {
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$DESTDIR_WIN\\")
}
}
}
This diff is collapsed.
This diff is collapsed.
IDI_ICON1 ICON DISCARDABLE "files/images/icons/qgroundcontrol.ico"
1 VERSIONINFO
FILEVERSION 2,0,0,227
PRODUCTVERSION 2,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "qgroundcontrol.org"
VALUE "FileDescription", "Open source ground control app provided by QGroundControl dev team"
VALUE "FileVersion", "2.0.0.227"
VALUE "LegalCopyright", "Copyright (C) 2013 QGroundControl Development Team. All rights reserved."
VALUE "ProductName", "qgroundcontrol"
VALUE "ProductVersion", "2.0"
VALUE "InternalName", "qgroundcontrol"
VALUE "OriginalFilename", "qgroundcontrol.exe"
END
END
END
#include "AudioOutput.h"
#ifdef Q_OS_MAC
#include <ApplicationServices/ApplicationServices.h>
#else
#include <flite.h>
#include <phonon/mediaobject.h>
#include <QTemporaryFile>
#endif
#include <QDebug>
#ifndef Q_OS_MAC
extern "C" {
#include <cmu_us_awb/voxdefs.h>
//#include <cmu_us_slt/voxdefs.h>
//cst_voice *REGISTER_VOX(const char *voxdir);
//void UNREGISTER_VOX(cst_voice *vox);
cst_voice *register_cmu_us_awb(const char *voxdir);
void unregister_cmu_us_awb(cst_voice *vox);
cst_voice *register_cmu_us_slt(const char *voxdir);
void unregister_cmu_us_slt(cst_voice *vox);
cst_voice *register_cmu_us_rms(const char *voxdir);
void unregister_cmu_us_rms(cst_voice *vox);
};
#endif
AudioOutput::AudioOutput(QString voice, QObject* parent)
: QObject(parent),
voice(NULL),
voiceIndex(0)
{
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
flite_init();
#endif
switch (voiceIndex) {
case 0:
selectFemaleVoice();
break;
case 1:
selectMaleVoice();
break;
default:
selectNeutralVoice();
break;
}
/*
// List available voices
QStringList voices = listVoices();
foreach (QString s, voices)
{
qDebug() << "VOICE: " << s;
}
if (voice.length() > 0)
{
//this->voice = flite_voice_select(voice.toStdString().c_str());
}
else
{
// Take default voice
//this->voice = flite_voice_select("awb");
}
*/
}
bool AudioOutput::say(QString text, int severity)
{
// Only give speech output on Linux and MacOS
#if defined(Q_OS_WIN32)
qDebug() << "Synthesized: " << text << ", NO OUTPUT SUPPORT ON WINDOWS!";
#elif defined(Q_OS_MAC)
// FIXME, copy string, set callback to free the copy
SpeakString((const unsigned char*)text.toAscii().data());
qDebug() << "Synthesized: " << text;
#else
QTemporaryFile file;
file.setFileTemplate("XXXXXX.wav");
if (file.open()) {
cst_wave* wav = flite_text_to_wave(text.toStdString().c_str(), this->voice);
// file.fileName() returns the unique file name
cst_wave_save(wav, file.fileName().toStdString().c_str(), "riff");
Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,
Phonon::MediaSource(file.fileName().toStdString().c_str()));
music->play();
qDebug() << "Synthesized: " << text << ", tmp file:" << file.fileName().toStdString().c_str();
}
#endif
return true;
}
bool AudioOutput::alert(QString text)
{
// Play alert sound
// Say alert message
return say(text, 2);
}
bool AudioOutput::startEmergency()
{
return false;
}
bool AudioOutput::stopEmergency()
{
return false;
}
void AudioOutput::selectFemaleVoice()
{
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
this->voice = register_cmu_us_slt(NULL);
#endif
}
void AudioOutput::selectMaleVoice()
{
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
this->voice = register_cmu_us_rms(NULL);
#endif
}
void AudioOutput::selectNeutralVoice()
{
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
this->voice = register_cmu_us_awb(NULL);
#endif
}
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
QStringList AudioOutput::listVoices(void)
{
QStringList l;
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
cst_voice *voice;
const cst_val *v;
/*
printf("Voices available: ");
for (v=flite_voice_list; v; v=val_cdr(v))
{
voice = val_voice(val_car(v));
QString s;
s.sprintf("%s",voice->name);
printf("%s",voice->name);
l.append(s);
}
printf("\n");
*/
#endif
return l;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
......@@ -32,7 +32,9 @@ This file is part of the QGROUNDCONTROL project
#include "QGCCore.h"
#include "MainWindow.h"
#include "configuration.h"
#ifdef QT_DEBUG
#include "AutoTest.h"
#endif
/* SDL does ugly things to main() */
#ifdef main
......
......@@ -7,9 +7,9 @@
#include <QTimer>
#include <QShowEvent>
#include <QHideEvent>
#include<QtGui\qcombobox.h>
#include<QtGui\qlabel.h>
#include<QtGui\qlayout.h>
#include <QComboBox>
#include <QLabel>
#include <QLayout>
#include <LinkInterface.h>
#include"XbeeLinkInterface.h"
#include "../comm/HexSpinBox.h"
......@@ -62,4 +62,4 @@ signals:
};
#endif //_XBEECONFIGURATIONWINDOW_H_
\ No newline at end of file
#endif //_XBEECONFIGURATIONWINDOW_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment