Files
MapLibreParticleLab/configure
Konstantin Käfer 47ede853c4 fixes black flicker on rotating the device
fixes #838

instead of rendering ad libitum on the map thread, we are now driving rendering from the UI thread on iOS via the map.renderSync() function. There are still white bars during the rotation, but the general content of the view is kept visible.

- upgrades GLFW to 3.1
- removes swapped/needsSwap in favor of a more explicit scheme
- View#invalidate() now replaces View#swap() and is called whenever the View needs to trigger a rerender. GLFW and Android to this right away, while iOS goes back to the main thread and does the Map redrawing as part of the GLKView update
- sets all iOS deployment targets to 7.0
- disables SQLite3 version check, since the library version changed on iOS 8.2
2015-03-12 12:16:38 +01:00

179 lines
6.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
set -o pipefail
CONFIG_FILE=$1
if [ `uname -s` = 'Darwin' ]; then
MASON_PLATFORM=${MASON_PLATFORM:-osx}
fi
function finish {
>&2 echo -en "\033[0m";
}
trap finish EXIT
# Install mason
. ./scripts/local_mason.sh
case ${MASON_PLATFORM} in
'ios')
SQLITE_VERSION=system
LIBUV_VERSION=0.10.28
ZLIB_VERSION=system
BOOST_VERSION=system
;;
'android')
SQLITE_VERSION=3.8.8.1
LIBPNG_VERSION=1.6.16
LIBJPEG_VERSION=v9a
OPENSSL_VERSION=1.0.1l
LIBCURL_VERSION=7.40.0
LIBUV_VERSION=1.4.0
ZLIB_VERSION=system
BOOST_VERSION=1.57.0
NUNICODE_VERSION=1.5.1
LIBZIP_VERSION=0.11.2
;;
*)
GLFW_VERSION=3.1
SQLITE_VERSION=3.8.8.1
LIBPNG_VERSION=1.6.16
LIBJPEG_VERSION=v9a
LIBCURL_VERSION=system
LIBUV_VERSION=0.10.28
ZLIB_VERSION=system
BOOST_VERSION=system
NUNICODE_VERSION=1.5.1
LIBZIP_VERSION=0.11.2
;;
esac
function abort { >&2 echo -e "\033[1m\033[31m$1\033[0m"; exit 1; }
if [ -z ${CONFIG_FILE} ]; then
abort 'You need to specify an output path for the configuration file'
fi
if [[ ${MASON_PLATFORM} = 'android' && -z ${MASON_ANDROID_ABI} ]]; then
abort 'You need to specify an ABI for android platforms'
fi
echo -n "MASON_PLATFORM=${MASON_PLATFORM} "
if [ ${MASON_PLATFORM} = 'android' ]; then echo -n "MASON_ANDROID_ABI=${MASON_ANDROID_ABI} " ; fi
echo $0 $@
PYTHON=`which python || abort 'Cannot find python'`
>&2 echo -en "\033[1m\033[32m* Using "
>&2 ${PYTHON} --version
>&2 echo -en "\033[0m";
PKG_CONFIG=`which pkg-config || abort 'Cannot find pkg-config'`
>&2 echo -en "\033[1m\033[32m* Using pkg-config "
>&2 ${PKG_CONFIG} --version
>&2 echo -en "\033[0m";
function quote_flags {
${PYTHON} -c "import sys, re; print filter(None, re.split('(?<!-framework)\s+', ' '.join(sys.argv[1:])))" "$@"
}
LN=$'\n'
CONFIG="# Do not edit. Generated by the configure script.
{
'target_defaults': {
'cflags%': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []
},
'variables': {
"
if [ ! -z ${BOOST_VERSION} ]; then
mason install boost ${BOOST_VERSION}
CONFIG+=" 'boost_cflags%': $(quote_flags $(mason cflags boost ${BOOST_VERSION})),"$LN
CONFIG+=" 'boost_ldflags%': $(quote_flags $(mason ldflags boost ${BOOST_VERSION})),"$LN
fi
if [ ! -z ${OPENSSL_VERSION} ]; then
mason install openssl ${OPENSSL_VERSION}
CONFIG+=" 'openssl_static_libs%': $(quote_flags $(mason static_libs openssl ${OPENSSL_VERSION})),"$LN
CONFIG+=" 'openssl_cflags%': $(quote_flags $(mason cflags openssl ${OPENSSL_VERSION})),"$LN
CONFIG+=" 'openssl_ldflags%': $(quote_flags $(mason ldflags openssl ${OPENSSL_VERSION})),"$LN
fi
if [ ! -z ${LIBCURL_VERSION} ]; then
mason install libcurl ${LIBCURL_VERSION}
CONFIG+=" 'curl_static_libs%': $(quote_flags $(mason static_libs libcurl ${LIBCURL_VERSION})),"$LN
CONFIG+=" 'curl_cflags%': $(quote_flags $(mason cflags libcurl ${LIBCURL_VERSION})),"$LN
CONFIG+=" 'curl_ldflags%': $(quote_flags $(mason ldflags libcurl ${LIBCURL_VERSION})),"$LN
fi
if [ ! -z ${GLFW_VERSION} ]; then
mason install glfw ${GLFW_VERSION}
CONFIG+=" 'glfw3_static_libs%': $(quote_flags $(mason static_libs glfw ${GLFW_VERSION})),"$LN
CONFIG+=" 'glfw3_cflags%': $(quote_flags $(mason cflags glfw ${GLFW_VERSION})),"$LN
CONFIG+=" 'glfw3_ldflags%': $(quote_flags $(mason ldflags glfw ${GLFW_VERSION})),"$LN
fi
if [ ! -z ${LIBPNG_VERSION} ]; then
mason install libpng ${LIBPNG_VERSION}
CONFIG+=" 'png_static_libs%': $(quote_flags $(mason static_libs libpng ${LIBPNG_VERSION})),"$LN
CONFIG+=" 'png_cflags%': $(quote_flags $(mason cflags libpng ${LIBPNG_VERSION})),"$LN
CONFIG+=" 'png_ldflags%': $(quote_flags $(mason ldflags libpng ${LIBPNG_VERSION})),"$LN
fi
if [ ! -z ${LIBJPEG_VERSION} ]; then
mason install jpeg ${LIBJPEG_VERSION}
CONFIG+=" 'jpeg_static_libs%': $(quote_flags $(mason static_libs jpeg ${LIBJPEG_VERSION})),"$LN
CONFIG+=" 'jpeg_cflags%': $(quote_flags $(mason cflags jpeg ${LIBJPEG_VERSION})),"$LN
CONFIG+=" 'jpeg_ldflags%': $(quote_flags $(mason ldflags jpeg ${LIBJPEG_VERSION})),"$LN
fi
if [ ! -z ${SQLITE_VERSION} ]; then
mason install sqlite ${SQLITE_VERSION}
CONFIG+=" 'sqlite3_static_libs%': $(quote_flags $(mason static_libs sqlite ${SQLITE_VERSION})),"$LN
CONFIG+=" 'sqlite3_cflags%': $(quote_flags $(mason cflags sqlite ${SQLITE_VERSION})),"$LN
CONFIG+=" 'sqlite3_ldflags%': $(quote_flags $(mason ldflags sqlite ${SQLITE_VERSION})),"$LN
fi
if [ ! -z ${LIBUV_VERSION} ]; then
mason install libuv ${LIBUV_VERSION}
CONFIG+=" 'uv_static_libs%': $(quote_flags $(mason static_libs libuv ${LIBUV_VERSION})),"$LN
CONFIG+=" 'uv_cflags%': $(quote_flags $(mason cflags libuv ${LIBUV_VERSION})),"$LN
CONFIG+=" 'uv_ldflags%': $(quote_flags $(mason ldflags libuv ${LIBUV_VERSION})),"$LN
fi
if [ ! -z ${ZLIB_VERSION} ]; then
mason install zlib ${ZLIB_VERSION}
CONFIG+=" 'zlib_static_libs%': $(quote_flags $(mason static_libs zlib ${ZLIB_VERSION})),"$LN
CONFIG+=" 'zlib_cflags%': $(quote_flags $(mason cflags zlib ${ZLIB_VERSION})),"$LN
CONFIG+=" 'zlib_ldflags%': $(quote_flags $(mason ldflags zlib ${ZLIB_VERSION})),"$LN
fi
if [ ! -z ${NUNICODE_VERSION} ]; then
mason install nunicode ${NUNICODE_VERSION}
CONFIG+=" 'nu_static_libs%': $(quote_flags $(mason static_libs nunicode ${NUNICODE_VERSION})),"$LN
CONFIG+=" 'nu_cflags%': $(quote_flags $(mason cflags nunicode ${NUNICODE_VERSION})),"$LN
CONFIG+=" 'nu_ldflags%': $(quote_flags $(mason ldflags nunicode ${NUNICODE_VERSION})),"$LN
fi
if [ ! -z ${LIBZIP_VERSION} ]; then
mason install libzip ${LIBZIP_VERSION}
CONFIG+=" 'zip_static_libs%': $(quote_flags $(mason static_libs libzip ${LIBZIP_VERSION})),"$LN
CONFIG+=" 'zip_cflags%': $(quote_flags $(mason cflags libzip ${LIBZIP_VERSION})),"$LN
CONFIG+=" 'zip_ldflags%': $(quote_flags $(mason ldflags libzip ${LIBZIP_VERSION})),"$LN
fi
CONFIG+=" }
}
"
echo "${CONFIG}" > ${CONFIG_FILE}
cat ${CONFIG_FILE}