Android build fixes for c++11
parent
69247ca223
commit
22a891a925
|
@ -34,7 +34,8 @@ TARGET_TOOLCHAIN = arm-linux-androideabi-
|
||||||
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3
|
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3
|
||||||
TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
|
TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
|
||||||
TARGET_ARCH = armv7
|
TARGET_ARCH = armv7
|
||||||
CROSS_PREFIX = arm-linux-androideabi-
|
CROSS_CC = clang
|
||||||
|
CROSS_CXX = clang++
|
||||||
COMPILER_VERSION = clang
|
COMPILER_VERSION = clang
|
||||||
HAVE_LEVELDB = 0
|
HAVE_LEVELDB = 0
|
||||||
|
|
||||||
|
@ -46,7 +47,8 @@ HAVE_LEVELDB = 0
|
||||||
#TARGET_LIBDIR = mips
|
#TARGET_LIBDIR = mips
|
||||||
#TARGET_TOOLCHAIN = mipsel-linux-android-
|
#TARGET_TOOLCHAIN = mipsel-linux-android-
|
||||||
#TARGET_ARCH = mips32
|
#TARGET_ARCH = mips32
|
||||||
#CROSS_PREFIX = mipsel-linux-android-
|
#CROSS_CC = mipsel-linux-android-gcc
|
||||||
|
#CROSS_CXX = mipsel-linux-android-g++
|
||||||
#COMPILER_VERSION = 4.9
|
#COMPILER_VERSION = 4.9
|
||||||
#HAVE_LEVELDB = 0
|
#HAVE_LEVELDB = 0
|
||||||
|
|
||||||
|
@ -57,9 +59,10 @@ HAVE_LEVELDB = 0
|
||||||
#TARGET_ABI = x86
|
#TARGET_ABI = x86
|
||||||
#TARGET_LIBDIR = x86
|
#TARGET_LIBDIR = x86
|
||||||
#TARGET_TOOLCHAIN = x86-
|
#TARGET_TOOLCHAIN = x86-
|
||||||
#CROSS_PREFIX = i686-linux-android-
|
|
||||||
#TARGET_ARCH = x86
|
#TARGET_ARCH = x86
|
||||||
#COMPILER_VERSION = 4.9
|
#CROSS_CC = clang
|
||||||
|
#CROSS_CXX = clang++
|
||||||
|
#COMPILER_VERSION = clang
|
||||||
#HAVE_LEVELDB = 0
|
#HAVE_LEVELDB = 0
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -95,7 +98,7 @@ IRRLICHT_URL_SVN = https://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@$(IRR
|
||||||
OPENSSL_VERSION = 1.0.2k
|
OPENSSL_VERSION = 1.0.2k
|
||||||
OPENSSL_BASEDIR = openssl-$(OPENSSL_VERSION)
|
OPENSSL_BASEDIR = openssl-$(OPENSSL_VERSION)
|
||||||
OPENSSL_DIR = $(ANDR_ROOT)/deps/$(OPENSSL_BASEDIR)/
|
OPENSSL_DIR = $(ANDR_ROOT)/deps/$(OPENSSL_BASEDIR)/
|
||||||
OPENSSL_LIB = $(OPENSSL_DIR)/libssl.so.1.0.0
|
OPENSSL_LIB = $(OPENSSL_DIR)/libssl.a
|
||||||
OPENSSL_TIMESTAMP = $(OPENSSL_DIR)timestamp
|
OPENSSL_TIMESTAMP = $(OPENSSL_DIR)timestamp
|
||||||
OPENSSL_TIMESTAMP_INT = $(ANDR_ROOT)/deps/openssl_timestamp
|
OPENSSL_TIMESTAMP_INT = $(ANDR_ROOT)/deps/openssl_timestamp
|
||||||
OPENSSL_URL = https://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz
|
OPENSSL_URL = https://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz
|
||||||
|
@ -173,7 +176,7 @@ delconfig:
|
||||||
|
|
||||||
local.properties:
|
local.properties:
|
||||||
@echo "Please specify path of ANDROID NDK"; \
|
@echo "Please specify path of ANDROID NDK"; \
|
||||||
echo "e.g. $$HOME/Android/ndk-r11c/"; \
|
echo "e.g. $$HOME/Android/Sdk/ndk-bundle/"; \
|
||||||
read ANDROID_NDK ; \
|
read ANDROID_NDK ; \
|
||||||
if [ ! -d $$ANDROID_NDK ] ; then \
|
if [ ! -d $$ANDROID_NDK ] ; then \
|
||||||
echo "$$ANDROID_NDK is not a valid folder"; \
|
echo "$$ANDROID_NDK is not a valid folder"; \
|
||||||
|
@ -181,7 +184,7 @@ local.properties:
|
||||||
fi; \
|
fi; \
|
||||||
echo "ndk.dir = $$ANDROID_NDK" > local.properties; \
|
echo "ndk.dir = $$ANDROID_NDK" > local.properties; \
|
||||||
echo "Please specify path of ANDROID SDK"; \
|
echo "Please specify path of ANDROID SDK"; \
|
||||||
echo "e.g. $$HOME/Android/sdk/"; \
|
echo "e.g. $$HOME/Android/Sdk/"; \
|
||||||
read SDKFLDR ; \
|
read SDKFLDR ; \
|
||||||
if [ ! -d $$SDKFLDR ] ; then \
|
if [ ! -d $$SDKFLDR ] ; then \
|
||||||
echo "$$SDKFLDR is not a valid folder"; \
|
echo "$$SDKFLDR is not a valid folder"; \
|
||||||
|
@ -219,7 +222,10 @@ $(OPENAL_LIB): $(OPENAL_TIMESTAMP)
|
||||||
cd ${OPENAL_DIR}; \
|
cd ${OPENAL_DIR}; \
|
||||||
export APP_PLATFORM=${APP_PLATFORM}; \
|
export APP_PLATFORM=${APP_PLATFORM}; \
|
||||||
export TARGET_ABI=${TARGET_ABI}; \
|
export TARGET_ABI=${TARGET_ABI}; \
|
||||||
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
|
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
|
||||||
|
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
|
export COMPILER_VERSION=${COMPILER_VERSION}; \
|
||||||
|
${ANDROID_NDK}/ndk-build \
|
||||||
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
||||||
touch ${OPENAL_TIMESTAMP}; \
|
touch ${OPENAL_TIMESTAMP}; \
|
||||||
touch ${OPENAL_TIMESTAMP_INT}; \
|
touch ${OPENAL_TIMESTAMP_INT}; \
|
||||||
|
@ -262,7 +268,10 @@ $(OGG_LIB): $(OGG_TIMESTAMP)
|
||||||
cd ${OGG_DIR}; \
|
cd ${OGG_DIR}; \
|
||||||
export APP_PLATFORM=${APP_PLATFORM}; \
|
export APP_PLATFORM=${APP_PLATFORM}; \
|
||||||
export TARGET_ABI=${TARGET_ABI}; \
|
export TARGET_ABI=${TARGET_ABI}; \
|
||||||
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
|
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
|
||||||
|
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
|
export COMPILER_VERSION=${COMPILER_VERSION}; \
|
||||||
|
${ANDROID_NDK}/ndk-build \
|
||||||
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
||||||
touch ${OGG_TIMESTAMP}; \
|
touch ${OGG_TIMESTAMP}; \
|
||||||
touch ${OGG_TIMESTAMP_INT}; \
|
touch ${OGG_TIMESTAMP_INT}; \
|
||||||
|
@ -288,6 +297,7 @@ openssl_download :
|
||||||
tar -xzf ${OPENSSL_BASEDIR}.tar.gz; \
|
tar -xzf ${OPENSSL_BASEDIR}.tar.gz; \
|
||||||
cd ${OPENSSL_BASEDIR}; \
|
cd ${OPENSSL_BASEDIR}; \
|
||||||
patch -p1 < ${ANDR_ROOT}/patches/openssl_arch.patch; \
|
patch -p1 < ${ANDR_ROOT}/patches/openssl_arch.patch; \
|
||||||
|
sed -i 's/-mandroid //g' Configure; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
openssl : $(OPENSSL_LIB)
|
openssl : $(OPENSSL_LIB)
|
||||||
|
@ -309,11 +319,15 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB)
|
||||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
||||||
--platform=${APP_PLATFORM} \
|
--platform=${APP_PLATFORM} \
|
||||||
|
--stl=libc++ \
|
||||||
--install-dir=$${TOOLCHAIN}; \
|
--install-dir=$${TOOLCHAIN}; \
|
||||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||||
CC=${CROSS_PREFIX}gcc ./Configure enable-gmp -DL_ENDIAN -I${GMP_DIR} -L${GMP_DIR}/usr/lib android-${TARGET_ARCH};\
|
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
||||||
CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make depend; \
|
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
|
||||||
CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make build_libs; \
|
CC=${CROSS_CC} ./Configure enable-gmp no-asm -DL_ENDIAN -I${GMP_DIR} \
|
||||||
|
-L${GMP_DIR}/usr/lib android-${TARGET_ARCH} -D__ANDROID_API__=$(API); \
|
||||||
|
CC=${CROSS_CC} ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make depend; \
|
||||||
|
CC=${CROSS_CC} ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make build_libs; \
|
||||||
touch ${OPENSSL_TIMESTAMP}; \
|
touch ${OPENSSL_TIMESTAMP}; \
|
||||||
touch ${OPENSSL_TIMESTAMP_INT}; \
|
touch ${OPENSSL_TIMESTAMP_INT}; \
|
||||||
$(RM) -rf $${TOOLCHAIN}; \
|
$(RM) -rf $${TOOLCHAIN}; \
|
||||||
|
@ -355,17 +369,18 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
|
||||||
if [ $$REFRESH -ne 0 ] ; then \
|
if [ $$REFRESH -ne 0 ] ; then \
|
||||||
echo "changed timestamp for leveldb detected building..."; \
|
echo "changed timestamp for leveldb detected building..."; \
|
||||||
cd deps/leveldb; \
|
cd deps/leveldb; \
|
||||||
export CROSS_PREFIX=${CROSS_PREFIX}; \
|
export CROSS_PREFIX=${TARGET_TOOLCHAIN}; \
|
||||||
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-leveldb; \
|
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-leveldb; \
|
||||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
||||||
--platform=${APP_PLATFORM} \
|
--platform=${APP_PLATFORM} \
|
||||||
|
--stl=libc++ \
|
||||||
--install-dir=$${TOOLCHAIN}; \
|
--install-dir=$${TOOLCHAIN}; \
|
||||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||||
export CC=${CROSS_PREFIX}gcc; \
|
export CC=${CROSS_CC}; \
|
||||||
export CXX=${CROSS_PREFIX}g++; \
|
export CXX=${CROSS_CXX}; \
|
||||||
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
||||||
export CPPFLAGS="$${CPPFLAGS} ${TARGET_CXXFLAGS_ADDON}"; \
|
export CPPFLAGS="$${CPPFLAGS} ${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
|
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
|
||||||
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
||||||
$(MAKE) || exit 1; \
|
$(MAKE) || exit 1; \
|
||||||
|
@ -413,7 +428,10 @@ $(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP)
|
||||||
cd ${FREETYPE_DIR}/Android/jni; \
|
cd ${FREETYPE_DIR}/Android/jni; \
|
||||||
export APP_PLATFORM=${APP_PLATFORM}; \
|
export APP_PLATFORM=${APP_PLATFORM}; \
|
||||||
export TARGET_ABI=${TARGET_ABI}; \
|
export TARGET_ABI=${TARGET_ABI}; \
|
||||||
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
|
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
|
||||||
|
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
|
export COMPILER_VERSION=${COMPILER_VERSION}; \
|
||||||
|
${ANDROID_NDK}/ndk-build \
|
||||||
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
||||||
touch ${FREETYPE_TIMESTAMP}; \
|
touch ${FREETYPE_TIMESTAMP}; \
|
||||||
touch ${FREETYPE_TIMESTAMP_INT}; \
|
touch ${FREETYPE_TIMESTAMP_INT}; \
|
||||||
|
@ -461,16 +479,17 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP)
|
||||||
mkdir -p ${ICONV_DIR}; \
|
mkdir -p ${ICONV_DIR}; \
|
||||||
echo "changed timestamp for iconv detected building..."; \
|
echo "changed timestamp for iconv detected building..."; \
|
||||||
cd ${ICONV_DIR}; \
|
cd ${ICONV_DIR}; \
|
||||||
\
|
|
||||||
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-iconv; \
|
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-iconv; \
|
||||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
||||||
--platform=${APP_PLATFORM} \
|
--platform=${APP_PLATFORM} \
|
||||||
|
--stl=libc++ \
|
||||||
--install-dir=$${TOOLCHAIN}; \
|
--install-dir=$${TOOLCHAIN}; \
|
||||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||||
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
||||||
export CC=${CROSS_PREFIX}gcc; \
|
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON} -lstdc++"; \
|
||||||
export CXX=${CROSS_PREFIX}g++; \
|
export CC=${CROSS_CC}; \
|
||||||
|
export CXX=${CROSS_CXX}; \
|
||||||
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
||||||
./configure --host=${TARGET_HOST} || exit 1; \
|
./configure --host=${TARGET_HOST} || exit 1; \
|
||||||
sed -i 's/LIBICONV_VERSION_INFO) /LIBICONV_VERSION_INFO) -avoid-version /g' lib/Makefile; \
|
sed -i 's/LIBICONV_VERSION_INFO) /LIBICONV_VERSION_INFO) -avoid-version /g' lib/Makefile; \
|
||||||
|
@ -529,8 +548,11 @@ $(IRRLICHT_LIB): $(IRRLICHT_TIMESTAMP) $(FREETYPE_LIB)
|
||||||
cd deps/irrlicht/source/Irrlicht/Android; \
|
cd deps/irrlicht/source/Irrlicht/Android; \
|
||||||
export APP_PLATFORM=${APP_PLATFORM}; \
|
export APP_PLATFORM=${APP_PLATFORM}; \
|
||||||
export TARGET_ABI=${TARGET_ABI}; \
|
export TARGET_ABI=${TARGET_ABI}; \
|
||||||
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
|
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
|
||||||
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Irrlicht.mk || exit 1; \
|
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
|
export COMPILER_VERSION=${COMPILER_VERSION}; \
|
||||||
|
${ANDROID_NDK}/ndk-build \
|
||||||
|
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
|
||||||
touch ${IRRLICHT_TIMESTAMP}; \
|
touch ${IRRLICHT_TIMESTAMP}; \
|
||||||
touch ${IRRLICHT_TIMESTAMP_INT}; \
|
touch ${IRRLICHT_TIMESTAMP_INT}; \
|
||||||
else \
|
else \
|
||||||
|
@ -574,15 +596,16 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
|
||||||
mkdir -p ${CURL_DIR}; \
|
mkdir -p ${CURL_DIR}; \
|
||||||
echo "changed timestamp for curl detected building..."; \
|
echo "changed timestamp for curl detected building..."; \
|
||||||
cd deps/curl-${CURL_VERSION}; \
|
cd deps/curl-${CURL_VERSION}; \
|
||||||
export CROSS_PREFIX=${CROSS_PREFIX}; \
|
export CROSS_PREFIX=${TARGET_TOOLCHAIN}; \
|
||||||
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-curl; \
|
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-curl; \
|
||||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
||||||
--platform=${APP_PLATFORM} \
|
--platform=${APP_PLATFORM} \
|
||||||
|
--stl=libc++ \
|
||||||
--install-dir=$${TOOLCHAIN}; \
|
--install-dir=$${TOOLCHAIN}; \
|
||||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||||
export CC=${CROSS_PREFIX}gcc; \
|
export CC=${CROSS_CC}; \
|
||||||
export CXX=${CROSS_PREFIX}g++; \
|
export CXX=${CROSS_CXX}; \
|
||||||
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
||||||
export CPPFLAGS="$${CPPFLAGS} -I${OPENSSL_DIR}/include ${TARGET_CFLAGS_ADDON}"; \
|
export CPPFLAGS="$${CPPFLAGS} -I${OPENSSL_DIR}/include ${TARGET_CFLAGS_ADDON}"; \
|
||||||
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
||||||
|
@ -634,15 +657,17 @@ $(GMP_LIB): $(GMP_TIMESTAMP)
|
||||||
mkdir -p ${GMP_DIR}; \
|
mkdir -p ${GMP_DIR}; \
|
||||||
echo "changed timestamp for gmp detected building..."; \
|
echo "changed timestamp for gmp detected building..."; \
|
||||||
cd deps/gmp-${GMP_VERSION}; \
|
cd deps/gmp-${GMP_VERSION}; \
|
||||||
export CROSS_PREFIX=${CROSS_PREFIX}; \
|
export CROSS_PREFIX=${TARGET_TOOLCHAIN}; \
|
||||||
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-gmp; \
|
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-gmp; \
|
||||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||||
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
|
||||||
--platform=${APP_PLATFORM} \
|
--platform=${APP_PLATFORM} \
|
||||||
|
--stl=libc++ \
|
||||||
--install-dir=$${TOOLCHAIN}; \
|
--install-dir=$${TOOLCHAIN}; \
|
||||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||||
export CC=${CROSS_PREFIX}gcc; \
|
export CC=${CROSS_CC}; \
|
||||||
export CXX=${CROSS_PREFIX}g++; \
|
export CXX=${CROSS_CXX}; \
|
||||||
|
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
|
||||||
export LIBGMP_LDFLAGS="-avoid-version"; \
|
export LIBGMP_LDFLAGS="-avoid-version"; \
|
||||||
export LIBGMPXX_LDFLAGS="-avoid-version"; \
|
export LIBGMPXX_LDFLAGS="-avoid-version"; \
|
||||||
./configure --disable-static --host=${TARGET_HOST} --prefix=/usr; \
|
./configure --disable-static --host=${TARGET_HOST} --prefix=/usr; \
|
||||||
|
@ -713,7 +738,7 @@ assets : $(ASSETS_TIMESTAMP)
|
||||||
$(MAKE) clean_assets; \
|
$(MAKE) clean_assets; \
|
||||||
mkdir -p ${APP_ROOT}/assets/Minetest; \
|
mkdir -p ${APP_ROOT}/assets/Minetest; \
|
||||||
cp ${PROJ_ROOT}/minetest.conf.example ${APP_ROOT}/assets/Minetest; \
|
cp ${PROJ_ROOT}/minetest.conf.example ${APP_ROOT}/assets/Minetest; \
|
||||||
cp ${PROJ_ROOT}/README.txt ${APP_ROOT}/assets/Minetest; \
|
cp ${PROJ_ROOT}/README.md ${APP_ROOT}/assets/Minetest; \
|
||||||
cp -r ${PROJ_ROOT}/builtin ${APP_ROOT}/assets/Minetest; \
|
cp -r ${PROJ_ROOT}/builtin ${APP_ROOT}/assets/Minetest; \
|
||||||
mkdir -p ${APP_ROOT}/assets/Minetest/client; \
|
mkdir -p ${APP_ROOT}/assets/Minetest/client; \
|
||||||
cp -r ${PROJ_ROOT}/client/shaders ${APP_ROOT}/assets/Minetest/client; \
|
cp -r ${PROJ_ROOT}/client/shaders ${APP_ROOT}/assets/Minetest/client; \
|
||||||
|
@ -756,6 +781,10 @@ apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(GMP_LIB)
|
||||||
export HAVE_LEVELDB=${HAVE_LEVELDB}; \
|
export HAVE_LEVELDB=${HAVE_LEVELDB}; \
|
||||||
export APP_PLATFORM=${APP_PLATFORM}; \
|
export APP_PLATFORM=${APP_PLATFORM}; \
|
||||||
export TARGET_ABI=${TARGET_ABI}; \
|
export TARGET_ABI=${TARGET_ABI}; \
|
||||||
|
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
|
||||||
|
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
|
||||||
|
export COMPILER_VERSION=${COMPILER_VERSION}; \
|
||||||
|
export GPROF=${GPROF}; \
|
||||||
${ANDROID_NDK}/ndk-build || exit 1; \
|
${ANDROID_NDK}/ndk-build || exit 1; \
|
||||||
if [ ! -e ${APP_ROOT}/jniLibs ]; then \
|
if [ ! -e ${APP_ROOT}/jniLibs ]; then \
|
||||||
ln -s ${ANDR_ROOT}/libs ${APP_ROOT}/jniLibs || exit 1; \
|
ln -s ${ANDR_ROOT}/libs ${APP_ROOT}/jniLibs || exit 1; \
|
||||||
|
|
|
@ -80,7 +80,7 @@ LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ \
|
||||||
ifndef NDEBUG
|
ifndef NDEBUG
|
||||||
LOCAL_CFLAGS += -g -D_DEBUG -O0 -fno-omit-frame-pointer
|
LOCAL_CFLAGS += -g -D_DEBUG -O0 -fno-omit-frame-pointer
|
||||||
else
|
else
|
||||||
LOCAL_CFLAGS += -O3
|
LOCAL_CFLAGS += $(TARGET_CFLAGS_ADDON)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef GPROF
|
ifdef GPROF
|
||||||
|
@ -91,7 +91,7 @@ endif
|
||||||
# LOCAL_CFLAGS += -fsanitize=address
|
# LOCAL_CFLAGS += -fsanitize=address
|
||||||
# LOCAL_LDFLAGS += -fsanitize=address
|
# LOCAL_LDFLAGS += -fsanitize=address
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
ifeq ($(TARGET_ABI),x86)
|
||||||
LOCAL_CFLAGS += -fno-stack-protector
|
LOCAL_CFLAGS += -fno-stack-protector
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -134,6 +134,7 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/craftdef.cpp \
|
jni/src/craftdef.cpp \
|
||||||
jni/src/database/database-dummy.cpp \
|
jni/src/database/database-dummy.cpp \
|
||||||
jni/src/database/database-files.cpp \
|
jni/src/database/database-files.cpp \
|
||||||
|
jni/src/database/database-leveldb.cpp \
|
||||||
jni/src/database/database-sqlite3.cpp \
|
jni/src/database/database-sqlite3.cpp \
|
||||||
jni/src/database/database.cpp \
|
jni/src/database/database.cpp \
|
||||||
jni/src/debug.cpp \
|
jni/src/debug.cpp \
|
||||||
|
@ -149,6 +150,7 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/genericobject.cpp \
|
jni/src/genericobject.cpp \
|
||||||
jni/src/gettext.cpp \
|
jni/src/gettext.cpp \
|
||||||
jni/src/gui/guiChatConsole.cpp \
|
jni/src/gui/guiChatConsole.cpp \
|
||||||
|
jni/src/gui/guiConfirmRegistration.cpp \
|
||||||
jni/src/gui/guiEditBoxWithScrollbar.cpp \
|
jni/src/gui/guiEditBoxWithScrollbar.cpp \
|
||||||
jni/src/gui/guiEngine.cpp \
|
jni/src/gui/guiEngine.cpp \
|
||||||
jni/src/gui/guiPathSelectMenu.cpp \
|
jni/src/gui/guiPathSelectMenu.cpp \
|
||||||
|
@ -159,6 +161,7 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/guiscalingfilter.cpp \
|
jni/src/guiscalingfilter.cpp \
|
||||||
jni/src/gui/guiVolumeChange.cpp \
|
jni/src/gui/guiVolumeChange.cpp \
|
||||||
jni/src/gui/profilergraph.cpp \
|
jni/src/gui/profilergraph.cpp \
|
||||||
|
jni/src/gui/touchscreengui.cpp \
|
||||||
jni/src/httpfetch.cpp \
|
jni/src/httpfetch.cpp \
|
||||||
jni/src/hud.cpp \
|
jni/src/hud.cpp \
|
||||||
jni/src/imagefilters.cpp \
|
jni/src/imagefilters.cpp \
|
||||||
|
@ -196,6 +199,7 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/mapgen/mg_schematic.cpp \
|
jni/src/mapgen/mg_schematic.cpp \
|
||||||
jni/src/minimap.cpp \
|
jni/src/minimap.cpp \
|
||||||
jni/src/mods.cpp \
|
jni/src/mods.cpp \
|
||||||
|
jni/src/modchannels.cpp \
|
||||||
jni/src/nameidmapping.cpp \
|
jni/src/nameidmapping.cpp \
|
||||||
jni/src/nodedef.cpp \
|
jni/src/nodedef.cpp \
|
||||||
jni/src/nodemetadata.cpp \
|
jni/src/nodemetadata.cpp \
|
||||||
|
@ -222,12 +226,12 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/serverobject.cpp \
|
jni/src/serverobject.cpp \
|
||||||
jni/src/shader.cpp \
|
jni/src/shader.cpp \
|
||||||
jni/src/sky.cpp \
|
jni/src/sky.cpp \
|
||||||
jni/src/socket.cpp \
|
|
||||||
jni/src/sound.cpp \
|
jni/src/sound.cpp \
|
||||||
jni/src/sound_openal.cpp \
|
jni/src/sound_openal.cpp \
|
||||||
jni/src/staticobject.cpp \
|
jni/src/staticobject.cpp \
|
||||||
jni/src/subgame.cpp \
|
jni/src/subgame.cpp \
|
||||||
jni/src/tileanimation.cpp \
|
jni/src/tileanimation.cpp \
|
||||||
|
jni/src/translation.cpp \
|
||||||
jni/src/tool.cpp \
|
jni/src/tool.cpp \
|
||||||
jni/src/mapgen/treegen.cpp \
|
jni/src/mapgen/treegen.cpp \
|
||||||
jni/src/version.cpp \
|
jni/src/version.cpp \
|
||||||
|
@ -250,6 +254,7 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/unittest/test_compression.cpp \
|
jni/src/unittest/test_compression.cpp \
|
||||||
jni/src/unittest/test_connection.cpp \
|
jni/src/unittest/test_connection.cpp \
|
||||||
jni/src/unittest/test_filepath.cpp \
|
jni/src/unittest/test_filepath.cpp \
|
||||||
|
jni/src/unittest/test_gameui.cpp \
|
||||||
jni/src/unittest/test_inventory.cpp \
|
jni/src/unittest/test_inventory.cpp \
|
||||||
jni/src/unittest/test_map_settings_manager.cpp \
|
jni/src/unittest/test_map_settings_manager.cpp \
|
||||||
jni/src/unittest/test_mapnode.cpp \
|
jni/src/unittest/test_mapnode.cpp \
|
||||||
|
@ -266,28 +271,39 @@ LOCAL_SRC_FILES := \
|
||||||
jni/src/unittest/test_utilities.cpp \
|
jni/src/unittest/test_utilities.cpp \
|
||||||
jni/src/unittest/test_voxelalgorithms.cpp \
|
jni/src/unittest/test_voxelalgorithms.cpp \
|
||||||
jni/src/unittest/test_voxelmanipulator.cpp \
|
jni/src/unittest/test_voxelmanipulator.cpp \
|
||||||
jni/src/touchscreengui.cpp \
|
|
||||||
jni/src/database-leveldb.cpp \
|
|
||||||
jni/src/settings.cpp \
|
jni/src/settings.cpp \
|
||||||
jni/src/wieldmesh.cpp \
|
jni/src/wieldmesh.cpp \
|
||||||
jni/src/client/clientlauncher.cpp \
|
jni/src/client/clientlauncher.cpp \
|
||||||
|
jni/src/client/gameui.cpp \
|
||||||
jni/src/client/hud.cpp \
|
jni/src/client/hud.cpp \
|
||||||
jni/src/client/inputhandler.cpp \
|
jni/src/client/inputhandler.cpp \
|
||||||
jni/src/client/renderingengine.cpp \
|
jni/src/client/renderingengine.cpp \
|
||||||
jni/src/client/tile.cpp \
|
jni/src/client/tile.cpp \
|
||||||
jni/src/client/joystick_controller.cpp \
|
jni/src/client/joystick_controller.cpp \
|
||||||
jni/src/irrlicht_changes/static_text.cpp
|
jni/src/client/render/factory.cpp \
|
||||||
|
jni/src/client/render/pageflip.cpp \
|
||||||
|
jni/src/client/render/sidebyside.cpp \
|
||||||
|
jni/src/client/render/plain.cpp \
|
||||||
|
jni/src/client/render/anaglyph.cpp \
|
||||||
|
jni/src/client/render/interlaced.cpp \
|
||||||
|
jni/src/client/render/core.cpp \
|
||||||
|
jni/src/client/render/stereo.cpp \
|
||||||
|
jni/src/irrlicht_changes/static_text.cpp \
|
||||||
|
jni/src/irrlicht_changes/CGUITTFont.cpp
|
||||||
|
|
||||||
# intentionally kept out (we already build openssl itself): jni/src/util/sha256.c
|
# intentionally kept out (we already build openssl itself): jni/src/util/sha256.c
|
||||||
|
|
||||||
# Network
|
# Network
|
||||||
LOCAL_SRC_FILES += \
|
LOCAL_SRC_FILES += \
|
||||||
|
jni/src/network/address.cpp \
|
||||||
jni/src/network/connection.cpp \
|
jni/src/network/connection.cpp \
|
||||||
jni/src/network/networkpacket.cpp \
|
jni/src/network/networkpacket.cpp \
|
||||||
jni/src/network/clientopcodes.cpp \
|
jni/src/network/clientopcodes.cpp \
|
||||||
jni/src/network/clientpackethandler.cpp \
|
jni/src/network/clientpackethandler.cpp \
|
||||||
|
jni/src/network/connectionthreads.cpp \
|
||||||
jni/src/network/serveropcodes.cpp \
|
jni/src/network/serveropcodes.cpp \
|
||||||
jni/src/network/serverpackethandler.cpp \
|
jni/src/network/serverpackethandler.cpp \
|
||||||
|
jni/src/network/socket.cpp \
|
||||||
|
|
||||||
# lua api
|
# lua api
|
||||||
LOCAL_SRC_FILES += \
|
LOCAL_SRC_FILES += \
|
||||||
|
@ -303,6 +319,7 @@ LOCAL_SRC_FILES += \
|
||||||
jni/src/script/cpp_api/s_inventory.cpp \
|
jni/src/script/cpp_api/s_inventory.cpp \
|
||||||
jni/src/script/cpp_api/s_item.cpp \
|
jni/src/script/cpp_api/s_item.cpp \
|
||||||
jni/src/script/cpp_api/s_mainmenu.cpp \
|
jni/src/script/cpp_api/s_mainmenu.cpp \
|
||||||
|
jni/src/script/cpp_api/s_modchannels.cpp \
|
||||||
jni/src/script/cpp_api/s_node.cpp \
|
jni/src/script/cpp_api/s_node.cpp \
|
||||||
jni/src/script/cpp_api/s_nodemeta.cpp \
|
jni/src/script/cpp_api/s_nodemeta.cpp \
|
||||||
jni/src/script/cpp_api/s_player.cpp \
|
jni/src/script/cpp_api/s_player.cpp \
|
||||||
|
@ -322,6 +339,7 @@ LOCAL_SRC_FILES += \
|
||||||
jni/src/script/lua_api/l_mapgen.cpp \
|
jni/src/script/lua_api/l_mapgen.cpp \
|
||||||
jni/src/script/lua_api/l_metadata.cpp \
|
jni/src/script/lua_api/l_metadata.cpp \
|
||||||
jni/src/script/lua_api/l_minimap.cpp \
|
jni/src/script/lua_api/l_minimap.cpp \
|
||||||
|
jni/src/script/lua_api/l_modchannels.cpp \
|
||||||
jni/src/script/lua_api/l_nodemeta.cpp \
|
jni/src/script/lua_api/l_nodemeta.cpp \
|
||||||
jni/src/script/lua_api/l_nodetimer.cpp \
|
jni/src/script/lua_api/l_nodetimer.cpp \
|
||||||
jni/src/script/lua_api/l_noise.cpp \
|
jni/src/script/lua_api/l_noise.cpp \
|
||||||
|
@ -341,7 +359,7 @@ LOCAL_SRC_FILES += \
|
||||||
jni/src/script/scripting_mainmenu.cpp
|
jni/src/script/scripting_mainmenu.cpp
|
||||||
|
|
||||||
#freetype2 support
|
#freetype2 support
|
||||||
LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp
|
#LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp
|
||||||
|
|
||||||
# Lua
|
# Lua
|
||||||
LOCAL_SRC_FILES += \
|
LOCAL_SRC_FILES += \
|
||||||
|
@ -382,7 +400,6 @@ LOCAL_SRC_FILES += deps/sqlite/sqlite3.c
|
||||||
# Threading
|
# Threading
|
||||||
LOCAL_SRC_FILES += \
|
LOCAL_SRC_FILES += \
|
||||||
jni/src/threading/event.cpp \
|
jni/src/threading/event.cpp \
|
||||||
jni/src/threading/mutex.cpp \
|
|
||||||
jni/src/threading/semaphore.cpp \
|
jni/src/threading/semaphore.cpp \
|
||||||
jni/src/threading/thread.cpp
|
jni/src/threading/thread.cpp
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
APP_PLATFORM := ${APP_PLATFORM}
|
APP_PLATFORM := ${APP_PLATFORM}
|
||||||
APP_ABI := ${TARGET_ABI}
|
APP_ABI := ${TARGET_ABI}
|
||||||
APP_STL := gnustl_static
|
APP_STL := c++_shared
|
||||||
NDK_TOOLCHAIN_VERSION := 4.9
|
NDK_TOOLCHAIN_VERSION := ${COMPILER_VERSION}
|
||||||
APP_DEPRECATED_HEADERS := true
|
APP_DEPRECATED_HEADERS := true
|
||||||
APP_MODULES := minetest
|
APP_MODULES := minetest
|
||||||
|
ifndef NDEBUG
|
||||||
|
APP_OPTIM := debug
|
||||||
|
endif
|
||||||
|
|
||||||
APP_CPPFLAGS += -fexceptions
|
APP_CPPFLAGS += -fexceptions -std=c++11 -frtti
|
||||||
APP_GNUSTL_FORCE_CPP_FEATURES := rtti
|
|
||||||
|
|
|
@ -4,5 +4,5 @@ APP_STL := c++_shared
|
||||||
NDK_TOOLCHAIN_VERSION := ${COMPILER_VERSION}
|
NDK_TOOLCHAIN_VERSION := ${COMPILER_VERSION}
|
||||||
APP_DEPRECATED_HEADERS := true
|
APP_DEPRECATED_HEADERS := true
|
||||||
|
|
||||||
APP_CLAFGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3
|
APP_CLAFGS += ${TARGET_CFLAGS_ADDON}
|
||||||
APP_CPPFLAGS += -fexceptions
|
APP_CPPFLAGS += ${TARGET_CXXFLAGS_ADDON} -fexceptions -std=c++11
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
APP_PLATFORM := ${APP_PLATFORM}
|
APP_PLATFORM := ${APP_PLATFORM}
|
||||||
APP_ABI := ${TARGET_ABI}
|
APP_ABI := ${TARGET_ABI}
|
||||||
APP_STL := gnustl_static
|
APP_STL := c++_shared
|
||||||
NDK_TOOLCHAIN_VERSION := 4.9
|
NDK_TOOLCHAIN_VERSION := ${COMPILER_VERSION}
|
||||||
APP_DEPRECATED_HEADERS := true
|
APP_DEPRECATED_HEADERS := true
|
||||||
APP_MODULES := Irrlicht
|
APP_MODULES := Irrlicht
|
||||||
|
|
||||||
APP_CLAFGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3
|
APP_CLAFGS += ${TARGET_CFLAGS_ADDON}
|
||||||
APP_CPPFLAGS += -fexceptions
|
APP_CPPFLAGS += ${TARGET_CXXFLAGS_ADDON} -fexceptions
|
||||||
|
|
|
@ -84,8 +84,6 @@ public class MtNativeActivity extends NativeActivity {
|
||||||
System.loadLibrary("openal");
|
System.loadLibrary("openal");
|
||||||
System.loadLibrary("ogg");
|
System.loadLibrary("ogg");
|
||||||
System.loadLibrary("vorbis");
|
System.loadLibrary("vorbis");
|
||||||
System.loadLibrary("ssl");
|
|
||||||
System.loadLibrary("crypto");
|
|
||||||
System.loadLibrary("gmp");
|
System.loadLibrary("gmp");
|
||||||
System.loadLibrary("iconv");
|
System.loadLibrary("iconv");
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
||||||
video::ETCF_CREATE_MIP_MAPS, g_settings->getBool("mip_map"));
|
video::ETCF_CREATE_MIP_MAPS, g_settings->getBool("mip_map"));
|
||||||
|
|
||||||
#ifdef HAVE_TOUCHSCREENGUI
|
#ifdef HAVE_TOUCHSCREENGUI
|
||||||
receiver->m_touchscreengui = new TouchScreenGUI(device, receiver);
|
receiver->m_touchscreengui = new TouchScreenGUI(RenderingEngine::get_raw_device(), receiver);
|
||||||
g_touchscreengui = receiver->m_touchscreengui;
|
g_touchscreengui = receiver->m_touchscreengui;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
#include "filesys.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
RenderingEngine *RenderingEngine::s_singleton = nullptr;
|
RenderingEngine *RenderingEngine::s_singleton = nullptr;
|
||||||
|
|
||||||
RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
||||||
|
@ -567,4 +571,15 @@ v2u32 RenderingEngine::getDisplaySize()
|
||||||
|
|
||||||
return deskres;
|
return deskres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // __ANDROID__
|
||||||
|
float RenderingEngine::getDisplayDensity()
|
||||||
|
{
|
||||||
|
return porting::getDisplayDensity();
|
||||||
|
}
|
||||||
|
|
||||||
|
v2u32 RenderingEngine::getDisplaySize()
|
||||||
|
{
|
||||||
|
return porting::getDisplaySize();
|
||||||
|
}
|
||||||
#endif // __ANDROID__
|
#endif // __ANDROID__
|
||||||
|
|
|
@ -794,7 +794,7 @@ video::ITexture* TextureSource::generateTextureFromMesh(
|
||||||
g_settings->getBool("inventory_image_hack")
|
g_settings->getBool("inventory_image_hack")
|
||||||
) {
|
) {
|
||||||
// Get a scene manager
|
// Get a scene manager
|
||||||
scene::ISceneManager *smgr_main = m_device->getSceneManager();
|
scene::ISceneManager *smgr_main = RenderingEngine::get_raw_device()->getSceneManager();
|
||||||
sanity_check(smgr_main);
|
sanity_check(smgr_main);
|
||||||
scene::ISceneManager *smgr = smgr_main->createNewSceneManager();
|
scene::ISceneManager *smgr = smgr_main->createNewSceneManager();
|
||||||
sanity_check(smgr);
|
sanity_check(smgr);
|
||||||
|
|
|
@ -28,6 +28,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "util/numeric.h"
|
#include "util/numeric.h"
|
||||||
|
|
||||||
|
#if __ANDROID__
|
||||||
|
#include <IVideoDriver.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class IGameDef;
|
class IGameDef;
|
||||||
struct TileSpec;
|
struct TileSpec;
|
||||||
struct TileDef;
|
struct TileDef;
|
||||||
|
@ -153,7 +157,7 @@ public:
|
||||||
IWritableTextureSource *createTextureSource();
|
IWritableTextureSource *createTextureSource();
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
video::IImage * Align2Npot2(video::IImage * image, video::IVideoDriver* driver);
|
video::IImage * Align2Npot2(video::IImage * image, irr::video::IVideoDriver* driver);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum MaterialType{
|
enum MaterialType{
|
||||||
|
|
|
@ -2092,10 +2092,11 @@ void Game::toggleFreeMoveAlt()
|
||||||
void Game::toggleFast()
|
void Game::toggleFast()
|
||||||
{
|
{
|
||||||
bool fast_move = !g_settings->getBool("fast_move");
|
bool fast_move = !g_settings->getBool("fast_move");
|
||||||
|
bool has_fast_privs = client->checkPrivilege("fast");
|
||||||
g_settings->set("fast_move", bool_to_cstr(fast_move));
|
g_settings->set("fast_move", bool_to_cstr(fast_move));
|
||||||
|
|
||||||
if (fast_move) {
|
if (fast_move) {
|
||||||
if (client->checkPrivilege("fast")) {
|
if (has_fast_privs) {
|
||||||
m_game_ui->showTranslatedStatusText("Fast mode enabled");
|
m_game_ui->showTranslatedStatusText("Fast mode enabled");
|
||||||
} else {
|
} else {
|
||||||
m_game_ui->showTranslatedStatusText("Fast mode enabled (note: no 'fast' privilege)");
|
m_game_ui->showTranslatedStatusText("Fast mode enabled (note: no 'fast' privilege)");
|
||||||
|
|
|
@ -1522,3 +1522,10 @@ void GUIEditBoxWithScrollBar::deserializeAttributes(io::IAttributes* in, io::SAt
|
||||||
// setOverrideFont(in->getAttributeAsFont("OverrideFont"));
|
// setOverrideFont(in->getAttributeAsFont("OverrideFont"));
|
||||||
setWritable(in->getAttributeAsBool("Writable"));
|
setWritable(in->getAttributeAsBool("Writable"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GUIEditBoxWithScrollBar::isDrawBackgroundEnabled() const { return false; }
|
||||||
|
bool GUIEditBoxWithScrollBar::isDrawBorderEnabled() const { return false; }
|
||||||
|
void GUIEditBoxWithScrollBar::setCursorChar(const wchar_t cursorChar) { }
|
||||||
|
wchar_t GUIEditBoxWithScrollBar::getCursorChar() const { return '|'; }
|
||||||
|
void GUIEditBoxWithScrollBar::setCursorBlinkTime(irr::u32 timeMs) { }
|
||||||
|
irr::u32 GUIEditBoxWithScrollBar::getCursorBlinkTime() const { return 500; }
|
||||||
|
|
|
@ -128,6 +128,13 @@ public:
|
||||||
//! Reads attributes of the element
|
//! Reads attributes of the element
|
||||||
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
|
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
|
||||||
|
|
||||||
|
virtual bool isDrawBackgroundEnabled() const;
|
||||||
|
virtual bool isDrawBorderEnabled() const;
|
||||||
|
virtual void setCursorChar(const wchar_t cursorChar);
|
||||||
|
virtual wchar_t getCursorChar() const;
|
||||||
|
virtual void setCursorBlinkTime(irr::u32 timeMs);
|
||||||
|
virtual irr::u32 getCursorBlinkTime() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Breaks the single text line.
|
//! Breaks the single text line.
|
||||||
void breakText();
|
void breakText();
|
||||||
|
|
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <IEventReceiver.h>
|
#include <IEventReceiver.h>
|
||||||
#include <IGUIButton.h>
|
#include <IGUIButton.h>
|
||||||
#include <IGUIEnvironment.h>
|
#include <IGUIEnvironment.h>
|
||||||
|
#include <IrrlichtDevice.h>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -76,4 +76,9 @@ int getInputDialogState();
|
||||||
*/
|
*/
|
||||||
std::string getInputDialogValue();
|
std::string getInputDialogValue();
|
||||||
|
|
||||||
|
#ifndef SERVER
|
||||||
|
float getDisplayDensity();
|
||||||
|
v2u32 getDisplaySize();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue