From bd555623ddbd995132e71714663649437f16e7b1 Mon Sep 17 00:00:00 2001 From: Fredrik Arvidsson Date: Wed, 14 Jun 2017 00:18:33 +0200 Subject: [PATCH] LP-531 Adds support for Qt 5.9.0 SDK install script and Qt installer script updated with new version, paths and URL:s Explicit casts to char added to avoid clang compiler warnings (treated like errors) on MacOSX and XCode 8.3.2 --- .../uavobjectutil/uavobjectutilmanager.cpp | 2 +- ground/gcs/src/plugins/uploader/dfu.cpp | 8 ++++---- make/tool_install/qt-install.qs | 18 +++++++++--------- make/tools.mk | 10 +++++----- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ground/gcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp b/ground/gcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp index b4e2f7f64..113f795ce 100644 --- a/ground/gcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp +++ b/ground/gcs/src/plugins/uavobjectutil/uavobjectutilmanager.cpp @@ -313,7 +313,7 @@ QString UAVObjectUtilManager::getBoardDescriptionString() { QByteArray arr = getBoardDescription(); - int index = arr.indexOf(255); + int index = arr.indexOf((char)255); return QString((index == -1) ? arr : arr.left(index)); } diff --git a/ground/gcs/src/plugins/uploader/dfu.cpp b/ground/gcs/src/plugins/uploader/dfu.cpp index f6546f7f2..5f923b800 100644 --- a/ground/gcs/src/plugins/uploader/dfu.cpp +++ b/ground/gcs/src/plugins/uploader/dfu.cpp @@ -365,7 +365,7 @@ QString DFUObject::DownloadDescription(int const & numberOfChars) StartDownloadT(&arr, numberOfChars, DFU::Descript); - int index = arr.indexOf(255); + int index = arr.indexOf((char)255); return QString((index == -1) ? arr : arr.left(index)); } @@ -778,7 +778,7 @@ DFU::Status DFUObject::UploadFirmwareT(const QString &sfile, const bool &verify, ++pad; pad = pad * 4; pad = pad - arr.length(); - arr.append(QByteArray(pad, 255)); + arr.append(QByteArray(pad, (char)255)); } if (devices[device].SizeOfCode < (quint32)arr.length()) { if (debug) { @@ -884,7 +884,7 @@ DFU::Status DFUObject::CompareFirmware(const QString &sfile, const CompareType & ++pad; pad = pad * 4; pad = pad - arr.length(); - arr.append(QByteArray(pad, 255)); + arr.append(QByteArray(pad, (char)255)); } if (type == DFU::crccompare) { quint32 crc = DFUObject::CRCFromQBArray(arr, devices[device].SizeOfCode); @@ -1033,7 +1033,7 @@ quint32 DFUObject::CRCFromQBArray(QByteArray array, quint32 Size) { quint32 pad = Size - array.length(); - array.append(QByteArray(pad, 255)); + array.append(QByteArray(pad, (char)255)); int num_words = Size / 4; quint32 *t = (quint32 *)malloc(Size); for (int x = 0; x < num_words; x++) { diff --git a/make/tool_install/qt-install.qs b/make/tool_install/qt-install.qs index 441d7bbd9..dc1920c72 100644 --- a/make/tool_install/qt-install.qs +++ b/make/tool_install/qt-install.qs @@ -1,10 +1,10 @@ /* Silent installer script -Known to work with Qt 5.8.0 and QtIFW 2.0.5 +Known to work with Qt 5.9.0 and QtIFW 2.0.5 Test with: -$ ./qt-opensource-windows-x86-mingw530-5.8.0.exe --verbose --script ../librepilot/make/tool_install/qt-install.qs +$ ./qt-opensource-windows-x86-mingw530-5.9.0.exe --verbose --script ../librepilot/make/tool_install/qt-install.qs Known issues: - silent but not headless (QtIFW 2.1.0 should support gui.setSilent(true)) @@ -20,7 +20,7 @@ function Controller() var qtInstallTargetDir = installer.environmentVariable("QT_INSTALL_TARGET_DIR"); if (qtInstallTargetDir == "") { - qtInstallTargetDir = installer.environmentVariable("PWD") + "/tools/qt-5.8.0"; + qtInstallTargetDir = installer.environmentVariable("PWD") + "/tools/qt-5.9.0"; console.log("Environment variable QT_INSTALL_TARGET_DIR not set, using default " + qtInstallTargetDir); } installer.setValue("TargetDir", qtInstallTargetDir); @@ -107,18 +107,18 @@ Controller.prototype.ComponentSelectionPageCallback = function() var page = gui.currentPageWidget(); page.deselectAll() if (installer.value("os") == "win") { - selectComponent(page, "qt.58.win32_mingw53"); + selectComponent(page, "qt.59.win32_mingw53"); selectComponent(page, "qt.tools.win32_mingw530"); } else if (installer.value("os") == "x11") { - selectComponent(page, "qt.58.gcc"); - selectComponent(page, "qt.58.gcc_64"); + selectComponent(page, "qt.59.gcc"); + selectComponent(page, "qt.59.gcc_64"); } else if (installer.value("os") == "mac") { - selectComponent(page, "qt.58.clang_64"); + selectComponent(page, "qt.59.clang_64"); } - //selectComponent(page, "qt.58.qtquickcontrols"); - selectComponent(page, "qt.58.qtscript"); + //selectComponent(page, "qt.59.qtquickcontrols"); + selectComponent(page, "qt.59.qtscript"); gui.clickButton(buttons.NextButton); } diff --git a/make/tools.mk b/make/tools.mk index 902be7aaf..1acd5c401 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -90,8 +90,8 @@ TOOLS_URL := http://librepilot.github.io/tools # and are used only to install the tools on some OSes # don't assume actual versions to match -QT_SHORT_VERSION := 5.8 -QT_VERSION := 5.8.0 +QT_SHORT_VERSION := 5.9 +QT_VERSION := 5.9.0 OSG_VERSION := 3.5.5 OSGEARTH_VERSION := 2.8 @@ -110,10 +110,10 @@ ifeq ($(UNAME), Linux) DOXYGEN_URL := $(TOOLS_URL)/doxygen-1.8.3.1.src.tar.gz else ifeq ($(UNAME), Darwin) QT_SDK_ARCH := clang_64 - QT_SDK_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/qt-opensource-mac-x64-clang-$(QT_VERSION).dmg + QT_SDK_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/qt-opensource-mac-x64-$(QT_VERSION).dmg QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/md5sums.txt - QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-$(QT_VERSION) - QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-$(QT_VERSION)/qt-opensource-mac-x64-clang-$(QT_VERSION).app/Contents/MacOS/qt-opensource-mac-x64-clang-$(QT_VERSION) + QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-$(QT_VERSION) + QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-$(QT_VERSION)/qt-opensource-mac-x64-$(QT_VERSION).app/Contents/MacOS/qt-opensource-mac-x64-$(QT_VERSION) UNCRUSTIFY_URL := $(TOOLS_URL)/uncrustify-0.60.tar.gz DOXYGEN_URL := $(TOOLS_URL)/doxygen-1.8.3.1.src.tar.gz OSG_URL := $(TOOLS_URL)/osg-$(OSG_VERSION)-clang_64.tar.gz