From 067261ed3f443fb1d998d58a6f63a57dd115e25e Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 4 Oct 2015 22:35:04 +0200 Subject: [PATCH 01/16] LP-2 upgraded to Qt 5.5.0 (excluding sdk installer) --- ground/gcs/copydata.pro | 12 ++++----- make/tools.mk | 56 ++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ground/gcs/copydata.pro b/ground/gcs/copydata.pro index ab43eb464..dd42b0939 100644 --- a/ground/gcs/copydata.pro +++ b/ground/gcs/copydata.pro @@ -28,9 +28,9 @@ equals(copyqt, 1) { libQt5DBus.so.5 \ libQt5QuickParticles.so.5 \ libqgsttools_p.so.1 \ - libicui18n.so.53 \ - libicuuc.so.53 \ - libicudata.so.53 + libicui18n.so.54 \ + libicuuc.so.54 \ + libicudata.so.54 for(lib, QT_LIBS) { addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH}) } @@ -73,9 +73,9 @@ equals(copyqt, 1) { Qt5Quick$${DS}.dll \ Qt5QuickWidgets$${DS}.dll \ Qt5Qml$${DS}.dll \ - icuin53.dll \ - icudt53.dll \ - icuuc53.dll + icuin54.dll \ + icudt54.dll \ + icuuc54.dll # it is more robust to take the following DLLs from Qt rather than from MinGW QT_DLLS += libgcc_s_dw2-1.dll \ libstdc++-6.dll \ diff --git a/make/tools.mk b/make/tools.mk index ea5ee97a9..962ada90e 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -88,32 +88,32 @@ $(TOOL_REMOVE_TARGETS): ifeq ($(UNAME), Linux) ifeq ($(ARCH), x86_64) - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-linux-x64-5.4.1.run - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-linux-x64-5.4.1.run.md5 - QT_SDK_ARCH := gcc_64 - OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x64-qt-5.4.1.tar.gz + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0-2.run + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0-2.run.md5 + QT_SDK_ARCH := gcc_64 + OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x64-qt-5.5.0.tar.gz else - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-linux-x86-5.4.1.run - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-linux-x86-5.4.1.run.md5 - QT_SDK_ARCH := gcc - OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x86-qt-5.4.1.tar.gz + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x86-5.5.0.run + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x86-5.5.0.run.md5 + QT_SDK_ARCH := gcc + OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x86-qt-5.5.0.tar.gz endif UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1.src.tar.gz else ifeq ($(UNAME), Darwin) - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-mac-x64-clang-5.4.1.dmg - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-mac-x64-clang-5.4.1.dmg.md5 - QT_SDK_ARCH := clang_64 - QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.4.1/qt-opensource-mac-x64-clang-5.4.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.4.1 - QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.4.1 - QT_SDK_INSTALLER_DAT := /Volumes/qt-opensource-mac-x64-clang-5.4.1/qt-opensource-mac-x64-clang-5.4.1.app/Contents/Resources/installer.dat + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-mac-x64-clang-5.5.0.dmg + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-mac-x64-clang-5.5.0.dmg.md5 + QT_SDK_ARCH := clang_64 + QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.0/qt-opensource-mac-x64-clang-5.5.0.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.0 + QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.5.0 + QT_SDK_INSTALLER_DAT := /Volumes/qt-opensource-mac-x64-clang-5.5.0/qt-opensource-mac-x64-clang-5.5.0.app/Contents/Resources/installer.dat UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1.src.tar.gz - OSG_URL := + OSG_URL := http://librepilot.github.io/tools/osg-3.4-clang_64-qt-5.5.0.tar.gz else ifeq ($(UNAME), Windows) - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-windows-x86-mingw491_opengl-5.4.1.exe - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-windows-x86-mingw491_opengl-5.4.1.exe.md5 - QT_SDK_ARCH := mingw491_32 + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-windows-x86-mingw492-5.5.0.exe + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-windows-x86-mingw492-5.5.0.exe.md5 + QT_SDK_ARCH := mingw492_32 NSIS_URL := http://librepilot.github.io/tools/nsis-2.46-unicode.tar.bz2 SDL_URL := http://librepilot.github.io/tools/SDL-devel-1.2.15-mingw32.tar.gz OPENSSL_URL := http://librepilot.github.io/tools/openssl-1.0.1e-win32.tar.bz2 @@ -123,14 +123,14 @@ else ifeq ($(UNAME), Windows) CMAKE_URL := http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.zip CMAKE_MD5_URL := http://librepilot.github.io/tools/cmake-2.8.12.2-win32-x86.zip.md5 MSYS_URL := http://librepilot.github.io/tools/MSYS-1.0.11.zip - OSG_URL := http://librepilot.github.io/tools/osg-3.4-mingw491_32-qt-5.4.1.tar.gz + OSG_URL := http://librepilot.github.io/tools/osg-3.4-mingw492_32-qt-5.5.0.tar.gz endif GTEST_URL := http://librepilot.github.io/tools/gtest-1.6.0.zip CCACHE_URL := http://samba.org/ftp/ccache/ccache-3.2.2.tar.bz2 CCACHE_MD5_URL := http://librepilot.github.io/tools/ccache-3.2.2.tar.bz2.md5 -QT_SDK_DIR := $(TOOLS_DIR)/qt-5.4.1 +QT_SDK_DIR := $(TOOLS_DIR)/qt-5.5.0 UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60 DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1 GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0 @@ -139,12 +139,12 @@ OSG_TOOLS_DIR := $(TOOLS_DIR) ifeq ($(UNAME), Linux) ifeq ($(ARCH), x86_64) - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x64-qt-5.4.1 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x64-qt-5.5.0 else - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x86-qt-5.4.1 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x86-qt-5.5.0 endif else ifeq ($(UNAME), Darwin) - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-clang_64-qt-5.4.1 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-clang_64-qt-5.5.0 else ifeq ($(UNAME), Windows) MINGW_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH) # When changing PYTHON_DIR, you must also update it in ground/gcs/src/python.pri @@ -156,7 +156,7 @@ else ifeq ($(UNAME), Windows) MESAWIN_DIR := $(TOOLS_DIR)/mesawin CMAKE_DIR := $(TOOLS_DIR)/cmake-2.8.12.2-win32-x86 MSYS_DIR := $(TOOLS_DIR)/msys - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-mingw491_32-qt-5.4.1 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-mingw492_32-qt-5.5.0 endif QT_SDK_PREFIX := $(QT_SDK_DIR) @@ -631,7 +631,7 @@ endef ifeq ($(UNAME), Windows) -QT_SDK_PREFIX := $(QT_SDK_DIR)/5.4/$(QT_SDK_ARCH) +QT_SDK_PREFIX := $(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH) # This additional configuration step should not be necessary # but it is needed as a workaround to https://bugreports.qt-project.org/browse/QTBUG-33254 @@ -646,13 +646,13 @@ QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD else ifeq ($(UNAME), Linux) -QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.4/$(QT_SDK_ARCH)" +QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)" QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD $(eval $(call LINUX_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) else ifeq ($(UNAME), Darwin) -QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.4/$(QT_SDK_ARCH)" +QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)" QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD $(eval $(call MAC_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) @@ -663,7 +663,7 @@ QT_SDK_PREFIX := $(QT_SDK_DIR) .PHONY: qt_sdk_install qt_sdk_install: @$(ECHO) $(MSG_NOTICE) -------------------------------------------------------- - @$(ECHO) $(MSG_NOTICE) Please install native Qt 5.4.x SDK using package manager + @$(ECHO) $(MSG_NOTICE) Please install native Qt 5.5.x SDK using package manager @$(ECHO) $(MSG_NOTICE) -------------------------------------------------------- .PHONY: qt_sdk_clean From d0d3a56292d796b8bb3cf3bb8ca3030d44210691 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 4 Oct 2015 22:41:23 +0200 Subject: [PATCH 02/16] LP-2 fixed compilation warnings about missing QtInfoMsg in switch/case --- ground/gcs/src/app/main.cpp | 3 +++ ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp | 4 ++++ ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/ground/gcs/src/app/main.cpp b/ground/gcs/src/app/main.cpp index f13bcec76..ac97845f2 100644 --- a/ground/gcs/src/app/main.cpp +++ b/ground/gcs/src/app/main.cpp @@ -285,6 +285,9 @@ void mainMessageOutput(QtMsgType type, const QMessageLogContext &context, const case QtDebugMsg: out << "DBG: "; break; + case QtInfoMsg: + out << "INF: "; + break; case QtWarningMsg: out << "WRN: "; break; diff --git a/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp b/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp index 1958f3d0e..71060e9fb 100644 --- a/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp +++ b/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp @@ -52,6 +52,10 @@ void DebugGadgetWidget::customMessageHandler(QtMsgType type, const QMessageLogCo txt = QString("Debug: %1").arg(msg); color = Qt::black; break; + case QtInfoMsg: + txt = QString("Info: %1").arg(msg); + color = Qt::blue; + break; case QtWarningMsg: txt = QString("Warning: %1").arg(msg); color = Qt::red; diff --git a/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp b/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp index e1c39084b..6adcd4d6b 100644 --- a/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp +++ b/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp @@ -29,6 +29,7 @@ void myQDebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { + Q_UNUSED(context); static bool firstRun = true; QString txt; @@ -36,6 +37,9 @@ void myQDebugHandler(QtMsgType type, const QMessageLogContext &context, const QS case QtDebugMsg: txt = QString("Debug: %1").arg(msg); break; + case QtInfoMsg: + txt = QString("Info: %1").arg(msg); + break; case QtWarningMsg: txt = QString("Warning: %1").arg(msg); break; From f3b06daf4ca59672bc186468582b0f7cb57c5e4e Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 4 Oct 2015 22:44:24 +0200 Subject: [PATCH 03/16] LP-2 temporarilly disable glc_lib (and moldeview) as it does not link with Qt 5.5.x --- ground/gcs/src/libs/libs.pro | 1 - ground/gcs/src/plugins/plugins.pro | 6 ------ 2 files changed, 7 deletions(-) diff --git a/ground/gcs/src/libs/libs.pro b/ground/gcs/src/libs/libs.pro index ae82bc9db..f3ff6213c 100644 --- a/ground/gcs/src/libs/libs.pro +++ b/ground/gcs/src/libs/libs.pro @@ -7,7 +7,6 @@ SUBDIRS = \ qtconcurrent \ aggregation \ extensionsystem \ - glc_lib \ utils \ opmapcontrol \ qwt \ diff --git a/ground/gcs/src/plugins/plugins.pro b/ground/gcs/src/plugins/plugins.pro index 7ed82023c..07a7fc71f 100644 --- a/ground/gcs/src/plugins/plugins.pro +++ b/ground/gcs/src/plugins/plugins.pro @@ -77,12 +77,6 @@ plugin_uavobjectbrowser.depends = plugin_coreplugin plugin_uavobjectbrowser.depends += plugin_uavobjects SUBDIRS += plugin_uavobjectbrowser -# ModelView UAVGadget -plugin_modelview.subdir = modelview -plugin_modelview.depends = plugin_coreplugin -plugin_modelview.depends += plugin_uavobjects -SUBDIRS += plugin_modelview - #Qt 4.8.0 / phonon may crash on Mac, fixed in Qt 4.8.1, QTBUG-23128 macx:contains(QT_VERSION, ^4\\.8\\.0): CONFIG += disable_notify_plugin From 8c47101562dfaddbf459b5a547832d68527b5c74 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 4 Oct 2015 23:38:07 +0200 Subject: [PATCH 04/16] LP-2 minor osg/Qt cleanup --- ground/gcs/src/libs/osgearth/osgearth.pro | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ground/gcs/src/libs/osgearth/osgearth.pro b/ground/gcs/src/libs/osgearth/osgearth.pro index f8c3e4423..4ee5a7dc2 100644 --- a/ground/gcs/src/libs/osgearth/osgearth.pro +++ b/ground/gcs/src/libs/osgearth/osgearth.pro @@ -74,16 +74,18 @@ linux { } LIBS +=-lOpenThreads - LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText -losgQt - LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation -losgEarthQt + LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText + LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation + LIBS += -losgQt -losgEarthQt } macx { LIBS += -L$$OSG_SDK_DIR/lib LIBS += -lOpenThreads - LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText -losgQt - LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation -losgEarthQt + LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText + LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation + LIBS += -losgQt -losgEarthQt } win32 { @@ -91,13 +93,15 @@ win32 { CONFIG(release, debug|release) { LIBS += -lOpenThreads - LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText -losgQt - LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation -losgEarthQt + LIBS += -losg -losgUtil -losgDB -losgGA -losgViewer -losgText + LIBS += -losgEarth -losgEarthUtil -losgEarthFeatures -losgEarthSymbology -losgEarthAnnotation + LIBS += -losgQt -losgEarthQt } CONFIG(debug, debug|release) { LIBS += -lOpenThreadsd - LIBS += -losgd -losgUtild -losgDBd -losgGAd -losgViewerd -losgTextd -losgQtd - LIBS += -losgEarthd -losgEarthUtild -losgEarthFeaturesd -losgEarthSymbologyd -losgEarthAnnotationd -losgEarthQtd + LIBS += -losgd -losgUtild -losgDBd -losgGAd -losgViewerd -losgTextd + LIBS += -losgEarthd -losgEarthUtild -losgEarthFeaturesd -losgEarthSymbologyd -losgEarthAnnotationd + LIBS += -losgQtd -losgEarthQtd } } From e8816c86c8044342c2ea650a02da35e7519e2ec0 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 10 Nov 2015 19:34:47 +0100 Subject: [PATCH 05/16] LP-2 upgraded to Qt 5.5.1 --- make/tools.mk | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index 962ada90e..b42d6e5f2 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -88,31 +88,31 @@ $(TOOL_REMOVE_TARGETS): ifeq ($(UNAME), Linux) ifeq ($(ARCH), x86_64) - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0-2.run - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0-2.run.md5 + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run.md5 QT_SDK_ARCH := gcc_64 - OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x64-qt-5.5.0.tar.gz + OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x64-qt-5.5.1.tar.gz else - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x86-5.5.0.run - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x86-5.5.0.run.md5 + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-5.5.1.run + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-5.5.1.run.md5 QT_SDK_ARCH := gcc - OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x86-qt-5.5.0.tar.gz + OSG_URL := http://librepilot.github.io/tools/osg-3.4-linux-x86-qt-5.5.1.tar.gz endif UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1.src.tar.gz else ifeq ($(UNAME), Darwin) - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-mac-x64-clang-5.5.0.dmg - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-mac-x64-clang-5.5.0.dmg.md5 + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg.md5 QT_SDK_ARCH := clang_64 - QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.0/qt-opensource-mac-x64-clang-5.5.0.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.0 - QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.5.0 - QT_SDK_INSTALLER_DAT := /Volumes/qt-opensource-mac-x64-clang-5.5.0/qt-opensource-mac-x64-clang-5.5.0.app/Contents/Resources/installer.dat + QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.1 + QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.5.1 + QT_SDK_INSTALLER_DAT := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/Resources/installer.dat UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1.src.tar.gz - OSG_URL := http://librepilot.github.io/tools/osg-3.4-clang_64-qt-5.5.0.tar.gz + OSG_URL := http://librepilot.github.io/tools/osg-3.4-clang_64-qt-5.5.1.tar.gz else ifeq ($(UNAME), Windows) - QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-windows-x86-mingw492-5.5.0.exe - QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-windows-x86-mingw492-5.5.0.exe.md5 + QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe + QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe.md5 QT_SDK_ARCH := mingw492_32 NSIS_URL := http://librepilot.github.io/tools/nsis-2.46-unicode.tar.bz2 SDL_URL := http://librepilot.github.io/tools/SDL-devel-1.2.15-mingw32.tar.gz @@ -123,14 +123,14 @@ else ifeq ($(UNAME), Windows) CMAKE_URL := http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.zip CMAKE_MD5_URL := http://librepilot.github.io/tools/cmake-2.8.12.2-win32-x86.zip.md5 MSYS_URL := http://librepilot.github.io/tools/MSYS-1.0.11.zip - OSG_URL := http://librepilot.github.io/tools/osg-3.4-mingw492_32-qt-5.5.0.tar.gz + OSG_URL := http://librepilot.github.io/tools/osg-3.4-mingw492_32-qt-5.5.1.tar.gz endif GTEST_URL := http://librepilot.github.io/tools/gtest-1.6.0.zip CCACHE_URL := http://samba.org/ftp/ccache/ccache-3.2.2.tar.bz2 CCACHE_MD5_URL := http://librepilot.github.io/tools/ccache-3.2.2.tar.bz2.md5 -QT_SDK_DIR := $(TOOLS_DIR)/qt-5.5.0 +QT_SDK_DIR := $(TOOLS_DIR)/qt-5.5.1 UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60 DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1 GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0 @@ -139,12 +139,12 @@ OSG_TOOLS_DIR := $(TOOLS_DIR) ifeq ($(UNAME), Linux) ifeq ($(ARCH), x86_64) - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x64-qt-5.5.0 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x64-qt-5.5.1 else - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x86-qt-5.5.0 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-linux-x86-qt-5.5.1 endif else ifeq ($(UNAME), Darwin) - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-clang_64-qt-5.5.0 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-clang_64-qt-5.5.1 else ifeq ($(UNAME), Windows) MINGW_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH) # When changing PYTHON_DIR, you must also update it in ground/gcs/src/python.pri @@ -156,7 +156,7 @@ else ifeq ($(UNAME), Windows) MESAWIN_DIR := $(TOOLS_DIR)/mesawin CMAKE_DIR := $(TOOLS_DIR)/cmake-2.8.12.2-win32-x86 MSYS_DIR := $(TOOLS_DIR)/msys - OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-mingw492_32-qt-5.5.0 + OSG_SDK_DIR := $(OSG_TOOLS_DIR)/osg-3.4-mingw492_32-qt-5.5.1 endif QT_SDK_PREFIX := $(QT_SDK_DIR) From a9053ed157cd8f555e2e80421cebe476c086bafc Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 10 Nov 2015 19:37:27 +0100 Subject: [PATCH 06/16] LP-2 remove deprecated Qt5Declarative --- ground/gcs/copydata.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/ground/gcs/copydata.pro b/ground/gcs/copydata.pro index dd42b0939..14357a40d 100644 --- a/ground/gcs/copydata.pro +++ b/ground/gcs/copydata.pro @@ -14,7 +14,6 @@ equals(copyqt, 1) { libQt5Svg.so.5 \ libQt5Test.so.5 \ libQt5Xml.so.5 \ - libQt5Declarative.so.5 \ libQt5XmlPatterns.so.5 \ libQt5Script.so.5 \ libQt5Concurrent.so.5 \ @@ -62,7 +61,6 @@ equals(copyqt, 1) { Qt5Svg$${DS}.dll \ Qt5Test$${DS}.dll \ Qt5Xml$${DS}.dll \ - Qt5Declarative$${DS}.dll \ Qt5XmlPatterns$${DS}.dll \ Qt5Script$${DS}.dll \ Qt5Concurrent$${DS}.dll \ From 8c3d576306b02c97993bbc800f7f11eb3ee5c45c Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 15 Nov 2015 16:40:12 +0100 Subject: [PATCH 07/16] LP-2 add missing linux libraries to GCS copydata.pro --- ground/gcs/copydata.pro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ground/gcs/copydata.pro b/ground/gcs/copydata.pro index 14357a40d..957b81363 100644 --- a/ground/gcs/copydata.pro +++ b/ground/gcs/copydata.pro @@ -26,6 +26,8 @@ equals(copyqt, 1) { libQt5Qml.so.5 \ libQt5DBus.so.5 \ libQt5QuickParticles.so.5 \ + libQt5XcbQpa.so.5 \ + libQt5X11Extras.so.5 \ libqgsttools_p.so.1 \ libicui18n.so.54 \ libicuuc.so.54 \ @@ -44,6 +46,7 @@ equals(copyqt, 1) { mediaservice/libgstaudiodecoder.so \ mediaservice/libgstmediaplayer.so \ platforms/libqxcb.so \ + xcbglintegrations/libqxcb-glx-integration.so \ sqldrivers/libqsqlite.so } From 3131c59eb4db4b4abdbca47c845ccb5e5df2aecb Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 14 Nov 2015 14:47:14 +0100 Subject: [PATCH 08/16] LP-2 attempt at installing qt 5.5.1 using QtIFW devtool utility devtool can be used to extract components and run operations unfortunately the QtPatch operation is not available attempt still commited for future reference --- make/tools.mk | 73 ++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 42 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index b42d6e5f2..7a4a212a0 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -398,64 +398,54 @@ endef ############################## # # Windows QT install template -# $(1) = tool temp extract/build directory -# $(2) = tool install directory -# $(3) = tool distribution URL -# $(4) = tool distribution .md5 URL -# $(5) = tool distribution file -# $(6) = QT architecture -# $(7) = optional extra build recipes template -# $(8) = optional extra clean recipes template +# $(1) = tool install directory +# $(2) = tool distribution URL +# $(3) = tool distribution .md5 URL +# $(4) = tool distribution file +# $(5) = QT architecture +# $(6) = optional extra build recipes template +# $(7) = optional extra clean recipes template # ############################## +# notes: +# - missing installer --dump-binary-data option : https://bugreports.qt.io/browse/QTIFW-734 +# - devtool can not run QtPatch operation : https://bugreports.qt.io/browse/QTIFW-792 +# developper tips: +# - install Qt manually and look at the install log for needed operations (install log is in root of install) +# - use devtool.exe --dump to check package names and install scripts +############################## define WIN_QT_INSTALL_TEMPLATE .PHONY: $(addprefix qt_sdk_, install clean distclean) qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR) - $(V1) if ! $(SEVENZIP) >/dev/null 2>&1; then \ - $(ECHO) $(MSG_NOTICE) "Missing 7zip. Run ./make/scripts/win_sdk_install.sh [] to get it." && \ - exit 1; \ - fi - $(call DOWNLOAD_TEMPLATE,$(3),$(5),"$(4)") -# Explode .run file into install packages - @$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(1)) - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(1))) - $(V1) chmod +x $(DL_DIR)/$(5) - $(V1) $(DL_DIR)/$(5) --dump-binary-data -o $(1) + $(call DOWNLOAD_TEMPLATE,$(2),$(4),"$(3)") # Extract packages under tool directory - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(2))) - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.win32_mingw491/5.4.1-0qt5_essentials.7z" | grep -v Extracting - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.win32_mingw491/5.4.1-0i686-4.9.1-release-posix-dwarf-rt_v3-rev2-runtime.7z" | grep -v Extracting - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.win32_mingw491/5.4.1-0icu_53_1_mingw_builds_4_9_1_posix_dwarf_32.7z" | grep -v Extracting - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.win32_mingw491/5.4.1-0qt5_addons.7z" | grep -v Extracting - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.tools.win32_mingw491/4.9.1-2i686-4.9.1-release-posix-dwarf-rt_v3-rev2.7z" | grep -v Extracting + @$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(DL_DIR)/$(4)) to $$(call toprel, $(1)) + $(V1) $(MKDIR) -p $$(call toprel, $(dir $(1))) + $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0qt5_essentials.7z","$(1)" "$(DL_DIR)/$(4)" > NUL + $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0i686-4.9.2-release-posix-dwarf-rt_v3-rev1-runtime.7z","$(1)" "$(DL_DIR)/$(4)" > NUL + $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0icu-win-MinGW4.9.2-Windows7-x86.7z","$(1)" "$(DL_DIR)/$(4)" > NUL + $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0qt5_addons.7z","$(1)" "$(DL_DIR)/$(4)" > NUL + $(V1) devtool --operation DO,Extract,"installer://qt.55.qtquickcontrols.win32_mingw492/5.5.1-0qt5_qtquickcontrols.7z","$(1)" "$(DL_DIR)/$(4)" > NUL + $(V1) devtool --operation DO,Extract,"installer://qt.tools.win32_mingw492/4.9.2-0i686-4.9.2-release-posix-dwarf-rt_v3-rev1.7z","$(1)" "$(DL_DIR)/$(4)" > NUL # Run patcher - @$(ECHO) @$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX)) - $(V1) $(CD) $(QT_SDK_PREFIX) - $(V1) $(DL_DIR)/$(5) --runoperation QtPatch windows $(QT_SDK_PREFIX) qt5 - + #$(V1) devtool --operation DO,QtPatch,"windows","$(QT_SDK_PREFIX)","qt5" "$(DL_DIR)/$(4)" + $(V1) devtool --operation DO,LineReplace,"$(QT_SDK_PREFIX)/mkspecs/qconfig.pri","QT_EDITION =","QT_EDITION = OpenSource" "$(DL_DIR)/$(4)" # Execute post build templates - $(7) - -# Clean up temporary files - @$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1)) - $(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)" + $(6) qt_sdk_clean: @$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1)) $(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)" - @$(ECHO) $(MSG_CLEANING) $$(call toprel, "$(2)") - $(V1) [ ! -d "$(2)" ] || $(RM) -rf "$(2)" - - $(8) + $(7) qt_sdk_distclean: - @$(ECHO) $(MSG_DISTCLEANING) $$(call toprel, $(DL_DIR)/$(5)) - $(V1) [ ! -f "$(DL_DIR)/$(5)" ] || $(RM) "$(DL_DIR)/$(5)" - $(V1) [ ! -f "$(DL_DIR)/$(5).md5" ] || $(RM) "$(DL_DIR)/$(5).md5" + @$(ECHO) $(MSG_DISTCLEANING) $$(call toprel, $(DL_DIR)/$(4)) + $(V1) [ ! -f "$(DL_DIR)/$(4)" ] || $(RM) "$(DL_DIR)/$(4)" + $(V1) [ ! -f "$(DL_DIR)/$(4).md5" ] || $(RM) "$(DL_DIR)/$(4).md5" endef @@ -641,8 +631,7 @@ define QT_SDK_CONFIGURE_TEMPLATE $(V1) $(ECHO) $(QUOTE)Prefix = $(QT_SDK_PREFIX)$(QUOTE) >> $(QT_SDK_PREFIX)/bin/qt.conf endef -QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD - $(eval $(call WIN_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH),$(QT_SDK_CONFIGURE_TEMPLATE))) + $(eval $(call WIN_QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH),$(QT_SDK_CONFIGURE_TEMPLATE))) else ifeq ($(UNAME), Linux) From 90e81e6b5ae0b77312c61ccfa051d3a0b8a713ba Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 15 Nov 2015 16:45:13 +0100 Subject: [PATCH 09/16] LP-2 install Qt using a silent install script tested on windows and linux 64. --- make/tool_install/qt-install.qs | 253 ++++++++++++++++++++++++++++++++ make/tools.mk | 48 ++---- 2 files changed, 265 insertions(+), 36 deletions(-) create mode 100644 make/tool_install/qt-install.qs diff --git a/make/tool_install/qt-install.qs b/make/tool_install/qt-install.qs new file mode 100644 index 000000000..7987ee533 --- /dev/null +++ b/make/tool_install/qt-install.qs @@ -0,0 +1,253 @@ +/* +silent installer script + +known not work with Qt 5.5.1 and QtIFW 2.0.2 + +known issues: +- silent but not headless (QtIFW 2.0.3 should support installer.setSilent(true)) +- cannot disable forced components (QtCreator, ...) + - cannot disable virtual components (doc, examples, ...) + - cannot disable shortcuts creation + - if user presses the 'Show Details' button then the installer does not end automatically +*/ +function Controller() +{ + console.log("*** Silent Installer ***"); + console.log("Installing on " + installer.value("os")); + //installer.setSilent(true); + + var qtInstallTargetDir = installer.environmentVariable("QT_INSTALL_TARGET_DIR"); + if (qtInstallTargetDir == "") { + qtInstallTargetDir = installer.environmentVariable("PWD") + "/tools/qt-5.5.1"; + console.log("Environment variable QT_INSTALL_TARGET_DIR not set, using default " + qtInstallTargetDir); + } + installer.setValue("TargetDir", qtInstallTargetDir); + console.log("Installing to " + installer.value("TargetDir")); + + installer.autoRejectMessageBoxes(); + installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes); + installer.setMessageBoxAutomaticAnswer("stopProcessesForUpdates", QMessageBox.Ignore); + + // pages that are not visible are actually removed from the wizard + // some pages must not be removed otherwise the installer starts to mishbehave + installer.setDefaultPageVisible(QInstaller.Welcome, false); + installer.setDefaultPageVisible(QInstaller.Credentials, false); // QInstaller.Credentials is 0... so this is a NOP! + //installer.setDefaultPageVisible(QInstaller.Introduction, false); // Fails to skip Credentials if Introduction is removed? + installer.setDefaultPageVisible(QInstaller.TargetDirectory, false); + //installer.setDefaultPageVisible(QInstaller.ComponentSelection, false); + //installer.setDefaultPageVisible(QInstaller.LicenseAgreementCheck, false); + //installer.setDefaultPageVisible(QInstaller.StartMenuSelection, false); + installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false); + //installer.setDefaultPageVisible(QInstaller.PerformInstallation, false); + installer.setDefaultPageVisible(QInstaller.FinishedPage, false); + + installer.componentAdded.connect(onComponentAdded); + installer.aboutCalculateComponentsToInstall.connect(onAboutCalculateComponentsToInstall); + installer.finishedCalculateComponentsToInstall.connect(onFinishedCalculateComponentsToInstall); +} + +// installer callbacks + +onComponentAdded = function(component) +{ + console.log("Component added: " + component.name); + dumpComponents(); +} + +onAboutCalculateComponentsToInstall = function() +{ + console.log("onAboutCalculateComponentsToInstall"); + //dumpComponents(); +} + +onFinishedCalculateComponentsToInstall = function() +{ + console.log("onFinishedCalculateComponentsToInstall"); + //dumpComponents(); +} + +// page callbacks +// used to setup wizard pages and move the wizard forward + +Controller.prototype.WelcomePageCallback = function() +{ + logCallback(); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.CredentialsPageCallback = function() +{ + logCallback(); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.IntroductionPageCallback = function() +{ + logCallback(); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.ComponentSelectionPageCallback = function() +{ + logCallback(); + + var page = gui.currentPageWidget(); + page.deselectAll() + if (installer.value("os") == "win") { + selectComponent(page, "qt.55.win32_mingw492"); + selectComponent(page, "qt.tools.win32_mingw492"); + } + else if (installer.value("os") == "x11") { + selectComponent(page, "qt.55.gcc"); + selectComponent(page, "qt.55.gcc_64"); + } + else if (installer.value("os") == "mac") { + selectComponent(page, "qt.55.clang_64"); + } + selectComponent(page, "qt.55.qtquickcontrols"); + selectComponent(page, "qt.55.qtscript"); + + //installer.componentByName("qt.tools.qtcreator").setValue("ForcedInstallation", "false"); + + gui.clickButton(buttons.NextButton); +} + + +function selectComponent(page, name) +{ + component = installer.componentByName(name); + if (component) { + console.log("component " + name + " : " + component); + page.selectComponent(name); + } + else { + console.log("Failed to find component " + name + "!"); + } +} + +Controller.prototype.LicenseAgreementPageCallback = function() +{ + logCallback(); + + setChecked("AcceptLicenseRadioButton", true); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.StartMenuDirectoryPageCallback = function() +{ + logCallback(); + + gui.clickButton(buttons.NextButton); +} + +Controller.prototype.PerformInstallationPageCallback = function() +{ + logCallback(); + + // show details and hide button + click("DetailsButton"); + setVisible("DetailsButton", false); + + // showing details will disable automated page switch, so re-enable it + installer.setAutomatedPageSwitchEnabled(true); +} + +Controller.prototype.FinishedPageCallback = function() +{ + logCallback(); + + setChecked("launchQtCreatorCheckBox", false); + + gui.clickButton(buttons.FinishButton); +} + +// utilities + +function logCallback() +{ + var page = gui.currentPageWidget(); + console.log(">>> " + page.objectName + "Callback"); +} + +function dumpComponents() +{ + dumpComponentsArray(installer.components()); +} + +function dumpComponentsArray(components) +{ + var arrayLength = components.length; + for (var i = 0; i < arrayLength; i++) { + dumpComponent(components[i]); + } +} + +function dumpComponent(component) +{ + console.log(component.name + " (" + component.displayName + ")"); + console.log(" Virtual: " + component.value("Virtual", "false")); + console.log(" ForcedInstallation: " + component.value("ForcedInstallation", "false")); + console.log(" Default: " + component.default); + console.log(" Enabled: " + component.enabled); +} + +// UI utilities + +function click(name) +{ + var page = gui.currentPageWidget(); + var button = gui.findChild(page, name); + if (button) { + console.log("button " + name + " : " + button); + button.click(); + } + else { + console.log("Failed to find button " + name + "!"); + } +} + +function setVisible(name, visible) +{ + var page = gui.currentPageWidget(); + var button = gui.findChild(page, name); + if (button) { + console.log("button " + name + " : " + button); + button.visible = visible; + console.log("button " + name + " visible : " + button.visible); + } + else { + console.log("Failed to find button " + name + "!"); + } +} + +function setEnabled(name, enabled) +{ + var page = gui.currentPageWidget(); + var button = gui.findChild(page, name); + if (button) { + console.log("button " + name + " : " + button); + button.enabled = enabled; + console.log("button " + name + " enabled : " + button.enabled); + } + else { + console.log("Failed to find button " + name + "!"); + } +} + +function setChecked(name, checked) +{ + var page = gui.currentPageWidget(); + var button = gui.findChild(page, name); + if (button) { + console.log("button " + name + " : " + button); + button.checked = checked; + console.log("button " + name + " checked : " + button.checked); + } + else { + console.log("Failed to find button " + name + "!"); + } +} diff --git a/make/tools.mk b/make/tools.mk index 7a4a212a0..2e515fa26 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -397,43 +397,29 @@ endef ############################## # -# Windows QT install template +# Qt install template # $(1) = tool install directory # $(2) = tool distribution URL # $(3) = tool distribution .md5 URL # $(4) = tool distribution file -# $(5) = QT architecture +# $(5) = Qt architecture # $(6) = optional extra build recipes template # $(7) = optional extra clean recipes template # ############################## -# notes: -# - missing installer --dump-binary-data option : https://bugreports.qt.io/browse/QTIFW-734 -# - devtool can not run QtPatch operation : https://bugreports.qt.io/browse/QTIFW-792 -# developper tips: -# - install Qt manually and look at the install log for needed operations (install log is in root of install) -# - use devtool.exe --dump to check package names and install scripts -############################## -define WIN_QT_INSTALL_TEMPLATE +define QT_INSTALL_TEMPLATE .PHONY: $(addprefix qt_sdk_, install clean distclean) qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR) $(call DOWNLOAD_TEMPLATE,$(2),$(4),"$(3)") -# Extract packages under tool directory - @$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(DL_DIR)/$(4)) to $$(call toprel, $(1)) - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(1))) - $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0qt5_essentials.7z","$(1)" "$(DL_DIR)/$(4)" > NUL - $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0i686-4.9.2-release-posix-dwarf-rt_v3-rev1-runtime.7z","$(1)" "$(DL_DIR)/$(4)" > NUL - $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0icu-win-MinGW4.9.2-Windows7-x86.7z","$(1)" "$(DL_DIR)/$(4)" > NUL - $(V1) devtool --operation DO,Extract,"installer://qt.55.win32_mingw492/5.5.1-0qt5_addons.7z","$(1)" "$(DL_DIR)/$(4)" > NUL - $(V1) devtool --operation DO,Extract,"installer://qt.55.qtquickcontrols.win32_mingw492/5.5.1-0qt5_qtquickcontrols.7z","$(1)" "$(DL_DIR)/$(4)" > NUL - $(V1) devtool --operation DO,Extract,"installer://qt.tools.win32_mingw492/4.9.2-0i686-4.9.2-release-posix-dwarf-rt_v3-rev1.7z","$(1)" "$(DL_DIR)/$(4)" > NUL -# Run patcher - @$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX)) - #$(V1) devtool --operation DO,QtPatch,"windows","$(QT_SDK_PREFIX)","qt5" "$(DL_DIR)/$(4)" - $(V1) devtool --operation DO,LineReplace,"$(QT_SDK_PREFIX)/mkspecs/qconfig.pri","QT_EDITION =","QT_EDITION = OpenSource" "$(DL_DIR)/$(4)" +# Silently install Qt under tools directory + @$(ECHO) $(MSG_EXTRACTING) $(4) to $$(call toprel, $(1)) + $(V1) ( export QT_INSTALL_TARGET_DIR=$(1) && \ + chmod +x $(DL_DIR)/$(4) && \ + $(DL_DIR)/$(4) --script $(ROOT_DIR)/make/tool_install/qt-install.qs ; \ + ) # Execute post build templates $(6) @@ -623,27 +609,17 @@ ifeq ($(UNAME), Windows) QT_SDK_PREFIX := $(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH) -# This additional configuration step should not be necessary -# but it is needed as a workaround to https://bugreports.qt-project.org/browse/QTBUG-33254 -define QT_SDK_CONFIGURE_TEMPLATE - @$(ECHO) $(MSG_CONFIGURING) $(call toprel, $(QT_SDK_DIR)) - $(V1) $(ECHO) $(QUOTE)[Paths]$(QUOTE) > $(QT_SDK_PREFIX)/bin/qt.conf - $(V1) $(ECHO) $(QUOTE)Prefix = $(QT_SDK_PREFIX)$(QUOTE) >> $(QT_SDK_PREFIX)/bin/qt.conf -endef - - $(eval $(call WIN_QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH),$(QT_SDK_CONFIGURE_TEMPLATE))) + $(eval $(call QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) else ifeq ($(UNAME), Linux) QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)" -QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD - $(eval $(call LINUX_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) + $(eval $(call QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) else ifeq ($(UNAME), Darwin) QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)" -QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD - $(eval $(call MAC_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) + $(eval $(call QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) else From 3d8493a38a53e3302e7ab12a86275805ab07f825 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 21 Nov 2015 14:05:04 +0100 Subject: [PATCH 10/16] LP-2 remove LINUX_QT_INSTALL_TEMPLATE --- make/tools.mk | 63 --------------------------------------------------- 1 file changed, 63 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index 2e515fa26..b7c314df1 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -435,69 +435,6 @@ qt_sdk_distclean: endef -############################## -# -# Linux QT install template -# $(1) = tool temp extract/build directory -# $(2) = tool install directory -# $(3) = tool distribution URL -# $(4) = tool distribution .md5 URL -# $(5) = tool distribution file -# $(6) = QT architecture -# $(7) = optional extra build recipes template -# $(8) = optional extra clean recipes template -# -############################## - -define LINUX_QT_INSTALL_TEMPLATE - -.PHONY: $(addprefix qt_sdk_, install clean distclean) - -qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR) - $(V1) if ! $(SEVENZIP) >/dev/null 2>&1; then \ - $(ECHO) $(MSG_NOTICE) "Please install the p7zip for your distribution. i.e.: sudo apt-get install p7zip-full" && \ - exit 1; \ - fi - $(call DOWNLOAD_TEMPLATE,$(3),$(5),"$(4)") -# Explode .run file into install packages - @$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(1)) - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(1))) - $(V1) chmod +x $(DL_DIR)/$(5) - $(V1) $(DL_DIR)/$(5) --dump-binary-data -o $(1) -# Extract packages under tool directory - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(2))) - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_essentials.7z" | grep -v Extracting - $(V1) if [ -f "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_64.7z" ]; then $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_64.7z" | grep -v Extracting; fi - $(V1) if [ -f "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_32.7z" ]; then $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_32.7z" | grep -v Extracting; fi - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_addons.7z" | grep -v Extracting -# Run patcher - @$(ECHO) - @$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX)) - $(V1) $(CD) $(QT_SDK_PREFIX) - $(V1) $(DL_DIR)/$(5) --runoperation QtPatch linux $(QT_SDK_PREFIX) qt5 - -# Execute post build templates - $(7) - -# Clean up temporary files - @$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1)) - $(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)" - -qt_sdk_clean: - @$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1)) - $(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)" - @$(ECHO) $(MSG_CLEANING) $$(call toprel, "$(2)") - $(V1) [ ! -d "$(2)" ] || $(RM) -rf "$(2)" - - $(8) - -qt_sdk_distclean: - @$(ECHO) $(MSG_DISTCLEANING) $$(call toprel, $(DL_DIR)/$(5)) - $(V1) [ ! -f "$(DL_DIR)/$(5)" ] || $(RM) "$(DL_DIR)/$(5)" - $(V1) [ ! -f "$(DL_DIR)/$(5).md5" ] || $(RM) "$(DL_DIR)/$(5).md5" - -endef - ############################## # # Mac QT install template From d5e97fffe1df484ede6afc39affb2eb159679991 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 21 Nov 2015 14:05:28 +0100 Subject: [PATCH 11/16] LP-2 fix MAC_QT_INSTALL_TEMPLATE --- make/tools.mk | 72 +++++++++++++-------------------------------------- 1 file changed, 18 insertions(+), 54 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index b7c314df1..86fcaaf83 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -438,14 +438,13 @@ endef ############################## # # Mac QT install template -# $(1) = tool temp extract/build directory -# $(2) = tool install directory -# $(3) = tool distribution URL -# $(4) = tool distribution .md5 URL -# $(5) = tool distribution file -# $(6) = QT architecture -# $(7) = optional extra build recipes template -# $(8) = optional extra clean recipes template +# $(1) = tool install directory +# $(2) = tool distribution URL +# $(3) = tool distribution .md5 URL +# $(4) = tool distribution file +# $(5) = QT architecture +# $(6) = optional extra build recipes template +# $(7) = optional extra clean recipes template # ############################## @@ -454,58 +453,23 @@ define MAC_QT_INSTALL_TEMPLATE .PHONY: $(addprefix qt_sdk_, install clean distclean) qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR) - $(V1) if ! $(SEVENZIP) >/dev/null 2>&1; then \ - $(ECHO) $(MSG_NOTICE) "Please install the p7zip for your distribution. i.e.: brew install p7zip." && \ - exit 1; \ - fi - $(call DOWNLOAD_TEMPLATE,$(3),$(5),"$(4)") + $(call DOWNLOAD_TEMPLATE,$(2),$(4),"$(3)") # Mount .dmg file - $(V1) hdiutil attach -nobrowse $(DL_DIR)/$(5) -# Explode .dmg file into install packages - @$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(1)) - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(1))) - $(V1) $(QT_SDK_MAINTENANCE_TOOL) --dump-binary-data -i $(QT_SDK_INSTALLER_DAT) -o $(1) -# Extract packages under tool directory - $(V1) $(MKDIR) -p $$(call toprel, $(dir $(2))) - #$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0-0qt-project-url.7z" | grep -v Extracting - #$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt/5.4.1ThirdPartySoftware_Listing.7z" | grep -v Extracting - #$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0-0readme.7z" | grep -v Extracting - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_essentials.7z" | grep -v Extracting -# $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6).essentials/5.4.1icu_path_patcher.sh.7z" | grep -v Extracting - $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_addons.7z" | grep -v Extracting - - -# go to OpenPilot/tools/5.4/gcc_64 and call patcher.sh - @$(ECHO) - @$(ECHO) "Running patcher in" $$(call toprel, $(QT_SDK_PREFIX)) - $(V1) $(CD) $(QT_SDK_PREFIX) -# $(V1) "$(QT_SDK_PREFIX)/patcher.sh" $(QT_SDK_PREFIX) -# call qmake patcher - @$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX)) - $(V1) $(QT_SDK_MAINTENANCE_TOOL) --runoperation QtPatch mac $(QT_SDK_PREFIX) qt5 - -#Unmount the .dmg file + $(V1) hdiutil attach -nobrowse $(DL_DIR)/$(4) +# Silently install Qt under tools directory + @$(ECHO) $(MSG_EXTRACTING) $(4) to $$(call toprel, $(1)) + $(V1) ( export QT_INSTALL_TARGET_DIR=$(1) && \ + $(DL_DIR)/$(4) --script $(ROOT_DIR)/make/tool_install/qt-install.qs ; \ + ) +# Unmount the .dmg file $(V1) hdiutil detach $(QT_SDK_MOUNT_DIR) - # Execute post build templates - $(7) - -# Clean up temporary files - @$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1)) - $(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)" + $(6) qt_sdk_clean: @$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1)) $(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)" - @$(ECHO) $(MSG_CLEANING) $$(call toprel, "$(2)") - $(V1) [ ! -d "$(2)" ] || $(RM) -rf "$(2)" - - $(8) - -qt_sdk_distclean: - @$(ECHO) $(MSG_DISTCLEANING) $$(call toprel, $(DL_DIR)/$(5)) - $(V1) [ ! -f "$(DL_DIR)/$(5)" ] || $(RM) "$(DL_DIR)/$(5)" - $(V1) [ ! -f "$(DL_DIR)/$(5).md5" ] || $(RM) "$(DL_DIR)/$(5).md5" + $(7) endef @@ -556,7 +520,7 @@ QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)" else ifeq ($(UNAME), Darwin) QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)" - $(eval $(call QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) + $(eval $(call MAC_QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH))) else From 11f851cdcf6e54f85038c40a2debb5b601bfe765 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 21 Nov 2015 15:04:46 +0100 Subject: [PATCH 12/16] LP-2 fix MAC_QT_INSTALL_TEMPLATE --- make/tools.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/tools.mk b/make/tools.mk index 86fcaaf83..96d219db6 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -459,7 +459,7 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR) # Silently install Qt under tools directory @$(ECHO) $(MSG_EXTRACTING) $(4) to $$(call toprel, $(1)) $(V1) ( export QT_INSTALL_TARGET_DIR=$(1) && \ - $(DL_DIR)/$(4) --script $(ROOT_DIR)/make/tool_install/qt-install.qs ; \ + $(QT_SDK_MAINTENANCE_TOOL) --script $(ROOT_DIR)/make/tool_install/qt-install.qs ; \ ) # Unmount the .dmg file $(V1) hdiutil detach $(QT_SDK_MOUNT_DIR) From 69ee68ddfe41183186efc18f6681ea89ac4f8844 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 21 Nov 2015 15:05:43 +0100 Subject: [PATCH 13/16] LP-2 move ARM SDK install to proper place (out of the middle of the Qt stuff) --- make/tools.mk | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index 96d219db6..5b265a9ec 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -395,6 +395,33 @@ $(1)_distclean: endef +############################## +# +# ARM SDK +# +############################## +export ARM_SDK_PREFIX := arm-none-eabi- +ARM_SDK_TOOL := gcc-arm-none-eabi + +.PHONY: arm_sdk_install +arm_sdk_install: $(ARM_SDK_TOOL)_install + +.PHONY: arm_sdk_clean +arm_sdk_clean: $(ARM_SDK_TOOL)_remove + +.PHONY: arm_sdk_version +arm_sdk_version: + -$(V1) $(ARM_SDK_PREFIX)gcc --version | head -n1 + +# Template to check ARM toolchain version before building targets +define ARM_GCC_VERSION_CHECK_TEMPLATE + if ! $(ARM_SDK_PREFIX)gcc --version --specs=nano.specs >/dev/null 2>&1; then \ + $(ECHO) $(MSG_NOTICE) Please install ARM toolchain 4.8 2014q1 using \'make arm_sdk_install\' && \ + $(ECHO) $(MSG_NOTICE) Older ARM SDKs do not support new \'--specs=nano.specs\' option && \ + exit 1; \ + fi +endef + ############################## # # Qt install template @@ -473,33 +500,6 @@ qt_sdk_clean: endef -############################## -# -# ARM SDK -# -############################## -export ARM_SDK_PREFIX := arm-none-eabi- -ARM_SDK_TOOL := gcc-arm-none-eabi - -.PHONY: arm_sdk_install -arm_sdk_install: $(ARM_SDK_TOOL)_install - -.PHONY: arm_sdk_clean -arm_sdk_clean: $(ARM_SDK_TOOL)_remove - -.PHONY: arm_sdk_version -arm_sdk_version: - -$(V1) $(ARM_SDK_PREFIX)gcc --version | head -n1 - -# Template to check ARM toolchain version before building targets -define ARM_GCC_VERSION_CHECK_TEMPLATE - if ! $(ARM_SDK_PREFIX)gcc --version --specs=nano.specs >/dev/null 2>&1; then \ - $(ECHO) $(MSG_NOTICE) Please install ARM toolchain 4.8 2014q1 using \'make arm_sdk_install\' && \ - $(ECHO) $(MSG_NOTICE) Older ARM SDKs do not support new \'--specs=nano.specs\' option && \ - exit 1; \ - fi -endef - ############################## # # Qt SDK From 060da52bd2ad52df897c08f1423e40234f68721d Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Mon, 30 Nov 2015 08:47:50 +0100 Subject: [PATCH 14/16] LP-2 remove unused QT_SDK_INSTALLER_DAT from top Makefile --- make/tools.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index 5b265a9ec..dfefe7ab5 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -104,9 +104,8 @@ else ifeq ($(UNAME), Darwin) QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg.md5 QT_SDK_ARCH := clang_64 - QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.1 QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.5.1 - QT_SDK_INSTALLER_DAT := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/Resources/installer.dat + QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.1 UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60.tar.gz DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1.src.tar.gz OSG_URL := http://librepilot.github.io/tools/osg-3.4-clang_64-qt-5.5.1.tar.gz From b03833e96b5777bdb3d989a77dbed118c2263996 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Wed, 2 Dec 2015 21:33:45 +0100 Subject: [PATCH 15/16] LP-2 make some of the code changes backward compatible with Qt 5.4.1 --- ground/gcs/src/app/main.cpp | 2 ++ ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp | 2 ++ ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ground/gcs/src/app/main.cpp b/ground/gcs/src/app/main.cpp index ac97845f2..c8260c953 100644 --- a/ground/gcs/src/app/main.cpp +++ b/ground/gcs/src/app/main.cpp @@ -285,9 +285,11 @@ void mainMessageOutput(QtMsgType type, const QMessageLogContext &context, const case QtDebugMsg: out << "DBG: "; break; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) case QtInfoMsg: out << "INF: "; break; +#endif case QtWarningMsg: out << "WRN: "; break; diff --git a/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp b/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp index 71060e9fb..11c417d78 100644 --- a/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp +++ b/ground/gcs/src/plugins/debuggadget/debuggadgetwidget.cpp @@ -52,10 +52,12 @@ void DebugGadgetWidget::customMessageHandler(QtMsgType type, const QMessageLogCo txt = QString("Debug: %1").arg(msg); color = Qt::black; break; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) case QtInfoMsg: txt = QString("Info: %1").arg(msg); color = Qt::blue; break; +#endif case QtWarningMsg: txt = QString("Warning: %1").arg(msg); color = Qt::red; diff --git a/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp b/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp index 6adcd4d6b..3c3ad4c67 100644 --- a/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp +++ b/ground/gcs/src/plugins/hitl/aerosimrc/src/qdebughandler.cpp @@ -37,9 +37,11 @@ void myQDebugHandler(QtMsgType type, const QMessageLogContext &context, const QS case QtDebugMsg: txt = QString("Debug: %1").arg(msg); break; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) case QtInfoMsg: txt = QString("Info: %1").arg(msg); break; +#endif case QtWarningMsg: txt = QString("Warning: %1").arg(msg); break; From 0dc76168a386b5f5e726a89d9a60a05c53ca5f0d Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Wed, 2 Dec 2015 21:41:19 +0100 Subject: [PATCH 16/16] LP-2 remove unused windows specific utility method winGetDLLVersion (additionally had compile warnings) --- ground/gcs/src/libs/utils/winutils.cpp | 60 -------------------------- ground/gcs/src/libs/utils/winutils.h | 6 --- 2 files changed, 66 deletions(-) diff --git a/ground/gcs/src/libs/utils/winutils.cpp b/ground/gcs/src/libs/utils/winutils.cpp index 67dba1bb6..3c5510a97 100644 --- a/ground/gcs/src/libs/utils/winutils.cpp +++ b/ground/gcs/src/libs/utils/winutils.cpp @@ -30,10 +30,6 @@ #include #include -#include -#include -#include -#include namespace Utils { QTCREATOR_UTILS_EXPORT QString winErrorMessage(unsigned long error) @@ -53,60 +49,4 @@ QTCREATOR_UTILS_EXPORT QString winErrorMessage(unsigned long error) } return rc; } - -QTCREATOR_UTILS_EXPORT QString winGetDLLVersion(WinDLLVersionType t, - const QString &name, - QString *errorMessage) -{ - // Resolve required symbols from the version.dll - typedef DWORD (APIENTRY * GetFileVersionInfoSizeProtoType)(LPCTSTR, LPDWORD); - typedef BOOL (APIENTRY * GetFileVersionInfoWProtoType)(LPCWSTR, DWORD, DWORD, LPVOID); - typedef BOOL (APIENTRY * VerQueryValueWProtoType)(const LPVOID, LPWSTR lpSubBlock, LPVOID, PUINT); - - const char *versionDLLC = "version.dll"; - QLibrary versionLib(QLatin1String(versionDLLC), 0); - if (!versionLib.load()) { - *errorMessage = QString::fromLatin1("Unable load %1: %2").arg(QLatin1String(versionDLLC), versionLib.errorString()); - return QString(); - } - // MinGW requires old-style casts - GetFileVersionInfoSizeProtoType getFileVersionInfoSizeW = (GetFileVersionInfoSizeProtoType)(versionLib.resolve("GetFileVersionInfoSizeW")); - GetFileVersionInfoWProtoType getFileVersionInfoW = (GetFileVersionInfoWProtoType)(versionLib.resolve("GetFileVersionInfoW")); - VerQueryValueWProtoType verQueryValueW = (VerQueryValueWProtoType)(versionLib.resolve("VerQueryValueW")); - if (!getFileVersionInfoSizeW || !getFileVersionInfoW || !verQueryValueW) { - *errorMessage = QString::fromLatin1("Unable to resolve all required symbols in %1").arg(QLatin1String(versionDLLC)); - return QString(); - } - - // Now go ahead, read version info resource - DWORD dummy = 0; - const LPCTSTR fileName = reinterpret_cast(name.utf16()); // MinGWsy - const DWORD infoSize = (*getFileVersionInfoSizeW)(fileName, &dummy); - if (infoSize == 0) { - *errorMessage = QString::fromLatin1("Unable to determine the size of the version information of %1: %2").arg(name, winErrorMessage(GetLastError())); - return QString(); - } - QByteArray dataV(infoSize + 1, '\0'); - char *data = dataV.data(); - if (!(*getFileVersionInfoW)(fileName, dummy, infoSize, data)) { - *errorMessage = QString::fromLatin1("Unable to determine the version information of %1: %2").arg(name, winErrorMessage(GetLastError())); - return QString(); - } - VS_FIXEDFILEINFO *versionInfo; - UINT len = 0; - if (!(*verQueryValueW)(data, TEXT("\\"), &versionInfo, &len)) { - *errorMessage = QString::fromLatin1("Unable to determine version string of %1: %2").arg(name, winErrorMessage(GetLastError())); - return QString(); - } - QString rc; - switch (t) { - case WinDLLFileVersion: - QTextStream(&rc) << HIWORD(versionInfo->dwFileVersionMS) << '.' << LOWORD(versionInfo->dwFileVersionMS); - break; - case WinDLLProductVersion: - QTextStream(&rc) << HIWORD(versionInfo->dwProductVersionMS) << '.' << LOWORD(versionInfo->dwProductVersionMS); - break; - } - return rc; -} } // namespace Utils diff --git a/ground/gcs/src/libs/utils/winutils.h b/ground/gcs/src/libs/utils/winutils.h index 7d268e011..f49c044b3 100644 --- a/ground/gcs/src/libs/utils/winutils.h +++ b/ground/gcs/src/libs/utils/winutils.h @@ -39,11 +39,5 @@ namespace Utils { // Helper to format a Windows error message, taking the // code as returned by the GetLastError()-API. QTCREATOR_UTILS_EXPORT QString winErrorMessage(unsigned long error); - -// Determine a DLL version -enum WinDLLVersionType { WinDLLFileVersion, WinDLLProductVersion }; -QTCREATOR_UTILS_EXPORT QString winGetDLLVersion(WinDLLVersionType t, - const QString &name, - QString *errorMessage); } // namespace Utils #endif // WINUTILS_H