From 38a0dfc0de1d661c130951e6bd9c29b8052277b9 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 20 Mar 2016 18:13:40 +0100 Subject: [PATCH 1/3] LP-208 msys2: copy only necessary osg/osgearth plugins to distribution --- ground/gcs/src/libs/osgearth/copydata.pro | 29 +++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/ground/gcs/src/libs/osgearth/copydata.pro b/ground/gcs/src/libs/osgearth/copydata.pro index 764a4414e..ba614230c 100644 --- a/ground/gcs/src/libs/osgearth/copydata.pro +++ b/ground/gcs/src/libs/osgearth/copydata.pro @@ -97,8 +97,17 @@ osg:win32 { # osg plugins OSG_PLUGINS = \ - mingw_osgdb_3dc$${DS}.dll \ mingw_osgdb_3ds$${DS}.dll \ + mingw_osgdb_freetype$${DS}.dll \ + mingw_osgdb_jpeg$${DS}.dll \ + mingw_osgdb_osg$${DS}.dll \ + mingw_osgdb_png$${DS}.dll \ + mingw_osgdb_tiff$${DS}.dll \ + mingw_osgdb_zip$${DS}.dll \ + mingw_osgdb_serializers_osg$${DS}.dll + + osg_extra:OSG_PLUGINS = \ + mingw_osgdb_3dc$${DS}.dll \ mingw_osgdb_ac$${DS}.dll \ mingw_osgdb_bmp$${DS}.dll \ mingw_osgdb_bsp$${DS}.dll \ @@ -114,7 +123,6 @@ osg:win32 { mingw_osgdb_gz$${DS}.dll \ mingw_osgdb_hdr$${DS}.dll \ mingw_osgdb_ive$${DS}.dll \ - mingw_osgdb_jpeg$${DS}.dll \ mingw_osgdb_ktx$${DS}.dll \ mingw_osgdb_logo$${DS}.dll \ mingw_osgdb_lwo$${DS}.dll \ @@ -126,7 +134,6 @@ osg:win32 { mingw_osgdb_ogr$${DS}.dll \ mingw_osgdb_openflight$${DS}.dll \ mingw_osgdb_osc$${DS}.dll \ - mingw_osgdb_osg$${DS}.dll \ mingw_osgdb_osga$${DS}.dll \ mingw_osgdb_osgshadow$${DS}.dll \ mingw_osgdb_osgterrain$${DS}.dll \ @@ -135,7 +142,6 @@ osg:win32 { mingw_osgdb_p3d$${DS}.dll \ mingw_osgdb_pic$${DS}.dll \ mingw_osgdb_ply$${DS}.dll \ - mingw_osgdb_png$${DS}.dll \ mingw_osgdb_pnm$${DS}.dll \ mingw_osgdb_pov$${DS}.dll \ mingw_osgdb_pvr$${DS}.dll \ @@ -147,15 +153,12 @@ osg:win32 { mingw_osgdb_stl$${DS}.dll \ mingw_osgdb_tga$${DS}.dll \ mingw_osgdb_tgz$${DS}.dll \ - mingw_osgdb_tiff$${DS}.dll \ mingw_osgdb_trans$${DS}.dll \ mingw_osgdb_trk$${DS}.dll \ mingw_osgdb_txf$${DS}.dll \ mingw_osgdb_txp$${DS}.dll \ mingw_osgdb_vtf$${DS}.dll \ mingw_osgdb_x$${DS}.dll \ - mingw_osgdb_zip$${DS}.dll \ - mingw_osgdb_serializers_osg$${DS}.dll \ mingw_osgdb_serializers_osganimation$${DS}.dll \ mingw_osgdb_serializers_osgfx$${DS}.dll \ mingw_osgdb_serializers_osgga$${DS}.dll \ @@ -202,16 +205,20 @@ osgearth:win32 { # osgearth plugins OSGEARTH_PLUGINS += \ mingw_osgdb_earth$${DS}.dll \ + mingw_osgdb_osgearth_arcgis$${DS}.dll \ + mingw_osgdb_osgearth_engine_mp$${DS}.dll \ + mingw_osgdb_osgearth_sky_simple$${DS}.dll \ + mingw_osgdb_osgearth_tms$${DS}.dll \ + mingw_osgdb_osgearth_cache_filesystem$${DS}.dll + + osgearth_extra:OSGEARTH_PLUGINS += \ mingw_osgdb_kml$${DS}.dll \ mingw_osgdb_osgearth_agglite$${DS}.dll \ - mingw_osgdb_osgearth_arcgis$${DS}.dll \ mingw_osgdb_osgearth_arcgis_map_cache$${DS}.dll \ mingw_osgdb_osgearth_bing$${DS}.dll \ - mingw_osgdb_osgearth_cache_filesystem$${DS}.dll \ mingw_osgdb_osgearth_colorramp$${DS}.dll \ mingw_osgdb_osgearth_debug$${DS}.dll \ mingw_osgdb_osgearth_engine_byo$${DS}.dll \ - mingw_osgdb_osgearth_engine_mp$${DS}.dll \ mingw_osgdb_osgearth_feature_ogr$${DS}.dll \ mingw_osgdb_osgearth_feature_tfs$${DS}.dll \ mingw_osgdb_osgearth_feature_wfs$${DS}.dll \ @@ -227,13 +234,11 @@ osgearth:win32 { mingw_osgdb_osgearth_refresh$${DS}.dll \ mingw_osgdb_osgearth_scriptengine_javascript$${DS}.dll \ mingw_osgdb_osgearth_sky_gl$${DS}.dll \ - mingw_osgdb_osgearth_sky_simple$${DS}.dll \ mingw_osgdb_osgearth_splat_mask$${DS}.dll \ mingw_osgdb_osgearth_template_matclass$${DS}.dll \ mingw_osgdb_osgearth_tilecache$${DS}.dll \ mingw_osgdb_osgearth_tileindex$${DS}.dll \ mingw_osgdb_osgearth_tileservice$${DS}.dll \ - mingw_osgdb_osgearth_tms$${DS}.dll \ mingw_osgdb_osgearth_vdatum_egm2008$${DS}.dll \ mingw_osgdb_osgearth_vdatum_egm84$${DS}.dll \ mingw_osgdb_osgearth_vdatum_egm96$${DS}.dll \ From 4da4ec12ad7cff3dd6227df52ae6a4922addde04 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sun, 20 Mar 2016 18:11:20 +0100 Subject: [PATCH 2/3] 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 { From 94ab92216d729a6283a030a6db00d454c1b19a4f Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 2 Apr 2016 18:59:30 +0200 Subject: [PATCH 3/3] LP-208 fix CONTRIBUTING.md format --- CONTRIBUTING.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de1e1c81e..6f3f11e01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,32 +1,32 @@ # How to build from source? -Both development environment and GCS are supported on Windows, Linux and Mac OS X +Both development environment and GCS are supported on Windows, Linux and Mac OS X. -## Install prerequisites +# Install prerequisites The first step is to Install all OS specific prerequisites. -### Mac OS X +## Mac OS X Install XCode and its relatated command line tools (follow Apple documentation). Install git, curl and p7zip. You can use brew with `brew install git curl p7zip` or macport with `sudo port install git curl p7zip`. -### Ubuntu +## Ubuntu sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev -### Windows +## Windows -## Install [Msys2](https://msys2.github.io/) +### Install [Msys2](https://msys2.github.io/) 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. -## Add the LibrePilot MinGW package repository +### Add the LibrePilot MinGW package repository Add the following lines at the end of your /etc/pacman.conf file: @@ -34,9 +34,9 @@ Add the following lines at the end of your /etc/pacman.conf file: SigLevel = Optional TrustAll Server = http://download.librepilot.org/repo/mingw -## Install required packages +### Install required packages -# For i686 applications +#### For i686 applications Start a MinGW-w64 Win64 Shell or a MinGW-w64 Win32 Shell. @@ -47,7 +47,7 @@ Optionally install debug packages: pacman -S --needed mingw-w64-i686-OpenSceneGraph-debug mingw-w64-i686-osgearth-debug -# For x86_64 applications +#### For x86_64 applications Start a MinGW-w64 Win64 Shell. @@ -61,16 +61,16 @@ Optionally install debug packages: **NOTE** On Windows you need to run the mingw version of make, which is `mingw32-make` -## Setup the build environment and build +# Setup the build environment and build The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc, etc.) in a local folder `/path/to/LibrePilot_root/tools` -### Ubuntu / Mac OS X +## Ubuntu / Mac OS X make all_sdk_install make package -### Windows +## Windows mingw32-make all_sdk_install mingw32-make package