From 76be45242ceccc7da0067eb2101ac315ef5f9d3c Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Fri, 17 May 2013 21:44:11 +0300 Subject: [PATCH 1/5] OP-955: replace gcs_version_info.h by version_info.h and version_info.cpp This commit breaks the build. Other files should be updated accordingly. --- ground/openpilotgcs/src/app/app.pro | 5 +- ground/openpilotgcs/src/app/version_info.cpp | 27 +++++++++++ .../src/app/version_info.cpp.template | 48 +++++++++++++++++++ .../{gcsversioninfo.pri => version_info.pri} | 12 ++--- ground/openpilotgcs/src/gcs_version_info.h | 6 --- ground/openpilotgcs/src/version_info.h | 40 ++++++++++++++++ 6 files changed, 124 insertions(+), 14 deletions(-) create mode 100644 ground/openpilotgcs/src/app/version_info.cpp create mode 100644 ground/openpilotgcs/src/app/version_info.cpp.template rename ground/openpilotgcs/src/app/{gcsversioninfo.pri => version_info.pri} (84%) delete mode 100644 ground/openpilotgcs/src/gcs_version_info.h create mode 100644 ground/openpilotgcs/src/version_info.h diff --git a/ground/openpilotgcs/src/app/app.pro b/ground/openpilotgcs/src/app/app.pro index 9d5c1446b..d2c1880e0 100644 --- a/ground/openpilotgcs/src/app/app.pro +++ b/ground/openpilotgcs/src/app/app.pro @@ -1,13 +1,14 @@ include(../../openpilotgcs.pri) include(../shared/qtsingleapplication/qtsingleapplication.pri) -include(gcsversioninfo.pri) +include(version_info.pri) TEMPLATE = app TARGET = $$GCS_APP_TARGET DESTDIR = $$GCS_APP_PATH QT += xml SOURCES += main.cpp \ - gcssplashscreen.cpp + gcssplashscreen.cpp \ + version_info.cpp include(../rpath.pri) include(../libs/utils/utils.pri) diff --git a/ground/openpilotgcs/src/app/version_info.cpp b/ground/openpilotgcs/src/app/version_info.cpp new file mode 100644 index 000000000..e3c712483 --- /dev/null +++ b/ground/openpilotgcs/src/app/version_info.cpp @@ -0,0 +1,27 @@ +/** + ****************************************************************************** + * @file version_info.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2013. + * @addtogroup VersionInfo + * @{ + * @brief This file includes autogenerated version info data file. + * The autogenerated file is build by app/version_info.pri. + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "../version_info.h" +#include "../../../../build/openpilotgcs-synthetics/version_info.cpp" diff --git a/ground/openpilotgcs/src/app/version_info.cpp.template b/ground/openpilotgcs/src/app/version_info.cpp.template new file mode 100644 index 000000000..214ad7b3b --- /dev/null +++ b/ground/openpilotgcs/src/app/version_info.cpp.template @@ -0,0 +1,48 @@ +/** + ****************************************************************************** + * @file version_info.cpp.template + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2013. + * @addtogroup VersionInfo + * @{ + * @brief The template file used to generate the real source file called + * build/openpilotgcs-synthetics/version_info.cpp + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +VersionInfo::VersionInfo() +{ +} + +QString VersionInfo::revision() +{ + return "${REVISION}"; +} + +QString VersionInfo::year() +{ + return "${YEAR}"; +} + +QString VersionInfo::origin() +{ + return "${ORIGIN}"; +} + +QString VersionInfo::uavoHash() +{ + return "{ ${UAVOSHA1} }"; +} diff --git a/ground/openpilotgcs/src/app/gcsversioninfo.pri b/ground/openpilotgcs/src/app/version_info.pri similarity index 84% rename from ground/openpilotgcs/src/app/gcsversioninfo.pri rename to ground/openpilotgcs/src/app/version_info.pri index bec785f58..e8a5ccbe1 100644 --- a/ground/openpilotgcs/src/app/gcsversioninfo.pri +++ b/ground/openpilotgcs/src/app/version_info.pri @@ -1,5 +1,5 @@ # -# This qmake file generates a header with the GCS version info string. +# This qmake file generates a version info class implementation. # # This is a bit tricky since the script should be run always and before # the other dependencies evaluation. @@ -32,20 +32,20 @@ PYTHON_DIR = python-2.7.4 # Define other variables VERSION_INFO_DIR = $$GCS_BUILD_TREE/../openpilotgcs-synthetics - VERSION_INFO_HEADER = $$VERSION_INFO_DIR/gcs_version_info.h VERSION_INFO_SCRIPT = $$ROOT_DIR/make/scripts/version-info.py - VERSION_INFO_TEMPLATE = $$ROOT_DIR/make/templates/gcs_version_info.h.template VERSION_INFO_COMMAND = $$PYTHON \"$$VERSION_INFO_SCRIPT\" + VERSION_INFO_TEMPLATE = $$GCS_SOURCE_TREE/src/app/version_info.cpp.template + VERSION_INFO_FILE = $$VERSION_INFO_DIR/version_info.cpp UAVO_DEF_PATH = $$ROOT_DIR/shared/uavobjectdefinition - # Create custom version_info target which generates a header - version_info.target = $$VERSION_INFO_HEADER + # Create custom version_info target which generates a real file + version_info.target = $$VERSION_INFO_FILE version_info.commands = -$(MKDIR) $$targetPath($$VERSION_INFO_DIR) $$addNewline() version_info.commands += $$VERSION_INFO_COMMAND \ --path=\"$$GCS_SOURCE_TREE\" \ --template=\"$$VERSION_INFO_TEMPLATE\" \ --uavodir=\"$$UAVO_DEF_PATH\" \ - --outfile=\"$$VERSION_INFO_HEADER\" + --outfile=\"$$VERSION_INFO_FILE\" version_info.depends = FORCE QMAKE_EXTRA_TARGETS += version_info diff --git a/ground/openpilotgcs/src/gcs_version_info.h b/ground/openpilotgcs/src/gcs_version_info.h deleted file mode 100644 index 4f4bc2261..000000000 --- a/ground/openpilotgcs/src/gcs_version_info.h +++ /dev/null @@ -1,6 +0,0 @@ -// -// This file includes autogenerated version info header used by other plugins. -// The autogenerated file is build by app/gcsversioninfo.pri. -// - -#include "../../../build/openpilotgcs-synthetics/gcs_version_info.h" diff --git a/ground/openpilotgcs/src/version_info.h b/ground/openpilotgcs/src/version_info.h new file mode 100644 index 000000000..b517e7307 --- /dev/null +++ b/ground/openpilotgcs/src/version_info.h @@ -0,0 +1,40 @@ +/** + ****************************************************************************** + * @file version_info.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2013. + * @addtogroup VersionInfo + * @{ + * @brief GCS version info class header. + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef VERSION_INFO_H +#define VERSION_INFO_H + +#include + +class VersionInfo { +public: + static QString revision(); + static QString year(); + static QString origin(); + static QString uavoHash(); +private: + VersionInfo(); +}; + +#endif // VERSION_INFO_H From 62ee55fbb8aee11c3f5a6ed69dff2936e0e42f5a Mon Sep 17 00:00:00 2001 From: Fredrik Arvidsson Date: Sat, 18 May 2013 14:28:46 +0200 Subject: [PATCH 2/5] OP-955 Moved generated version info to its own lib. Updated code using version info in all referenced places. --- ground/openpilotgcs/src/app/app.pro | 6 +- .../openpilotgcs/src/app/gcssplashscreen.cpp | 19 +-- ground/openpilotgcs/src/app/gcssplashscreen.h | 2 - ground/openpilotgcs/src/libs/libs.pro | 1 + .../versioninfo}/version_info.cpp | 2 +- .../versioninfo}/version_info.cpp.template | 0 .../src/{ => libs/versioninfo}/version_info.h | 0 .../src/libs/versioninfo/versioninfo.pri | 1 + .../versioninfo/versioninfo.pro} | 13 +- .../src/plugins/coreplugin/authorsdialog.cpp | 149 +++++++++--------- .../src/plugins/coreplugin/coreconstants.h | 25 --- .../src/plugins/coreplugin/coreplugin.pro | 1 + .../src/plugins/coreplugin/versiondialog.cpp | 93 ++++++----- .../src/plugins/coreplugin/versiondialog.h | 2 - .../uavsettingsimportexport.h | 2 +- .../uavsettingsimportexport.pro | 1 + .../uavsettingsimportexportfactory.cpp | 3 +- .../uavsettingsimportexportfactory.h | 2 +- .../src/plugins/uploader/uploader.pro | 1 + .../plugins/uploader/uploadergadgetwidget.cpp | 6 +- 20 files changed, 151 insertions(+), 178 deletions(-) rename ground/openpilotgcs/src/{app => libs/versioninfo}/version_info.cpp (97%) rename ground/openpilotgcs/src/{app => libs/versioninfo}/version_info.cpp.template (100%) rename ground/openpilotgcs/src/{ => libs/versioninfo}/version_info.h (100%) create mode 100644 ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri rename ground/openpilotgcs/src/{app/version_info.pri => libs/versioninfo/versioninfo.pro} (91%) diff --git a/ground/openpilotgcs/src/app/app.pro b/ground/openpilotgcs/src/app/app.pro index d2c1880e0..029b32899 100644 --- a/ground/openpilotgcs/src/app/app.pro +++ b/ground/openpilotgcs/src/app/app.pro @@ -1,16 +1,16 @@ include(../../openpilotgcs.pri) include(../shared/qtsingleapplication/qtsingleapplication.pri) -include(version_info.pri) TEMPLATE = app TARGET = $$GCS_APP_TARGET DESTDIR = $$GCS_APP_PATH QT += xml SOURCES += main.cpp \ - gcssplashscreen.cpp \ - version_info.cpp + gcssplashscreen.cpp + include(../rpath.pri) include(../libs/utils/utils.pri) +include(../libs/versioninfo/versioninfo.pri) LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation) diff --git a/ground/openpilotgcs/src/app/gcssplashscreen.cpp b/ground/openpilotgcs/src/app/gcssplashscreen.cpp index 568f2c683..d6a53fe2c 100644 --- a/ground/openpilotgcs/src/app/gcssplashscreen.cpp +++ b/ground/openpilotgcs/src/app/gcssplashscreen.cpp @@ -26,6 +26,7 @@ */ #include "gcssplashscreen.h" +#include "versioninfo/version_info.h" #include const QChar CopyrightSymbol(0x00a9); @@ -33,20 +34,6 @@ const QChar CopyrightSymbol(0x00a9); GCSSplashScreen::GCSSplashScreen() : QSplashScreen(), m_pixmap(0), m_painter(0) { - QString revision; - QString year; -#ifdef GCS_REVISION - revision = GCS_REVISION; -#else - revision = tr("N/A"); -#endif - -#ifdef GCS_YEAR - year = GCS_YEAR; -#else - year = "2013"; -#endif - setWindowFlags(windowFlags()); m_pixmap = new QPixmap(":/app/splash.png"); @@ -55,11 +42,11 @@ GCSSplashScreen::GCSSplashScreen() : QFont font("Tahoma", 8); m_painter->setFont(font); m_painter->drawText(405, 170, QString(CopyrightSymbol) + - QString(" 2010-") + year + + QString(" 2010-") + VersionInfo::year() + QString(tr(" The OpenPilot Project - All Rights Reserved"))); m_painter->drawText(406, 173, 310, 100, Qt::TextWordWrap|Qt::AlignTop|Qt::AlignLeft, - QString(tr("GCS Revision - ")) + revision); + QString(tr("GCS Revision - ")) + VersionInfo::revision()); setPixmap(*m_pixmap); } diff --git a/ground/openpilotgcs/src/app/gcssplashscreen.h b/ground/openpilotgcs/src/app/gcssplashscreen.h index 6c04e2367..dd26077b1 100644 --- a/ground/openpilotgcs/src/app/gcssplashscreen.h +++ b/ground/openpilotgcs/src/app/gcssplashscreen.h @@ -33,8 +33,6 @@ #include #include -#include "../gcs_version_info.h" - class GCSSplashScreen : public QSplashScreen { Q_OBJECT diff --git a/ground/openpilotgcs/src/libs/libs.pro b/ground/openpilotgcs/src/libs/libs.pro index 07227ff14..a75ef520e 100644 --- a/ground/openpilotgcs/src/libs/libs.pro +++ b/ground/openpilotgcs/src/libs/libs.pro @@ -2,6 +2,7 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS = \ + versioninfo \ qscispinbox\ qtconcurrent \ aggregation \ diff --git a/ground/openpilotgcs/src/app/version_info.cpp b/ground/openpilotgcs/src/libs/versioninfo/version_info.cpp similarity index 97% rename from ground/openpilotgcs/src/app/version_info.cpp rename to ground/openpilotgcs/src/libs/versioninfo/version_info.cpp index e3c712483..97e4dfbf6 100644 --- a/ground/openpilotgcs/src/app/version_info.cpp +++ b/ground/openpilotgcs/src/libs/versioninfo/version_info.cpp @@ -23,5 +23,5 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "../version_info.h" +#include "version_info.h" #include "../../../../build/openpilotgcs-synthetics/version_info.cpp" diff --git a/ground/openpilotgcs/src/app/version_info.cpp.template b/ground/openpilotgcs/src/libs/versioninfo/version_info.cpp.template similarity index 100% rename from ground/openpilotgcs/src/app/version_info.cpp.template rename to ground/openpilotgcs/src/libs/versioninfo/version_info.cpp.template diff --git a/ground/openpilotgcs/src/version_info.h b/ground/openpilotgcs/src/libs/versioninfo/version_info.h similarity index 100% rename from ground/openpilotgcs/src/version_info.h rename to ground/openpilotgcs/src/libs/versioninfo/version_info.h diff --git a/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri b/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri new file mode 100644 index 000000000..8d65824fc --- /dev/null +++ b/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri @@ -0,0 +1 @@ +LIBS *= -l$$qtLibraryName(VersionInfo) \ No newline at end of file diff --git a/ground/openpilotgcs/src/app/version_info.pri b/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pro similarity index 91% rename from ground/openpilotgcs/src/app/version_info.pri rename to ground/openpilotgcs/src/libs/versioninfo/versioninfo.pro index e8a5ccbe1..f9e890433 100644 --- a/ground/openpilotgcs/src/app/version_info.pri +++ b/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pro @@ -1,3 +1,10 @@ +TEMPLATE = lib +TARGET = VersionInfo + +include(../../openpilotgcslibrary.pri) + +HEADERS = version_info.h + # # This qmake file generates a version info class implementation. # @@ -34,7 +41,7 @@ PYTHON_DIR = python-2.7.4 VERSION_INFO_DIR = $$GCS_BUILD_TREE/../openpilotgcs-synthetics VERSION_INFO_SCRIPT = $$ROOT_DIR/make/scripts/version-info.py VERSION_INFO_COMMAND = $$PYTHON \"$$VERSION_INFO_SCRIPT\" - VERSION_INFO_TEMPLATE = $$GCS_SOURCE_TREE/src/app/version_info.cpp.template + VERSION_INFO_TEMPLATE = $$GCS_SOURCE_TREE/src/libs/versioninfo/version_info.cpp.template VERSION_INFO_FILE = $$VERSION_INFO_DIR/version_info.cpp UAVO_DEF_PATH = $$ROOT_DIR/shared/uavobjectdefinition @@ -60,3 +67,7 @@ PYTHON_DIR = python-2.7.4 } QMAKE_EXTRA_TARGETS += version_info_hook } + + +SOURCES = version_info.cpp + diff --git a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp index 8bf76b4ea..9f5a682bd 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp @@ -11,24 +11,24 @@ * @brief The Core GCS plugin *****************************************************************************/ /* - * This program 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 + * This program 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. - * - * This program 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 + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "authorsdialog.h" -#include "../../gcs_version_info.h" +#include "versioninfo/version_info.h" #include "coreconstants.h" #include "icore.h" @@ -43,7 +43,7 @@ #include #include #include - + #include #include #include @@ -62,71 +62,70 @@ AuthorsDialog::AuthorsDialog(QWidget *parent) setWindowIcon(QIcon(":/core/images/openpilot_logo_32.png")); setWindowTitle(tr("About OpenPilot")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - // This loads a QML doc containing a Tabbed view - QDeclarativeView *view = new QDeclarativeView(this); - view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml")); + // This loads a QML doc containing a Tabbed view + QDeclarativeView *view = new QDeclarativeView(this); + view->setSource(QUrl("qrc:/core/qml/AboutDialog.qml")); + QString version = QLatin1String(GCS_VERSION_LONG); + version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate); - QString version = QLatin1String(GCS_VERSION_LONG); - version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate); - - QString ideRev; -#ifdef GCS_REVISION - //: This gets conditionally inserted as argument %8 into the description string. - ideRev = tr("From revision %1
").arg(QString::fromLatin1(GCS_REVISION_STR).left(10)); -#endif + QString ideRev; - #ifdef UAVO_HASH - //: This gets conditionally inserted as argument %11 into the description string. - QByteArray uavoHashArray; - QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR); - uavoHash.chop(2); - uavoHash.remove(0, 2); - uavoHash = uavoHash.trimmed(); - bool ok; - foreach(QString str, uavoHash.split(",")) { - uavoHashArray.append(str.toInt(&ok, 16)); - } - QString gcsUavoHashStr; - foreach(char i, uavoHashArray) { - gcsUavoHashStr.append(QString::number(i, 16).right(2)); - } - QString uavoHashStr = gcsUavoHashStr; -#else - QString uavoHashStr = "N/A"; -#endif - const QString description = tr( - "

OpenPilot Ground Control Station

" - "GCS Revision: %1
" - "UAVO Hash: %2
" - "
" - "Built from %3
" - "Built on %4 at %5
" - "Based on Qt %6 (%7 bit)
" - "
" - "© %8, 2010-%9. All rights reserved.
" - "
" - "This program 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.
" - "
" - "The program is provided AS IS with NO WARRANTY OF ANY KIND, " - "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " - "PARTICULAR PURPOSE.
" - ).arg( - QString::fromLatin1(GCS_REVISION_STR).left(60), // %1 - uavoHashStr, // %2 - QLatin1String(GCS_ORIGIN_STR), // $3 - QLatin1String(__DATE__), // %4 - QLatin1String(__TIME__), // %5 - QLatin1String(QT_VERSION_STR), // %6 - QString::number(QSysInfo::WordSize), // %7 - QLatin1String(GCS_AUTHOR), // %8 - QLatin1String(GCS_YEAR_STR) // %9 - ); - // Expose the version description to the QML doc - view->rootContext()->setContextProperty("version", description); - + // : This gets conditionally inserted as argument %8 into the description string. + ideRev = tr("From revision %1
").arg(VersionInfo::revision().left(10)); + + QString uavoHashStr; + if (VersionInfo::uavoHash().length() > 15) { + // : This gets conditionally inserted as argument %11 into the description string. + QByteArray uavoHashArray; + QString uavoHash = VersionInfo::uavoHash(); + uavoHash.chop(2); + uavoHash.remove(0, 2); + uavoHash = uavoHash.trimmed(); + bool ok; + foreach(QString str, uavoHash.split(",")) { + uavoHashArray.append(str.toInt(&ok, 16)); + } + QString gcsUavoHashStr; + foreach(char i, uavoHashArray) { + gcsUavoHashStr.append(QString::number(i, 16).right(2)); + } + uavoHashStr = gcsUavoHashStr; + } else { + uavoHashStr = "N/A"; + } + + const QString description = tr( + "

OpenPilot Ground Control Station

" + "GCS Revision: %1
" + "UAVO Hash: %2
" + "
" + "Built from %3
" + "Built on %4 at %5
" + "Based on Qt %6 (%7 bit)
" + "
" + "© %8, 2010-%9. All rights reserved.
" + "
" + "This program 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.
" + "
" + "The program is provided AS IS with NO WARRANTY OF ANY KIND, " + "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " + "PARTICULAR PURPOSE.
" + ).arg( + VersionInfo::revision().left(60), // %1 + uavoHashStr, // %2 + VersionInfo::origin(), // $3 + QLatin1String(__DATE__), // %4 + QLatin1String(__TIME__), // %5 + QLatin1String(QT_VERSION_STR), // %6 + QString::number(QSysInfo::WordSize), // %7 + QLatin1String(GCS_AUTHOR), // %8 + VersionInfo::year() // %9 + ); + // Expose the version description to the QML doc + view->rootContext()->setContextProperty("version", description); } diff --git a/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h b/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h index 6373fc28b..3f73cc65c 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h @@ -44,31 +44,6 @@ namespace Constants { "." STRINGIFY(GCS_VERSION_RELEASE) const char * const GCS_VERSION_LONG = GCS_VERSION; - -#ifdef GCS_REVISION -const char * const GCS_REVISION_STR = GCS_REVISION; -#else -const char * const GCS_REVISION_STR = "N/A"; -#endif - -#ifdef GCS_YEAR -const char * const GCS_YEAR_STR = GCS_YEAR; -#else -const char * const GCS_YEAR_STR = "2013"; -#endif - -#ifdef GCS_ORIGIN -const char * const GCS_ORIGIN_STR = GCS_ORIGIN; -#else -const char * const GCS_ORIGIN_STR = "unknown repository"; -#endif - -#ifdef UAVO_HASH -const char * const UAVOSHA1_STR = STRINGIFY(UAVO_HASH); -#else -const char * const UAVOSHA1_STR = ""; -#endif - const char * const GCS_AUTHOR = "The OpenPilot Project"; const char * const GCS_HELP = "http://wiki.openpilot.org"; diff --git a/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro b/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro index 78f3c9f6b..2028d927c 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro +++ b/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro @@ -11,6 +11,7 @@ QT += declarative \ include(../../openpilotgcsplugin.pri) include(../../libs/utils/utils.pri) +include(../../libs/versioninfo/versioninfo.pri) include(../../shared/scriptwrapper/scriptwrapper.pri) include(coreplugin_dependencies.pri) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp index 01cf29feb..6a9468e45 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp @@ -11,23 +11,23 @@ * @brief The Core GCS plugin *****************************************************************************/ /* - * This program 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 + * This program 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. - * - * This program 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 + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "versiondialog.h" - +#include "versioninfo/version_info.h" #include "coreconstants.h" #include "icore.h" @@ -59,29 +59,28 @@ VersionDialog::VersionDialog(QWidget *parent) QGridLayout *layout = new QGridLayout(this); layout->setSizeConstraint(QLayout::SetFixedSize); -#ifdef UAVO_HASH - //: This gets conditionally inserted as argument %11 into the description string. - QByteArray uavoHashArray; - QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR); - uavoHash.chop(2); - uavoHash.remove(0,2); - uavoHash=uavoHash.trimmed(); - bool ok; - foreach(QString str,uavoHash.split(",")) - { - uavoHashArray.append(str.toInt(&ok,16)); - } - QString gcsUavoHashStr; - foreach(char i, uavoHashArray) - { - gcsUavoHashStr.append(QString::number(i,16).right(2)); - } - QString uavoHashStr = gcsUavoHashStr; -#else - QString uavoHashStr = "N/A"; -#endif + QString uavoHashStr; + if (VersionInfo::uavoHash().length() > 15) { + // : This gets conditionally inserted as argument %11 into the description string. + QByteArray uavoHashArray; + QString uavoHash = VersionInfo::uavoHash(); + uavoHash.chop(2); + uavoHash.remove(0, 2); + uavoHash = uavoHash.trimmed(); + bool ok; + foreach(QString str, uavoHash.split(",")) { + uavoHashArray.append(str.toInt(&ok, 16)); + } + QString gcsUavoHashStr; + foreach(char i, uavoHashArray) { + gcsUavoHashStr.append(QString::number(i, 16).right(2)); + } + uavoHashStr = gcsUavoHashStr; + } else { + uavoHashStr = "N/A"; + } - const QString description = tr( + const QString description = tr( "

OpenPilot Ground Control Station

" "GCS Revision: %1
" "UAVO Hash: %2
" @@ -100,17 +99,17 @@ VersionDialog::VersionDialog(QWidget *parent) "The program is provided AS IS with NO WARRANTY OF ANY KIND, " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " "PARTICULAR PURPOSE." - ).arg( - QString::fromLatin1(GCS_REVISION_STR).left(60), // %1 - uavoHashStr, // %2 - QLatin1String(GCS_ORIGIN_STR), // $3 - QLatin1String(__DATE__), // %4 - QLatin1String(__TIME__), // %5 - QLatin1String(QT_VERSION_STR), // %6 - QString::number(QSysInfo::WordSize), // %7 - QLatin1String(GCS_AUTHOR), // %8 - QLatin1String(GCS_YEAR_STR) // %9 - ); + ).arg( + VersionInfo::revision().left(60), // %1 + uavoHashStr, // %2 + VersionInfo::origin(), // $3 + QLatin1String(__DATE__), // %4 + QLatin1String(__TIME__), // %5 + QLatin1String(QT_VERSION_STR), // %6 + QString::number(QSysInfo::WordSize), // %7 + QLatin1String(GCS_AUTHOR), // %8 + VersionInfo::year() // %9 + ); QLabel *copyRightLabel = new QLabel(description); copyRightLabel->setWordWrap(true); @@ -118,14 +117,14 @@ VersionDialog::VersionDialog(QWidget *parent) copyRightLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); - QPushButton *closeButton = buttonBox->button(QDialogButtonBox::Close); + QPushButton *closeButton = buttonBox->button(QDialogButtonBox::Close); QTC_ASSERT(closeButton, /**/); buttonBox->addButton(closeButton, QDialogButtonBox::ButtonRole(QDialogButtonBox::RejectRole | QDialogButtonBox::AcceptRole)); - connect(buttonBox , SIGNAL(rejected()), this, SLOT(reject())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); QLabel *logoLabel = new QLabel; logoLabel->setPixmap(QPixmap(QLatin1String(":/core/images/openpilot_logo_128.png"))); - layout->addWidget(logoLabel , 0, 0, 1, 1); + layout->addWidget(logoLabel, 0, 0, 1, 1); layout->addWidget(copyRightLabel, 0, 1, 4, 4); layout->addWidget(buttonBox, 4, 0, 1, 5); } diff --git a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h index fa5a8a89c..cc8294e66 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h @@ -29,8 +29,6 @@ #ifndef VERSIONDIALOG_H #define VERSIONDIALOG_H -#include "../../gcs_version_info.h" - #include namespace Core { diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h index 3cc77a9fc..da5dcec71 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h @@ -30,8 +30,8 @@ #include #include "uavobjectutil/uavobjectutilmanager.h" #include "uavsettingsimportexport_global.h" -#include "../../gcs_version_info.h" #include "uavsettingsimportexportfactory.h" + class UAVSETTINGSIMPORTEXPORT_EXPORT UAVSettingsImportExportPlugin : public ExtensionSystem::IPlugin { Q_OBJECT diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro index aa8abccf1..609db4c8f 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro @@ -6,6 +6,7 @@ TARGET = UAVSettingsImportExport DEFINES += UAVSETTINGSIMPORTEXPORT_LIBRARY include(../../openpilotgcsplugin.pri) include(uavsettingsimportexport_dependencies.pri) +include(../../libs/versioninfo/versioninfo.pri) HEADERS += uavsettingsimportexport.h \ importsummary.h \ diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp index 01557a4a1..c70db1449 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp @@ -31,6 +31,7 @@ #include #include #include "importsummary.h" +#include "versioninfo/version_info.h" // for menu item #include @@ -244,7 +245,7 @@ QString UAVSettingsImportExportFactory::createXMLDocument(const enum storedData fw.setAttribute("tag", board.gitTag); versionInfo.appendChild(fw); - QString gcsRevision = QString::fromLatin1(Core::Constants::GCS_REVISION_STR); + QString gcsRevision = VersionInfo::revision(); QString gcsGitDate = gcsRevision.mid(gcsRevision.indexOf(" ") + 1, 14); QString gcsGitHash = gcsRevision.mid(gcsRevision.indexOf(":") + 1, 8); QString gcsGitTag = gcsRevision.left(gcsRevision.indexOf(":")); diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h index aa07d62e1..d706e8b55 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h @@ -28,7 +28,7 @@ #define UAVSETTINGSIMPORTEXPORTFACTORY_H #include "uavsettingsimportexport_global.h" #include "uavobjectutil/uavobjectutilmanager.h" -#include "../../gcs_version_info.h" + class UAVSETTINGSIMPORTEXPORT_EXPORT UAVSettingsImportExportFactory : public QObject { Q_OBJECT diff --git a/ground/openpilotgcs/src/plugins/uploader/uploader.pro b/ground/openpilotgcs/src/plugins/uploader/uploader.pro index 6a1c17407..f1397b851 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploader.pro +++ b/ground/openpilotgcs/src/plugins/uploader/uploader.pro @@ -3,6 +3,7 @@ TARGET = Uploader DEFINES += UPLOADER_LIBRARY QT += svg include(uploader_dependencies.pri) +include(../../libs/versioninfo/versioninfo.pri) INCLUDEPATH += ../../libs/qextserialport/src macx { QMAKE_CXXFLAGS += -fpermissive diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index aeab03d8f..33d81ce1e 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -25,7 +25,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "uploadergadgetwidget.h" -#include "../../gcs_version_info.h" +#include "versioninfo/version_info.h" #include #include #include "flightstatus.h" @@ -907,7 +907,7 @@ void UploaderGadgetWidget::versionMatchCheck() UAVObjectUtilManager *utilMngr = pm->getObject(); deviceDescriptorStruct boardDescription = utilMngr->getBoardDescriptionStruct(); QByteArray uavoHashArray; - QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR); + QString uavoHash = VersionInfo::uavoHash(); uavoHash.chop(2); uavoHash.remove(0,2); uavoHash=uavoHash.trimmed(); @@ -920,7 +920,7 @@ void UploaderGadgetWidget::versionMatchCheck() QByteArray fwVersion=boardDescription.uavoHash; if (fwVersion != uavoHashArray) { - QString gcsDescription = QString::fromLatin1(Core::Constants::GCS_REVISION_STR); + QString gcsDescription = VersionInfo::revision(); QString gcsGitHash = gcsDescription.mid(gcsDescription.indexOf(":")+1, 8); gcsGitHash.remove( QRegExp("^[0]*") ); QString gcsGitDate = gcsDescription.mid(gcsDescription.indexOf(" ")+1, 14); From bff47dfa0e658e08d1c6461b7f686a4ea70a7a3a Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Sat, 18 May 2013 17:25:26 +0300 Subject: [PATCH 3/5] Fix weird error of running python script with extra --verbose option as a part of script name This error of building any EF targets was found on Windows if used with make V=1 verbose output option. The '--verbose' python script option was used by the Windows make as a part of python script file name with 'file not found' error. Now it works. Still can't get the cause of that error, though... --- flight/targets/common/entire_flash/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flight/targets/common/entire_flash/Makefile b/flight/targets/common/entire_flash/Makefile index 8a1826b2c..12c525142 100644 --- a/flight/targets/common/entire_flash/Makefile +++ b/flight/targets/common/entire_flash/Makefile @@ -42,7 +42,8 @@ FWINFO_BIN = $(FW_BIN).firmware_info.bin $(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN) $(V0) @$(ECHO) $(MSG_FLASH_IMG) $@ - $(V1) $(ENTIRE_FLASH) $(EF_VERBOSE) \ + $(V1) $(ENTIRE_FLASH) \ + $(EF_VERBOSE) \ --bl-bank-base=$(BL_BANK_BASE) \ --bl-bank-size=$(BL_BANK_SIZE) \ --fw-bank-base=$(FW_BANK_BASE) \ From 5274a6c6faa7808b6a76aba753e2801f9cd258d7 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Sat, 18 May 2013 20:28:52 +0200 Subject: [PATCH 4/5] OP-955: rename version_info related files an directories --- ground/openpilotgcs/src/app/app.pro | 2 +- ground/openpilotgcs/src/app/gcssplashscreen.cpp | 2 +- ground/openpilotgcs/src/libs/libs.pro | 2 +- .../libs/{versioninfo => version_info}/version_info.cpp | 0 .../version_info.cpp.template | 0 .../libs/{versioninfo => version_info}/version_info.h | 0 .../openpilotgcs/src/libs/version_info/version_info.pri | 1 + .../versioninfo.pro => version_info/version_info.pro} | 9 +++------ ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri | 1 - .../src/plugins/coreplugin/authorsdialog.cpp | 2 +- .../openpilotgcs/src/plugins/coreplugin/coreplugin.pro | 2 +- .../src/plugins/coreplugin/versiondialog.cpp | 2 +- .../uavsettingsimportexport/uavsettingsimportexport.pro | 2 +- .../uavsettingsimportexportfactory.cpp | 2 +- ground/openpilotgcs/src/plugins/uploader/uploader.pro | 2 +- .../src/plugins/uploader/uploadergadgetwidget.cpp | 2 +- 16 files changed, 14 insertions(+), 17 deletions(-) rename ground/openpilotgcs/src/libs/{versioninfo => version_info}/version_info.cpp (100%) rename ground/openpilotgcs/src/libs/{versioninfo => version_info}/version_info.cpp.template (100%) rename ground/openpilotgcs/src/libs/{versioninfo => version_info}/version_info.h (100%) create mode 100644 ground/openpilotgcs/src/libs/version_info/version_info.pri rename ground/openpilotgcs/src/libs/{versioninfo/versioninfo.pro => version_info/version_info.pro} (94%) delete mode 100644 ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri diff --git a/ground/openpilotgcs/src/app/app.pro b/ground/openpilotgcs/src/app/app.pro index 029b32899..2eb1d8dc7 100644 --- a/ground/openpilotgcs/src/app/app.pro +++ b/ground/openpilotgcs/src/app/app.pro @@ -10,7 +10,7 @@ SOURCES += main.cpp \ include(../rpath.pri) include(../libs/utils/utils.pri) -include(../libs/versioninfo/versioninfo.pri) +include(../libs/version_info/version_info.pri) LIBS *= -l$$qtLibraryName(ExtensionSystem) -l$$qtLibraryName(Aggregation) diff --git a/ground/openpilotgcs/src/app/gcssplashscreen.cpp b/ground/openpilotgcs/src/app/gcssplashscreen.cpp index d6a53fe2c..e522edad9 100644 --- a/ground/openpilotgcs/src/app/gcssplashscreen.cpp +++ b/ground/openpilotgcs/src/app/gcssplashscreen.cpp @@ -26,7 +26,7 @@ */ #include "gcssplashscreen.h" -#include "versioninfo/version_info.h" +#include "version_info/version_info.h" #include const QChar CopyrightSymbol(0x00a9); diff --git a/ground/openpilotgcs/src/libs/libs.pro b/ground/openpilotgcs/src/libs/libs.pro index a75ef520e..e741d755f 100644 --- a/ground/openpilotgcs/src/libs/libs.pro +++ b/ground/openpilotgcs/src/libs/libs.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS = \ - versioninfo \ + version_info \ qscispinbox\ qtconcurrent \ aggregation \ diff --git a/ground/openpilotgcs/src/libs/versioninfo/version_info.cpp b/ground/openpilotgcs/src/libs/version_info/version_info.cpp similarity index 100% rename from ground/openpilotgcs/src/libs/versioninfo/version_info.cpp rename to ground/openpilotgcs/src/libs/version_info/version_info.cpp diff --git a/ground/openpilotgcs/src/libs/versioninfo/version_info.cpp.template b/ground/openpilotgcs/src/libs/version_info/version_info.cpp.template similarity index 100% rename from ground/openpilotgcs/src/libs/versioninfo/version_info.cpp.template rename to ground/openpilotgcs/src/libs/version_info/version_info.cpp.template diff --git a/ground/openpilotgcs/src/libs/versioninfo/version_info.h b/ground/openpilotgcs/src/libs/version_info/version_info.h similarity index 100% rename from ground/openpilotgcs/src/libs/versioninfo/version_info.h rename to ground/openpilotgcs/src/libs/version_info/version_info.h diff --git a/ground/openpilotgcs/src/libs/version_info/version_info.pri b/ground/openpilotgcs/src/libs/version_info/version_info.pri new file mode 100644 index 000000000..332f07497 --- /dev/null +++ b/ground/openpilotgcs/src/libs/version_info/version_info.pri @@ -0,0 +1 @@ +LIBS *= -l$$qtLibraryName(VersionInfo) diff --git a/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pro b/ground/openpilotgcs/src/libs/version_info/version_info.pro similarity index 94% rename from ground/openpilotgcs/src/libs/versioninfo/versioninfo.pro rename to ground/openpilotgcs/src/libs/version_info/version_info.pro index f9e890433..a00cb8424 100644 --- a/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pro +++ b/ground/openpilotgcs/src/libs/version_info/version_info.pro @@ -4,9 +4,10 @@ TARGET = VersionInfo include(../../openpilotgcslibrary.pri) HEADERS = version_info.h +SOURCES = version_info.cpp # -# This qmake file generates a version info class implementation. +# This qmake code generates VersionInfo class implementation. # # This is a bit tricky since the script should be run always and before # the other dependencies evaluation. @@ -41,7 +42,7 @@ PYTHON_DIR = python-2.7.4 VERSION_INFO_DIR = $$GCS_BUILD_TREE/../openpilotgcs-synthetics VERSION_INFO_SCRIPT = $$ROOT_DIR/make/scripts/version-info.py VERSION_INFO_COMMAND = $$PYTHON \"$$VERSION_INFO_SCRIPT\" - VERSION_INFO_TEMPLATE = $$GCS_SOURCE_TREE/src/libs/versioninfo/version_info.cpp.template + VERSION_INFO_TEMPLATE = $$GCS_SOURCE_TREE/src/libs/version_info/version_info.cpp.template VERSION_INFO_FILE = $$VERSION_INFO_DIR/version_info.cpp UAVO_DEF_PATH = $$ROOT_DIR/shared/uavobjectdefinition @@ -67,7 +68,3 @@ PYTHON_DIR = python-2.7.4 } QMAKE_EXTRA_TARGETS += version_info_hook } - - -SOURCES = version_info.cpp - diff --git a/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri b/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri deleted file mode 100644 index 8d65824fc..000000000 --- a/ground/openpilotgcs/src/libs/versioninfo/versioninfo.pri +++ /dev/null @@ -1 +0,0 @@ -LIBS *= -l$$qtLibraryName(VersionInfo) \ No newline at end of file diff --git a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp index 9f5a682bd..847fb5369 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp @@ -28,7 +28,7 @@ #include "authorsdialog.h" -#include "versioninfo/version_info.h" +#include "version_info/version_info.h" #include "coreconstants.h" #include "icore.h" diff --git a/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro b/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro index 2028d927c..3bdbaacd5 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro +++ b/ground/openpilotgcs/src/plugins/coreplugin/coreplugin.pro @@ -11,7 +11,7 @@ QT += declarative \ include(../../openpilotgcsplugin.pri) include(../../libs/utils/utils.pri) -include(../../libs/versioninfo/versioninfo.pri) +include(../../libs/version_info/version_info.pri) include(../../shared/scriptwrapper/scriptwrapper.pri) include(coreplugin_dependencies.pri) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp index 6a9468e45..8fb160ef3 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp @@ -27,7 +27,7 @@ */ #include "versiondialog.h" -#include "versioninfo/version_info.h" +#include "version_info/version_info.h" #include "coreconstants.h" #include "icore.h" diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro index 609db4c8f..d03f46ccf 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.pro @@ -6,7 +6,7 @@ TARGET = UAVSettingsImportExport DEFINES += UAVSETTINGSIMPORTEXPORT_LIBRARY include(../../openpilotgcsplugin.pri) include(uavsettingsimportexport_dependencies.pri) -include(../../libs/versioninfo/versioninfo.pri) +include(../../libs/version_info/version_info.pri) HEADERS += uavsettingsimportexport.h \ importsummary.h \ diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp index c70db1449..cc29a5726 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.cpp @@ -31,7 +31,7 @@ #include #include #include "importsummary.h" -#include "versioninfo/version_info.h" +#include "version_info/version_info.h" // for menu item #include diff --git a/ground/openpilotgcs/src/plugins/uploader/uploader.pro b/ground/openpilotgcs/src/plugins/uploader/uploader.pro index f1397b851..6fc9bc488 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploader.pro +++ b/ground/openpilotgcs/src/plugins/uploader/uploader.pro @@ -3,7 +3,7 @@ TARGET = Uploader DEFINES += UPLOADER_LIBRARY QT += svg include(uploader_dependencies.pri) -include(../../libs/versioninfo/versioninfo.pri) +include(../../libs/version_info/version_info.pri) INCLUDEPATH += ../../libs/qextserialport/src macx { QMAKE_CXXFLAGS += -fpermissive diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 33d81ce1e..a682fe288 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -25,7 +25,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "uploadergadgetwidget.h" -#include "versioninfo/version_info.h" +#include "version_info/version_info.h" #include #include #include "flightstatus.h" From 4a93e739debf716efd9b548c91cc6dd07ac427a8 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Sun, 19 May 2013 00:11:27 +0300 Subject: [PATCH 5/5] OP-955: remove old copy of moved file --- make/templates/gcs_version_info.h.template | 40 ---------------------- 1 file changed, 40 deletions(-) delete mode 100644 make/templates/gcs_version_info.h.template diff --git a/make/templates/gcs_version_info.h.template b/make/templates/gcs_version_info.h.template deleted file mode 100644 index 04d45d580..000000000 --- a/make/templates/gcs_version_info.h.template +++ /dev/null @@ -1,40 +0,0 @@ -/** - ****************************************************************************** - * - * @file ${OUTFILENAME} - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011. - * @brief GCS revision info file autogenerated using template - * ${TEMPLATE} - * - * @see The GNU Public License (GPL) Version 3 - * - *****************************************************************************/ -/* - * This program 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. - * - * This program 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 this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef _GCSVERSIONINFO_H -#define _GCSVERSIONINFO_H - -#define GCS_REVISION "${REVISION}" -#define GCS_YEAR "${YEAR}" -#define GCS_ORIGIN "${ORIGIN}" -#define UAVO_HASH "{ ${UAVOSHA1} }" - -#endif // _GCSVERSIONINFO_H - -/** - * @} - */