From 4da4ec12ad7cff3dd6227df52ae6a4922addde04 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 20 Mar 2016 18:11:20 +0100 Subject: [PATCH] LP-208 msys2: fix dependency issues - catch up with msys2 package changes (qt5.6, etc.) - use LP provided gdal-minimal (to pull less dependencies) - update CONTRIBUTING.md accordingly - enable use of osgearth by default - enable use of osg/osgearth debug builds --- CONTRIBUTING.md | 38 +++++++++++++++---- Makefile | 3 ++ ground/gcs/copydata.pro | 3 +- ground/gcs/src/libs/osgearth/copydata.pro | 5 +-- .../libs/osgearth/osgearth_dependencies.pri | 2 +- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9239407d..de1e1c81e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,19 +20,43 @@ You can use brew with `brew install git curl p7zip` or macport with `sudo port i ### Windows -Install [Msys2](https://msys2.github.io/) following the instructions on the web site. You can either install the i686 (32 bit) or x86_64 (64 bit) version. +## Install [Msys2](https://msys2.github.io/) -Start a *MinGW-w64 Win32 Shell* or *MinGW-w64 Win64 Shell* (but **not** a *MSYS2 Shell*). +Follow the instructions on the web site. You can either install the i686 (Win32) or x86_64 (Win64) version. +It is recommended to go for the Win64 Shell if possible. +The x86_64 version has both Win32 and Win64 shells and it is possible to build both i686 and x86_64 applications. -Install the dependent packages that match your MinGW shell. +## Add the LibrePilot MinGW package repository -For 32 bit: +Add the following lines at the end of your /etc/pacman.conf file: - pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl mingw-w64-i686-OpenSceneGraph mingw-w64-i686-osgearth + [librepilot-mingw] + SigLevel = Optional TrustAll + Server = http://download.librepilot.org/repo/mingw -For 64 bit: +## Install required packages - pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl mingw-w64-x86_64-OpenSceneGraph mingw-w64-x86_64-osgearth +# For i686 applications + +Start a MinGW-w64 Win64 Shell or a MinGW-w64 Win32 Shell. + + pacman -Sy + pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-ccache mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl mingw-w64-i686-gdal-minimal mingw-w64-i686-OpenSceneGraph mingw-w64-i686-osgearth + +Optionally install debug packages: + + pacman -S --needed mingw-w64-i686-OpenSceneGraph-debug mingw-w64-i686-osgearth-debug + +# For x86_64 applications + +Start a MinGW-w64 Win64 Shell. + + pacman -Sy + pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-ccache mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl mingw-w64-x86_64-gdal-minimal mingw-w64-x86_64-OpenSceneGraph mingw-w64-x86_64-osgearth + +Optionally install debug packages: + + pacman -S --needed mingw-w64-x86_64-OpenSceneGraph-debug mingw-w64-x86_64-osgearth-debug **NOTE** On Windows you need to run the mingw version of make, which is `mingw32-make` diff --git a/Makefile b/Makefile index c9f509a73..53a6a3b5c 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,9 @@ GCS_BUILD_CONF := release # Set extra configuration GCS_EXTRA_CONF += osg copy_osg +ifeq ($(UNAME), Windows) + GCS_EXTRA_CONF += osgearth +endif ############################## # diff --git a/ground/gcs/copydata.pro b/ground/gcs/copydata.pro index b17ed7cc6..a03773f8a 100644 --- a/ground/gcs/copydata.pro +++ b/ground/gcs/copydata.pro @@ -93,12 +93,14 @@ win32 { libicuuc56.dll \ libstdc++-6.dll \ libwinpthread-1.dll \ + libpcre-1.dll \ libpcre16-0.dll \ zlib1.dll \ libharfbuzz-0.dll \ libfreetype-6.dll \ libbz2-1.dll \ libpng16-16.dll \ + libjpeg-8.dll \ libglib-2.0-0.dll \ libintl-8.dll \ libiconv-2.dll @@ -129,7 +131,6 @@ win32 { imageformats/qgif$${DS}.dll \ imageformats/qico$${DS}.dll \ imageformats/qjpeg$${DS}.dll \ - imageformats/qmng$${DS}.dll \ imageformats/qsvg$${DS}.dll \ imageformats/qtiff$${DS}.dll \ platforms/qwindows$${DS}.dll \ diff --git a/ground/gcs/src/libs/osgearth/copydata.pro b/ground/gcs/src/libs/osgearth/copydata.pro index ba614230c..70f702660 100644 --- a/ground/gcs/src/libs/osgearth/copydata.pro +++ b/ground/gcs/src/libs/osgearth/copydata.pro @@ -11,7 +11,7 @@ contains(QT_ARCH, x86_64) { } # set debug suffix if needed -#win32:CONFIG(debug, debug|release):DS = "d" +win32:CONFIG(debug, debug|release):DS = "d" osg:linux { # copy osg libraries @@ -62,7 +62,7 @@ osg:win32 { # other OSG_LIBS += \ - libproj-9.dll \ + libjpeg-8.dll \ libfreetype-6.dll \ libpng16-16.dll \ libiconv-2.dll \ @@ -190,7 +190,6 @@ osgearth:win32 { libgdal-20.dll \ libgeos_c.dll \ libgeos.dll \ - libjpeg-8.dll \ libopenjp2-7.dll \ libtiff-5.dll \ liblzma-5.dll diff --git a/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri b/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri index 9395faac7..54b033784 100644 --- a/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri +++ b/ground/gcs/src/libs/osgearth/osgearth_dependencies.pri @@ -2,7 +2,7 @@ QMAKE_CXXFLAGS += -Wno-unused-parameter # set debug suffix if needed -#win32:CONFIG(debug, debug|release):DS = "d" +win32:CONFIG(debug, debug|release):DS = "d" contains(QT_ARCH, x86_64) { macx {