diff options
author | Eirik Aavitsland <eirik.aavitsland@theqtcompany.com> | 2016-03-18 10:49:43 +0100 |
---|---|---|
committer | aavit <eirik.aavitsland@theqtcompany.com> | 2016-03-30 10:12:34 +0000 |
commit | 91f8c9cc70bbfb752811cd29945fb37ff863d524 (patch) | |
tree | a970c657be95cce9f1b2307a71d2c50cada42940 /mkspecs/unsupported | |
parent | 2a0ab43f18d8e84a4547d55c0bbc219c19925ea0 (diff) |
Remove the traces of the discontinued android-no-sdk platform
Cleaning out the workarounds for the discontinued "Embedded Android"
platform of Boot2Qt.
Change-Id: I0ff9d770e82a43457fb7e5da0428f4597ead4038
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs/unsupported')
-rw-r--r-- | mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp | 156 | ||||
-rw-r--r-- | mkspecs/unsupported/android-g++/qmake.conf | 183 | ||||
-rw-r--r-- | mkspecs/unsupported/android-g++/qplatformdefs.h | 40 |
3 files changed, 0 insertions, 379 deletions
diff --git a/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp b/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp deleted file mode 100644 index 3978bbc9e2..0000000000 --- a/mkspecs/unsupported/android-g++/qeglfshooks_surfaceflinger.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qeglfshooks.h" - -#include <ui/DisplayInfo.h> -#include <ui/FramebufferNativeWindow.h> -#include <fcntl.h> -#include <unistd.h> -#include <linux/fb.h> -#include <sys/ioctl.h> - -#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) -#include <gui/SurfaceComposerClient.h> -#else -#include <surfaceflinger/SurfaceComposerClient.h> -#endif - -using namespace android; - -QT_BEGIN_NAMESPACE - -class QEglFSPandaHooks : public QEglFSHooks -{ -public: - QEglFSPandaHooks(); - virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format); - virtual bool filterConfig(EGLDisplay display, EGLConfig config) const; - virtual const char *fbDeviceName() const { return "/dev/graphics/fb0"; } - -private: - EGLNativeWindowType createNativeWindowSurfaceFlinger(const QSize &size, const QSurfaceFormat &format); - EGLNativeWindowType createNativeWindowFramebuffer(const QSize &size, const QSurfaceFormat &format); - - void ensureFramebufferNativeWindowCreated(); - - // androidy things - sp<android::SurfaceComposerClient> mSession; - sp<android::SurfaceControl> mControl; - sp<android::Surface> mAndroidSurface; - - sp<android::FramebufferNativeWindow> mFramebufferNativeWindow; - EGLint mFramebufferVisualId; - - bool mUseFramebuffer; -}; - -QEglFSPandaHooks::QEglFSPandaHooks() - : mFramebufferVisualId(EGL_DONT_CARE) -{ - mUseFramebuffer = qgetenv("QT_QPA_EGLFS_NO_SURFACEFLINGER").toInt(); -} - -void QEglFSPandaHooks::ensureFramebufferNativeWindowCreated() -{ - if (mFramebufferNativeWindow.get()) - return; - mFramebufferNativeWindow = new FramebufferNativeWindow(); - framebuffer_device_t const *fbDev = mFramebufferNativeWindow->getDevice(); - if (!fbDev) - qFatal("Failed to get valid FramebufferNativeWindow, no way to create EGL surfaces"); - - ANativeWindow *window = mFramebufferNativeWindow.get(); - - window->query(window, NATIVE_WINDOW_FORMAT, &mFramebufferVisualId); -} - -EGLNativeWindowType QEglFSPandaHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) -{ - Q_UNUSED(window) - return mUseFramebuffer ? createNativeWindowFramebuffer(size, format) : createNativeWindowSurfaceFlinger(size, format); -} - -EGLNativeWindowType QEglFSPandaHooks::createNativeWindowFramebuffer(const QSize &size, const QSurfaceFormat &) -{ - Q_UNUSED(size); - ensureFramebufferNativeWindowCreated(); - return mFramebufferNativeWindow.get(); -} - -EGLNativeWindowType QEglFSPandaHooks::createNativeWindowSurfaceFlinger(const QSize &size, const QSurfaceFormat &) -{ - Q_UNUSED(size); - - mSession = new SurfaceComposerClient(); - DisplayInfo dinfo; - int status=0; - status = mSession->getDisplayInfo(0, &dinfo); - mControl = mSession->createSurface( - 0, dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_888); - SurfaceComposerClient::openGlobalTransaction(); - mControl->setLayer(0x40000000); -// mControl->setAlpha(1); - SurfaceComposerClient::closeGlobalTransaction(); - mAndroidSurface = mControl->getSurface(); - - EGLNativeWindowType eglWindow = mAndroidSurface.get(); - return eglWindow; -} - -bool QEglFSPandaHooks::filterConfig(EGLDisplay display, EGLConfig config) const -{ - if (!mUseFramebuffer) - return true; - - const_cast<QEglFSPandaHooks *>(this)->ensureFramebufferNativeWindowCreated(); - - if (mFramebufferVisualId == EGL_DONT_CARE) - return true; - - EGLint nativeVisualId = 0; - eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId); - - return nativeVisualId == mFramebufferVisualId; -} - -static QEglFSPandaHooks eglFSPandaHooks; -QEglFSHooks *platformHooks = &eglFSPandaHooks; - -QT_END_NAMESPACE diff --git a/mkspecs/unsupported/android-g++/qmake.conf b/mkspecs/unsupported/android-g++/qmake.conf deleted file mode 100644 index e52137d7c5..0000000000 --- a/mkspecs/unsupported/android-g++/qmake.conf +++ /dev/null @@ -1,183 +0,0 @@ -ANDROID_BUILD_TOP=$$(ANDROID_BUILD_TOP) -isEmpty(ANDROID_BUILD_TOP) : error("$ANDROID_BUILD_TOP is empty. Forgot to run 'lunch'?") - -ANDROID_PRODUCT_OUT=$$(ANDROID_PRODUCT_OUT) -isEmpty(ANDROID_PRODUCT_OUT) : error("$ANDROID_PRODUCT_OUT is empty. forgot to run 'lunch'?") - -defineReplace(getAndroidBuildVar) { - thevar = $$1 - r=$$system(cd $$ANDROID_BUILD_TOP && CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core make --no-print-directory -f build/core/config.mk dumpvar-$${thevar}) - return($$r) -} - -# .qmake.cache is not available at mkspec loading time. -# not caching those is horribly slow though - -!exists($$PWD/android_build_vars) { - store_ANDROID_TOOLCHAIN_PREFIX = "ANDROID_TOOLCHAIN_PREFIX=$$getAndroidBuildVar(abs-TARGET_TOOLS_PREFIX)" - store_ANDROID_TARGET_CFLAGS = "ANDROID_TARGET_CFLAGS=$$getAndroidBuildVar(TARGET_GLOBAL_CFLAGS)" - store_ANDROID_TARGET_LDFLAGS = "ANDROID_TARGET_LDFLAGS=$$getAndroidBuildVar(TARGET_GLOBAL_LDFLAGS)" - store_ANDROID_TARGET_ARCH = "ANDROID_TARGET_ARCH=$$getAndroidBuildVar(TARGET_ARCH)" - store_ANDROID_VERSION = "ANDROID_VERSION=$$getAndroidBuildVar(PLATFORM_VERSION)" - - write_file(android_build_vars, store_ANDROID_TOOLCHAIN_PREFIX) - write_file(android_build_vars, store_ANDROID_TARGET_CFLAGS, append) - write_file(android_build_vars, store_ANDROID_TARGET_LDFLAGS, append) - write_file(android_build_vars, store_ANDROID_TARGET_ARCH, append) - write_file(android_build_vars, store_ANDROID_VERSION, append) -} - -info(using android build env from cache in $$PWD/android_build_vars . delete this file if you changed your build env ) -exists($$PWD/android_build_vars) { - include($$PWD/android_build_vars) -} - -ANDROID_VERSION_SPLIT = $$split(ANDROID_VERSION, ".") -ANDROID_VERSION_MAJOR = $$member(ANDROID_VERSION_SPLIT, 0) -ANDROID_VERSION_MINOR = $$member(ANDROID_VERSION_SPLIT, 1) - -MAKEFILE_GENERATOR = UNIX -QMAKE_COMPILER = gcc -TARGET_PLATFORM = unix -TEMPLATE = app -QMAKE_INCREMENTAL_STYLE = sublib - -include(../../common/linux.conf) -include(../../common/gcc-base-unix.conf) - -CONFIG = qt warn_on release link_prl -QT = core gui -DEFINES += HAVE_ANDROID_OS Q_OS_ANDROID_NO_SDK -DEFINES += Q_ANDROID_VERSION_MAJOR=$$ANDROID_VERSION_MAJOR -DEFINES += Q_ANDROID_VERSION_MINOR=$$ANDROID_VERSION_MINOR -DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG QT_NO_EXCEPTIONS - -#note: -DANDROID results in weird behaviour of math.h -DEFINES += ANDROID - -QT_QPA_DEFAULT_PLATFORM = eglfs -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_surfaceflinger.cpp -EGLFS_PLATFORM_HOOKS_LIBS += -lui -lgui -lutils -lcutils - - -QMAKE_CC = $${ANDROID_TOOLCHAIN_PREFIX}gcc - -QMAKE_CFLAGS = $${ANDROID_TARGET_CFLAGS} -QMAKE_CFLAGS -= -Werror=non-virtual-dtor -QMAKE_CFLAGS -= -DNDEBUG - -QMAKE_CFLAGS_WARN_ON = -Wall -Wextra -QMAKE_CFLAGS_WARN_OFF = -Wno-psabi - -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CFLAGS_HIDESYMS = - -QMAKE_CXX = $${ANDROID_TOOLCHAIN_PREFIX}g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden - -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_LINK - -QMAKE_AR = $${ANDROID_TOOLCHAIN_PREFIX}ar cqs -QMAKE_OBJCOPY = $${ANDROID_TOOLCHAIN_PREFIX}objcopy -QMAKE_NM = $${ANDROID_TOOLCHAIN_PREFIX}nm -P -QMAKE_STRIP = $${ANDROID_TOOLCHAIN_PREFIX}strip -QMAKE_RANLIB = $${ANDROID_TOOLCHAIN_PREFIX}ranlib - -QMAKE_INCDIR = $${ANDROID_BUILD_TOP} \ - $${ANDROID_BUILD_TOP}/dalvik/libnativehelper/include/nativehelper \ - $${ANDROID_BUILD_TOP}/bionic \ - $${ANDROID_BUILD_TOP}/bionic/libc/include \ - $${ANDROID_BUILD_TOP}/bionic/libc/kernel/arch-arm \ - $${ANDROID_BUILD_TOP}/bionic/libc/kernel/common \ - $${ANDROID_BUILD_TOP}/bionic/libc/private \ - $${ANDROID_BUILD_TOP}/bionic/libm/include \ - $${ANDROID_BUILD_TOP}/bionic/libm/include/arm \ - $${ANDROID_BUILD_TOP}/bionic/libstdc++/include \ - $${ANDROID_BUILD_TOP}/bionic/libthread_db/include \ - $${ANDROID_BUILD_TOP}/dalvik/libnativehelper/include \ - $${ANDROID_BUILD_TOP}/external/icu4c/common/ \ - $${ANDROID_BUILD_TOP}/external/icu4c/i18n/ \ - $${ANDROID_BUILD_TOP}/external/skia/include \ - $${ANDROID_BUILD_TOP}/external/stlport/stlport \ - $${ANDROID_BUILD_TOP}/frameworks/include \ - $${ANDROID_BUILD_TOP}/frameworks/native/include \ - $${ANDROID_BUILD_TOP}/frameworks/native/include/gui \ - $${ANDROID_BUILD_TOP}/frameworks/native/opengl/include \ - $${ANDROID_BUILD_TOP}/frameworks/base/include \ - $${ANDROID_BUILD_TOP}/frameworks/base/native/include \ - $${ANDROID_BUILD_TOP}/frameworks/base/opengl/include \ - $${ANDROID_BUILD_TOP}/hardware/libhardware/include \ - $${ANDROID_BUILD_TOP}/hardware/libhardware_legacy/include \ - $${ANDROID_BUILD_TOP}/hardware/ril/include \ - $${ANDROID_BUILD_TOP}/system/core/include \ - $${ANDROID_BUILD_TOP}/system/core/include/arch/linux-arm/ \ - $${ANDROID_PRODUCT_OUT}/obj/include - -QMAKE_INCDIR += $${ANDROID_BUILD_TOP}/bionic/libc/arch-$${ANDROID_TARGET_ARCH}/include - -QMAKE_LIBDIR = ${ANDROID_PRODUCT_OUT}/obj/lib -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_INCDIR_OPENGL_ES2 = -QMAKE_LIBDIR_OPENGL_ES2 = - - -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LFLAGS = $${ANDROID_TARGET_LDFLAGS} \ - -nostdlib \ - -L${ANDROID_PRODUCT_OUT}/obj/lib \ - -Wl,-rpath-link,${ANDROID_PRODUCT_OUT}/obj/lib - -QMAKE_LFLAGS_PLUGIN = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \ - -Wl,-shared,-Bsymbolic - -#apparantly this file is missing from some builds. -#it does work without, but this may change in future. -#QMAKE_LFLAGS_APP = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xs \ -QMAKE_LFLAGS_APP = ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_dynamic.o \ - ${ANDROID_PRODUCT_OUT}/obj/lib/crtend_android.o - -QMAKE_LFLAGS_SHLIB = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \ - -Wl,-shared,-Bsymbolic \ - ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_so.o \ - ${ANDROID_PRODUCT_OUT}/obj/lib/crtend_so.o - -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined -QMAKE_LFLAGS_RPATH = -Wl,-rpath= - - -QMAKE_LIBS = -lstlport -lstdc++ -llog -lz -lm -ldl -lc -lgcc - - -QMAKE_LIBS_X11 = -QMAKE_LIBS_X11SM = -QMAKE_LIBS_QT_THREAD = -QMAKE_LIBS_QT_OPENGL = -QMAKE_LIBS_QTOPIA = -QMAKE_LIBS_THREAD = -QMAKE_LIBS_OPENGL = -QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 $$QMAKE_LIBS - -CONFIG += linux-android-9 android-9 linux-android android android-no-sdk android_app - -load(qt_config) - -# we don't support exceptions, but right now this has no effect -# you need to manually delete mkspecs/features/exceptions.prf -CONFIG -= exceptions -CONFIG += exceptions_off - diff --git a/mkspecs/unsupported/android-g++/qplatformdefs.h b/mkspecs/unsupported/android-g++/qplatformdefs.h deleted file mode 100644 index 93757a8e17..0000000000 --- a/mkspecs/unsupported/android-g++/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../../common/android/qplatformdefs.h" |