diff --git a/.appveyor.yml b/.appveyor.yml index a096bf9a6f7fb06af87d48a2fd50eb5a5b57f6cd..a506d864576ac06371f8754cf3e277b4b4e7a402 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,17 +14,9 @@ environment: install: - git submodule update --init --recursive - - call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 - - set PATH=C:\Qt\Tools\QtCreator\bin;C:\Qt\5.5\msvc2013\bin;%PATH% + - call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 + - set PATH=C:\Qt\Tools\QtCreator\bin;C:\Qt\5.8\msvc2015\bin;%PATH% - mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\ - - ps: | - Write-Host "Installing NSIS..." -ForegroundColor Cyan - $exePath = "$($env:USERPROFILE)\nsis-3.0rc1-setup.exe" - Write-Host "Downloading..." - (New-Object Net.WebClient).DownloadFile('https://storage.googleapis.com/appveyor-download-cache/nsis/nsis-3.0rc1-setup.exe', $exePath) - Write-Host "Installing..." - cmd /c start /wait $exePath /S - Write-Host "Installed" -ForegroundColor Green - ps: | Write-Host "Installing GStreamer..." -ForegroundColor Cyan $msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.5.2.msi" @@ -43,7 +35,7 @@ install: Write-Host "Installed" -ForegroundColor Green build_script: - - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && C:\Qt\5.5\msvc2013\bin\qmake -r CONFIG-=debug_and_release CONFIG+=%CONFIG% CONFIG+=WarningsAsErrorsOn %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro + - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && C:\Qt\5.8\msvc2015\bin\qmake -r CONFIG-=debug_and_release CONFIG+=%CONFIG% CONFIG+=WarningsAsErrorsOn %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro - cd %SHADOW_BUILD_DIR% && jom - if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\release\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe ) # Generate the source server information to embed in the PDB diff --git a/.travis.yml b/.travis.yml index 8533f3c787ea6abccd84e7c1fbe0c2b4d10fac68..bbb2485ea7c884a5d49063e88e30a78fb0921a95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,9 +89,9 @@ before_install: install: # linux dependencies: qt - if [ "${SPEC}" = "linux-g++-64" ]; then - wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 && - tar jxf Qt5.5.1-linux-min.tar.bz2 -C /tmp && - export PATH=/tmp/Qt/5.5/gcc_64/bin:$PATH && + wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-linux-min.tar.bz2 && + tar jxf Qt5.8.0-linux-min.tar.bz2 -C /tmp && + export PATH=/tmp/Qt5.8-linux/5.8/gcc_64/bin:$PATH && export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start ; @@ -99,8 +99,8 @@ install: # android dependencies: qt, gstreamer, android-ndk - if [ "${SPEC}" = "android-g++" ]; then - wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 && - tar jxf Qt5.5.1-linux-min.tar.bz2 -C /tmp && + wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-android-min.tar.bz2 && + tar jxf Qt5.8.0-android-min.tar.bz2 -C /tmp && wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-android-armv7-1.5.2.tar.bz2 && mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.5.2 && tar jxf gstreamer-1.0-android-armv7-1.5.2.tar.bz2 -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.5.2 && @@ -109,35 +109,34 @@ install: ./android-ndk-r10e-linux-x86_64.bin > /dev/null && export ANDROID_NDK_ROOT=`pwd`/android-ndk-r10e && export ANDROID_SDK_ROOT=/usr/local/android-sdk && - export PATH=/tmp/Qt/5.5/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH && echo $PATH + export PATH=/tmp/Qt5.8-android/5.8/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH && echo $PATH ; fi # osx dependencies: qt, gstreamer, gstreamer-devel - if [ "${SPEC}" = "macx-clang" ]; then - wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-mac-clang-min.tar.bz2 && - tar jxf Qt5.5.1-mac-clang-min.tar.bz2 -C /tmp && + wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-mac-clang-min.tar.bz2 && + tar jxf Qt5.8.0-mac-clang-min.tar.bz2 -C /tmp && wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-1.5.2-x86_64.pkg && sudo installer -verboseR -pkg gstreamer-1.0-1.5.2-x86_64.pkg -target / && wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-1.5.2-x86_64.pkg && sudo installer -verboseR -pkg gstreamer-1.0-devel-1.5.2-x86_64.pkg -target / && wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/osx-gstreamer.tar.bz2 && sudo tar jxf osx-gstreamer.tar.bz2 -C /Library/Frameworks && - export QT_DIR=Qt5.5-mac-clang/5.5/clang_64 && + export QT_DIR=Qt5.8-mac-clang/5.8/clang_64 && export QT_QPA_PLATFORM_PLUGIN_PATH=/tmp/$QT_DIR/plugins && export QML2_IMPORT_PATH=/tmp/$QT_DIR/qml && - export PATH=/tmp/$QT_DIR/bin:$PATH && - tools/patch_qt_for_xcode8.sh + export PATH=/tmp/$QT_DIR/bin:$PATH ; fi # ios dependencies: qt, TODO: add gstreamer - if [ "${SPEC}" = "macx-ios-clang" ]; then - wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-ios-min.tar.bz2 && - tar jxf Qt5.5.1-ios-min.tar.bz2 -C /tmp && + wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-ios-min.tar.bz2 && + tar jxf Qt5.8.0-ios-min.tar.bz2 -C /tmp && export IOS_CCACHE_CC=`/usr/bin/xcrun -sdk iphoneos -find clang` && export IOS_CCACHE_CXX=`/usr/bin/xcrun -sdk iphoneos -find clang++` && - export PATH=/tmp/ios/bin:$PATH && + export PATH=/tmp/Qt5.8-ios/5.8/ios/bin:$PATH && tools/patch_qt_for_xcode8.sh ; fi diff --git a/QGCCommon.pri b/QGCCommon.pri index de0c5166560f16139533100ce7b9dd69a36301af..732b99a00a9855b0421b42dcc63693616c55b2f2 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -46,7 +46,7 @@ linux { error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported") } } else : win32 { - win32-msvc2010 | win32-msvc2012 | win32-msvc2013 { + win32-msvc2010 | win32-msvc2012 | win32-msvc2013 | win32-msvc2015 { message("Windows build") CONFIG += WindowsBuild DEFINES += __STDC_LIMIT_MACROS @@ -77,6 +77,7 @@ linux { } message("iOS build") CONFIG += iOSBuild MobileBuild app_bundle NoSerialBuild + CONFIG -= bitcode DEFINES += __ios__ DEFINES += QGC_NO_GOOGLE_MAPS DEFINES += NO_SERIAL_LINK @@ -202,8 +203,13 @@ MacBuild | LinuxBuild { } WindowsBuild { + win32-msvc2015 { + QMAKE_CFLAGS -= -Zc:strictStrings + QMAKE_CXXFLAGS -= -Zc:strictStrings + } QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings + QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings QMAKE_CXXFLAGS_WARN_ON += /W3 \ diff --git a/QGCSetup.pri b/QGCSetup.pri index eabeca15f7ed478b99168c27abcf822a7da0b942..fa0b3e5f678853bd92e5e2dfed4a5997e8e29d5b 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -84,6 +84,10 @@ WindowsBuild { QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\" \"$$DESTDIR_WIN\" QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\" \"$$DESTDIR_WIN\" } + else:win32-msvc2015 { + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp140.dll\" \"$$DESTDIR_WIN\" + QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\vcruntime140.dll\" \"$$DESTDIR_WIN\" + } else { error("Visual studio version not supported, installation cannot be completed.") } @@ -122,9 +126,9 @@ LinuxBuild { !contains(DEFINES, __rasp_pi2__) { QT_LIB_LIST += \ - libicudata.so.54 \ - libicui18n.so.54 \ - libicuuc.so.54 + libicudata.so.56 \ + libicui18n.so.56 \ + libicuuc.so.56 } for(QT_LIB, QT_LIB_LIST) { diff --git a/libs/qwt/qwt_plot_canvas.cpp b/libs/qwt/qwt_plot_canvas.cpp index 0271713a8b50c44478dfcc6335d513e49c37e818..e558a44ee0afdc67ec3d036d6b9b70fad0d3ba07 100644 --- a/libs/qwt/qwt_plot_canvas.cpp +++ b/libs/qwt/qwt_plot_canvas.cpp @@ -937,7 +937,14 @@ void QwtPlotCanvas::drawBorder( QPainter *painter ) else { #if QT_VERSION >= 0x040500 +#if !defined(_MSC_VER) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif QStyleOptionFrameV3 opt; +#if !defined(_MSC_VER) +#pragma GCC diagnostic pop +#endif opt.init(this); int frameShape = frameStyle() & QFrame::Shape_Mask; diff --git a/src/GPS/definitions.h b/src/GPS/definitions.h index ca655d0b79ea621a8698952941a53e32ce4887be..63fd2c2b100a1ae34a43f1eceb1dd25a30d23468 100644 --- a/src/GPS/definitions.h +++ b/src/GPS/definitions.h @@ -80,10 +80,14 @@ static inline gps_abstime gps_absolute_time() { //timespec is UNIX-specific #ifdef _WIN32 +#if _MSC_VER < 1900 struct timespec { time_t tv_sec; long tv_nsec; }; +#else +#include +#endif #endif diff --git a/tools/StripAndTarQtForAndroidMin.sh b/tools/StripAndTarQtForAndroidMin.sh new file mode 100755 index 0000000000000000000000000000000000000000..548c74dfc317ef066d1f569b118da88c674bf5c6 --- /dev/null +++ b/tools/StripAndTarQtForAndroidMin.sh @@ -0,0 +1,19 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo 'Qt directory must be specified as argument' + exit 1 +fi +if [ ! -d $1 ] ; then + echo 'Qt directory not found' + exit 1 +fi +cd $1 +rm * +find . ! -name '5.8' -maxdepth 1 -type d -exec rm -rf {} + +cd 5.8 +find . ! -name 'android_armv7' -maxdepth 1 -type d -exec rm -rf {} + +cd clang_64 +rm -rf doc +cd $1 +cd .. +tar -jcvf Qt5.8.0-android-min.tar.bz2 $1 diff --git a/tools/StripAndTarQtForLinuxMin.sh b/tools/StripAndTarQtForLinuxMin.sh new file mode 100755 index 0000000000000000000000000000000000000000..b813c5b77b3bb531277a31ba31a9d86289f6796d --- /dev/null +++ b/tools/StripAndTarQtForLinuxMin.sh @@ -0,0 +1,19 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo 'Qt directory must be specified as argument' + exit 1 +fi +if [ ! -d $1 ] ; then + echo 'Qt directory not found' + exit 1 +fi +cd $1 +rm * +find . ! -name '5.8' -maxdepth 1 -type d -exec rm -rf {} + +cd 5.8 +find . ! -name 'gcc_64' -maxdepth 1 -type d -exec rm -rf {} + +cd clang_64 +rm -rf doc +cd $1 +cd .. +tar -jcvf Qt5.8.0-linux-min.tar.bz2 $1 diff --git a/tools/StripAndTarQtForOSXMin.sh b/tools/StripAndTarQtForOSXMin.sh new file mode 100755 index 0000000000000000000000000000000000000000..1e16db34ac1b14863d9dc07ade30d9493a207006 --- /dev/null +++ b/tools/StripAndTarQtForOSXMin.sh @@ -0,0 +1,21 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo 'Qt directory must be specified as argument' + exit 1 +fi +if [ ! -d $1 ] ; then + echo 'Qt directory not found' + exit 1 +fi +cd $1 +rm * +find . ! -name '5.8' -maxdepth 1 -type d -exec rm -rf {} + +cd 5.8 +find . ! -name 'clang_64' -maxdepth 1 -type d -exec rm -rf {} + +cd clang_64 +rm -rf doc +cd lib +rm -rf *.dSYM +cd $1 +cd .. +tar -jcvf Qt5.8.0-mac-clang-min.tar.bz2 $1 diff --git a/tools/StripAndTarQtForiOSMin.sh b/tools/StripAndTarQtForiOSMin.sh new file mode 100755 index 0000000000000000000000000000000000000000..d50e537a2d51eb41c8140ecd5c1cfbf696d7c1f0 --- /dev/null +++ b/tools/StripAndTarQtForiOSMin.sh @@ -0,0 +1,23 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo 'Qt directory must be specified as argument' + exit 1 +fi +if [ ! -d $1 ] ; then + echo 'Qt directory not found' + exit 1 +fi +cd $1 +rm * +find . ! -name '5.8' -maxdepth 1 -type d -exec rm -rf {} + +cd 5.8 +find . ! -name 'ios' -maxdepth 1 -type d -exec rm -rf {} + +cd ios +rm -rf doc +find . -type f -name 'lib*_debug.a' -delete +find . -type f -name 'lib*_debug.la' -delete +find . -type f -name 'lib*_debug.prl' -delete +cd .. +cd .. +cd .. +tar -jcvf Qt5.8.0-mac-ios-min.tar.bz2 $1