1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

LP-218 revert to using mesa opengl32.dll (msys2 provided one crashes GCS)

This commit is contained in:
Philippe Renon 2016-01-23 01:21:40 +01:00
parent 83bbb27b83
commit e3926b9c08
5 changed files with 44 additions and 13 deletions

View File

@ -125,14 +125,6 @@ win32 {
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
}
# copy OpenGL DLL
OPENGL_DLLS = \
opengl32.dll
for(dll, OPENGL_DLLS) {
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}/opengl32)
}
QT_PLUGINS = \
iconengines/qsvgicon$${DS}.dll \
imageformats/qgif$${DS}.dll \

View File

@ -171,9 +171,6 @@ macx {
!isEqual(GCS_SOURCE_TREE, $$GCS_BUILD_TREE):copydata = 1
win32 {
MESAWIN_DIR = $$(MESAWIN_DIR)
isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin
GCS_QT_PLUGINS_PATH = $$GCS_APP_PATH
GCS_QT_QML_PATH = $$GCS_APP_PATH

View File

@ -37,4 +37,8 @@ SUBDIRS = src
equals(copyqt, 1) {
SUBDIRS += copydata
copydata.file = copydata.pro
win32 {
SUBDIRS += opengl
opengl.file = opengl.pro
}
}

38
ground/gcs/opengl.pro Normal file
View File

@ -0,0 +1,38 @@
# copy legacy OpenGL DLL
TEMPLATE = aux
include(gcs.pri)
MESAWIN_DIR = $$(MESAWIN_DIR)
isEmpty(MESAWIN_DIR):MESAWIN_DIR = $${TOOLS_DIR}/mesawin
# opengl32.dll will be copied to ./bin/opengl32/ for the installer to use
# the installer packages the dll and optionally allows to install it to ./bin/
# this implies that the opengl32.dll will not be used in a dev environment,
# unless it is copied to the ./bin/ ...
exists($${MESAWIN_DIR}) {
contains(QT_ARCH, i386) {
# take opengl32.dll from mesa (32 bit)
OPENGL_DIR = $${MESAWIN_DIR}/opengl32_32
}
else {
# take opengl32.dll from mesa (64 bit)
OPENGL_DIR = $${MESAWIN_DIR}/opengl32_64
}
}
else {
# take opengl32.dll from mingw32/bin/
# WARNING : doesn't currently work, GCS crashes at startup when using msys2 opengl32.dll
warning("msys2 opengl32.dll breaks GCS, please install mesa with: make mesawin_install")
# skip installing opengl32.dll, the package target will fail when creating the installer
#OPENGL_DIR = $$[QT_INSTALL_BINS]
}
OPENGL_DLLS = \
opengl32.dll
exists($${OPENGL_DIR}):for(dll, OPENGL_DLLS) {
addCopyFileTarget($${dll},$${OPENGL_DIR},$${GCS_APP_PATH}/opengl32)
}

View File

@ -115,9 +115,9 @@ else ifeq ($(UNAME), Windows)
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
MESAWIN_URL := http://librepilot.github.io/tools/mesawin.tar.gz
UNCRUSTIFY_URL := http://librepilot.github.io/tools/uncrustify-0.60-windows.tar.bz2
DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1-windows.tar.bz2
MESAWIN_URL := http://librepilot.github.io/tools/mesawin.tar.gz
OSG_URL := http://librepilot.github.io/tools/osg-3.4-mingw492_32-qt-5.5.1.tar.gz
OSGEARTH_URL := http://librepilot.github.io/tools/osgearth-2.7-mingw492_32-qt-5.5.1.tar.gz
endif
@ -164,7 +164,7 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
BUILD_SDK_TARGETS := arm_sdk osg
ifeq ($(UNAME), Windows)
BUILD_SDK_TARGETS += nsis osgearth
BUILD_SDK_TARGETS += nsis mesawin osgearth
else
BUILD_SDK_TARGETS += qt_sdk
endif