From e3cbe521fc72191da5a3e8ead499cf19e02aca7b Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 24 Dec 2016 07:34:19 +0000 Subject: Update Android build tools to latest version (#4872) --- build/android/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'build') diff --git a/build/android/build.gradle b/build/android/build.gradle index 20c13e385..745952a22 100644 --- a/build/android/build.gradle +++ b/build/android/build.gradle @@ -10,8 +10,8 @@ buildscript { apply plugin: "com.android.application" android { - compileSdkVersion 23 - buildToolsVersion "23.0.3" + compileSdkVersion 25 + buildToolsVersion "25.0.1" defaultConfig { versionCode 16 @@ -46,4 +46,3 @@ android { } } } - -- cgit v1.2.3 From b95f543da9d56974c4db8e34ce93e6f3bf7e776c Mon Sep 17 00:00:00 2001 From: Ner'zhul Date: Sat, 24 Dec 2016 12:30:18 +0100 Subject: Add gradle wrapper (#4954) Gradle wrapper permit to use multiple gradle versions across OS versions --- build/android/Makefile | 4 +- build/android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 49896 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + build/android/gradlew | 164 +++++++++++++++++++++ build/android/gradlew.bat | 90 +++++++++++ 5 files changed, 262 insertions(+), 2 deletions(-) create mode 100644 build/android/gradle/wrapper/gradle-wrapper.jar create mode 100644 build/android/gradle/wrapper/gradle-wrapper.properties create mode 100755 build/android/gradlew create mode 100644 build/android/gradlew.bat (limited to 'build') diff --git a/build/android/Makefile b/build/android/Makefile index 6e7a389c9..d261a0e95 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -781,7 +781,7 @@ apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(GMP_LIB) fi; \ export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \ export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \ - gradle assemble$$BUILD_TYPE_C && \ + ./gradlew assemble$$BUILD_TYPE_C && \ echo "APK stored at: build/outputs/apk/Minetest-$$BUILD_TYPE.apk" && \ echo "You can install it with \`make install_$$BUILD_TYPE\`" @@ -799,7 +799,7 @@ prep_srcdir : fi clean_apk : - gradle clean + ./gradlew clean clean_all : @$(MAKE) clean_apk; \ diff --git a/build/android/gradle/wrapper/gradle-wrapper.jar b/build/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..8c0fb64a8 Binary files /dev/null and b/build/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/build/android/gradle/wrapper/gradle-wrapper.properties b/build/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..980438b75 --- /dev/null +++ b/build/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Sat Aug 27 20:10:09 CEST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/build/android/gradlew b/build/android/gradlew new file mode 100755 index 000000000..91a7e269e --- /dev/null +++ b/build/android/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/build/android/gradlew.bat b/build/android/gradlew.bat new file mode 100644 index 000000000..8a0b282aa --- /dev/null +++ b/build/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega -- cgit v1.2.3 From 8f22272df5423cfc6cdf4425787d7f148ee4ca6c Mon Sep 17 00:00:00 2001 From: Wayward1 Date: Wed, 4 Jan 2017 19:44:11 -0500 Subject: Add raycast.cpp and tileanimation.cpp to Android.mk --- build/android/jni/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index c2186efaf..2567457b9 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -203,6 +203,7 @@ LOCAL_SRC_FILES := \ jni/src/porting.cpp \ jni/src/profiler.cpp \ jni/src/quicktune.cpp \ + jni/src/raycast.cpp \ jni/src/reflowscan.cpp \ jni/src/remoteplayer.cpp \ jni/src/rollback.cpp \ @@ -218,6 +219,7 @@ LOCAL_SRC_FILES := \ jni/src/sound_openal.cpp \ jni/src/staticobject.cpp \ jni/src/subgame.cpp \ + jni/src/tileanimation.cpp \ jni/src/tool.cpp \ jni/src/treegen.cpp \ jni/src/version.cpp \ -- cgit v1.2.3 From 8e7449e09253e138716d8dbad6a2ab5c6e089e28 Mon Sep 17 00:00:00 2001 From: Ner'zhul Date: Mon, 9 Jan 2017 20:39:22 +0100 Subject: Environment & IGameDef code refactoring (#4985) * Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused --- build/android/jni/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 2567457b9..3be856770 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -117,6 +117,7 @@ LOCAL_SRC_FILES := \ jni/src/cavegen.cpp \ jni/src/chat.cpp \ jni/src/client.cpp \ + jni/src/clientenvironment.cpp \ jni/src/clientiface.cpp \ jni/src/clientmap.cpp \ jni/src/clientmedia.cpp \ @@ -210,6 +211,7 @@ LOCAL_SRC_FILES := \ jni/src/rollback_interface.cpp \ jni/src/serialization.cpp \ jni/src/server.cpp \ + jni/src/serverenvironment.cpp \ jni/src/serverlist.cpp \ jni/src/serverobject.cpp \ jni/src/shader.cpp \ -- cgit v1.2.3 From bbdd869d72d7b5aae2994d287f69e1c1d866f4e2 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 31 Jan 2017 14:45:28 +0000 Subject: Derive NodeMetadata from Metadata --- build/android/jni/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 3be856770..8f333c3d4 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -184,6 +184,7 @@ LOCAL_SRC_FILES := \ jni/src/mapnode.cpp \ jni/src/mapsector.cpp \ jni/src/mesh.cpp \ + jni/src/metadata.cpp \ jni/src/mg_biome.cpp \ jni/src/mg_decoration.cpp \ jni/src/mg_ore.cpp \ @@ -384,4 +385,3 @@ ifdef GPROF $(call import-module,android-ndk-profiler) endif $(call import-module,android/native_app_glue) - -- cgit v1.2.3 From c2e7b1f57941cb34cb7e3d71dc040fad53a64e3e Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 31 Jan 2017 16:43:45 +0000 Subject: Derive NodeMetaRef from MetaDataRef --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 8f333c3d4..70a3d29c0 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -307,6 +307,7 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_item.cpp \ jni/src/script/lua_api/l_mainmenu.cpp \ jni/src/script/lua_api/l_mapgen.cpp \ + jni/src/script/lua_api/l_metadata.cpp \ jni/src/script/lua_api/l_nodemeta.cpp \ jni/src/script/lua_api/l_nodetimer.cpp \ jni/src/script/lua_api/l_noise.cpp \ -- cgit v1.2.3 From f2aa2c6a986dec47856c49ae5f54fbf3c688e027 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 31 Jan 2017 19:49:01 +0000 Subject: Add ItemStack key-value meta storage --- build/android/jni/Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 70a3d29c0..47f37cfa5 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -164,6 +164,7 @@ LOCAL_SRC_FILES := \ jni/src/inventory.cpp \ jni/src/inventorymanager.cpp \ jni/src/itemdef.cpp \ + jni/src/itemstackmetadata.cpp \ jni/src/keycode.cpp \ jni/src/light.cpp \ jni/src/localplayer.cpp \ @@ -305,6 +306,7 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_env.cpp \ jni/src/script/lua_api/l_inventory.cpp \ jni/src/script/lua_api/l_item.cpp \ + jni/src/script/lua_api/l_itemstackmeta.cpp\ jni/src/script/lua_api/l_mainmenu.cpp \ jni/src/script/lua_api/l_mapgen.cpp \ jni/src/script/lua_api/l_metadata.cpp \ -- cgit v1.2.3 From 607dab2b0dff3ca5bf59263e18f8eaab3c21b946 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 8 Feb 2017 07:47:56 +0100 Subject: Fix android build This fixes #5190 --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 47f37cfa5..accbcca1f 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -319,6 +319,7 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_server.cpp \ jni/src/script/lua_api/l_settings.cpp \ jni/src/script/lua_api/l_http.cpp \ + jni/src/script/lua_api/l_storage.cpp \ jni/src/script/lua_api/l_util.cpp \ jni/src/script/lua_api/l_vmanip.cpp \ jni/src/script/scripting_game.cpp \ -- cgit v1.2.3 From 39fa249f91b7cb9031ed43776b07155755f76cae Mon Sep 17 00:00:00 2001 From: Wayward One Date: Wed, 15 Mar 2017 10:42:47 -0400 Subject: Fix undefined references (#5400) --- build/android/jni/Android.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index accbcca1f..db09634e0 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -290,6 +290,7 @@ LOCAL_SRC_FILES += \ jni/src/script/common/c_types.cpp \ jni/src/script/cpp_api/s_async.cpp \ jni/src/script/cpp_api/s_base.cpp \ + jni/src/script/cpp_api/s_client.cpp \ jni/src/script/cpp_api/s_entity.cpp \ jni/src/script/cpp_api/s_env.cpp \ jni/src/script/cpp_api/s_inventory.cpp \ @@ -302,6 +303,7 @@ LOCAL_SRC_FILES += \ jni/src/script/cpp_api/s_server.cpp \ jni/src/script/lua_api/l_areastore.cpp \ jni/src/script/lua_api/l_base.cpp \ + jni/src/script/lua_api/l_client.cpp \ jni/src/script/lua_api/l_craft.cpp \ jni/src/script/lua_api/l_env.cpp \ jni/src/script/lua_api/l_inventory.cpp \ @@ -318,11 +320,13 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_rollback.cpp \ jni/src/script/lua_api/l_server.cpp \ jni/src/script/lua_api/l_settings.cpp \ + jni/src/script/lua_api/l_sound.cpp \ jni/src/script/lua_api/l_http.cpp \ jni/src/script/lua_api/l_storage.cpp \ jni/src/script/lua_api/l_util.cpp \ jni/src/script/lua_api/l_vmanip.cpp \ - jni/src/script/scripting_game.cpp \ + jni/src/script/clientscripting.cpp \ + jni/src/script/serverscripting.cpp \ jni/src/script/scripting_mainmenu.cpp #freetype2 support -- cgit v1.2.3 From ef56586ed32ca67bd0ae4bbd474f3eca2ce56ec5 Mon Sep 17 00:00:00 2001 From: Uwe Koloska Date: Sat, 1 Apr 2017 16:47:58 +0200 Subject: Add missing source to android build (#5496) --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index db09634e0..89362fd5f 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -312,6 +312,7 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_mainmenu.cpp \ jni/src/script/lua_api/l_mapgen.cpp \ jni/src/script/lua_api/l_metadata.cpp \ + jni/src/script/lua_api/l_minimap.cpp \ jni/src/script/lua_api/l_nodemeta.cpp \ jni/src/script/lua_api/l_nodetimer.cpp \ jni/src/script/lua_api/l_noise.cpp \ -- cgit v1.2.3 From 86b1542181a92841d174e1caec94d084a34e5158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sun, 2 Apr 2017 10:51:50 +0200 Subject: Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib/ instead of src/ (#5473) * Update embedded jsoncpp from unk version to 0.10.6 0.10.6 is last release without c++11 * Make jsoncpp more compliant with its amalgamate Jsoncpp cpp file should be upper, make the library like it does in amalgamate * Reorganization: move minetest embedded libs outside of source tree to /lib * Fix a dead grep in LINT --- build/android/jni/Android.mk | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 89362fd5f..66c61029e 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -98,8 +98,8 @@ endif LOCAL_C_INCLUDES := \ jni/src \ jni/src/script \ - jni/src/lua/src \ - jni/src/jsoncpp \ + jni/lib/lua/src \ + jni/lib/jsoncpp \ jni/src/cguittfont \ deps/irrlicht/include \ deps/libiconv/include \ @@ -335,36 +335,36 @@ LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp # Lua LOCAL_SRC_FILES += \ - jni/src/lua/src/lapi.c \ - jni/src/lua/src/lauxlib.c \ - jni/src/lua/src/lbaselib.c \ - jni/src/lua/src/lcode.c \ - jni/src/lua/src/ldblib.c \ - jni/src/lua/src/ldebug.c \ - jni/src/lua/src/ldo.c \ - jni/src/lua/src/ldump.c \ - jni/src/lua/src/lfunc.c \ - jni/src/lua/src/lgc.c \ - jni/src/lua/src/linit.c \ - jni/src/lua/src/liolib.c \ - jni/src/lua/src/llex.c \ - jni/src/lua/src/lmathlib.c \ - jni/src/lua/src/lmem.c \ - jni/src/lua/src/loadlib.c \ - jni/src/lua/src/lobject.c \ - jni/src/lua/src/lopcodes.c \ - jni/src/lua/src/loslib.c \ - jni/src/lua/src/lparser.c \ - jni/src/lua/src/lstate.c \ - jni/src/lua/src/lstring.c \ - jni/src/lua/src/lstrlib.c \ - jni/src/lua/src/ltable.c \ - jni/src/lua/src/ltablib.c \ - jni/src/lua/src/ltm.c \ - jni/src/lua/src/lundump.c \ - jni/src/lua/src/lvm.c \ - jni/src/lua/src/lzio.c \ - jni/src/lua/src/print.c + jni/lib/lua/src/lapi.c \ + jni/lib/lua/src/lauxlib.c \ + jni/lib/lua/src/lbaselib.c \ + jni/lib/lua/src/lcode.c \ + jni/lib/lua/src/ldblib.c \ + jni/lib/lua/src/ldebug.c \ + jni/lib/lua/src/ldo.c \ + jni/lib/lua/src/ldump.c \ + jni/lib/lua/src/lfunc.c \ + jni/lib/lua/src/lgc.c \ + jni/lib/lua/src/linit.c \ + jni/lib/lua/src/liolib.c \ + jni/lib/lua/src/llex.c \ + jni/lib/lua/src/lmathlib.c \ + jni/lib/lua/src/lmem.c \ + jni/lib/lua/src/loadlib.c \ + jni/lib/lua/src/lobject.c \ + jni/lib/lua/src/lopcodes.c \ + jni/lib/lua/src/loslib.c \ + jni/lib/lua/src/lparser.c \ + jni/lib/lua/src/lstate.c \ + jni/lib/lua/src/lstring.c \ + jni/lib/lua/src/lstrlib.c \ + jni/lib/lua/src/ltable.c \ + jni/lib/lua/src/ltablib.c \ + jni/lib/lua/src/ltm.c \ + jni/lib/lua/src/lundump.c \ + jni/lib/lua/src/lvm.c \ + jni/lib/lua/src/lzio.c \ + jni/lib/lua/src/print.c # SQLite3 LOCAL_SRC_FILES += deps/sqlite/sqlite3.c @@ -377,7 +377,7 @@ LOCAL_SRC_FILES += \ jni/src/threading/thread.cpp # JSONCPP -LOCAL_SRC_FILES += jni/src/jsoncpp/json/jsoncpp.cpp +LOCAL_SRC_FILES += jni/lib/jsoncpp/jsoncpp.cpp LOCAL_SHARED_LIBRARIES := iconv openal ogg vorbis gmp LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto android_native_app_glue $(PROFILER_LIBS) -- cgit v1.2.3 From 98286a24bce14627295230fd3b846abf9641c086 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Fri, 14 Apr 2017 09:26:11 +0200 Subject: Fix android build --- build/android/Makefile | 5 ++++- build/android/jni/Android.mk | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/android/Makefile b/build/android/Makefile index d261a0e95..22700da93 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -795,7 +795,10 @@ install_release: prep_srcdir : @if [ ! -e ${ANDR_ROOT}/jni/src ]; then \ - ln -s ${PROJ_ROOT}/src ${ANDR_ROOT}/jni/src; \ + ln -s ${PROJ_ROOT}/src ${ANDR_ROOT}/jni/src; \ + fi; \ + if [ ! -e ${ANDR_ROOT}/jni/lib ]; then \ + ln -s ${PROJ_ROOT}/lib ${ANDR_ROOT}/jni/lib; \ fi clean_apk : diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 66c61029e..fd104db06 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -309,6 +309,7 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_inventory.cpp \ jni/src/script/lua_api/l_item.cpp \ jni/src/script/lua_api/l_itemstackmeta.cpp\ + jni/src/script/lua_api/l_localplayer.cpp \ jni/src/script/lua_api/l_mainmenu.cpp \ jni/src/script/lua_api/l_mapgen.cpp \ jni/src/script/lua_api/l_metadata.cpp \ -- cgit v1.2.3 From d17636484dedab91b820667a82ec23cf6168ac7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Courant?= Date: Sun, 16 Apr 2017 00:48:48 -0700 Subject: Disable android leveldb by default (#5596) 1) Now leveldb is brick (thanks google) 2) By default, use SQLite3, this work perfectly and NOBODY not use LevelDB on Android :) --- build/android/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'build') diff --git a/build/android/Makefile b/build/android/Makefile index 22700da93..2ee3f7dcc 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -35,7 +35,7 @@ TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON) TARGET_ARCH = armv7 CROSS_PREFIX = arm-linux-androideabi- COMPILER_VERSION = 4.9 -HAVE_LEVELDB = 1 +HAVE_LEVELDB = 0 ################################################################################ # toolchain config for little endian mips @@ -59,7 +59,7 @@ HAVE_LEVELDB = 1 #CROSS_PREFIX = i686-linux-android- #TARGET_ARCH = x86 #COMPILER_VERSION = 4.9 -#HAVE_LEVELDB = 1 +#HAVE_LEVELDB = 0 ################################################################################ ASSETS_TIMESTAMP = deps/assets_timestamp @@ -352,7 +352,7 @@ leveldb_download : fi leveldb : $(LEVELDB_LIB) - +ifeq ($(HAVE_LEVELDB),1) $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP) @REFRESH=0; \ if [ ! -e ${LEVELDB_TIMESTAMP_INT} ] ; then \ @@ -384,6 +384,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP) else \ echo "nothing to be done for leveldb"; \ fi +endif clean_leveldb : $(RM) -rf deps/leveldb -- cgit v1.2.3 From 04cc9de8f2fbcb11f133c88f02fc11504b3ea6f3 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 15 Apr 2017 10:55:52 +0300 Subject: MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock copying done in the main thread Cache size is configurable by the meshgen_block_cache_size (default 20 MB). New profiler stats: - MeshUpdateQueue MapBlock cache hit % - MeshUpdateQueue MapBlock cache size kB Removes one type of stutter that was seen on the client when received MapBlocks were being handled. (the "MeshMakeData::fill" stutter) Kind of related to at least #5239 Originally preceded by these commits, now includes them: - Move the mesh generator thread into src/mesh_generator_thread.{cpp,h} - mesh_generator_thread.cpp: Update code style - MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits. - MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache) --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index fd104db06..2929eaba1 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -185,6 +185,7 @@ LOCAL_SRC_FILES := \ jni/src/mapnode.cpp \ jni/src/mapsector.cpp \ jni/src/mesh.cpp \ + jni/src/mesh_generator_thread.cpp \ jni/src/metadata.cpp \ jni/src/mg_biome.cpp \ jni/src/mg_decoration.cpp \ -- cgit v1.2.3 From 29ab20c27229672c24a7699afbcd54caad903331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sun, 23 Apr 2017 14:35:08 +0200 Subject: Player data to Database (#5475) * Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 2929eaba1..b652c6b5e 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -134,6 +134,7 @@ LOCAL_SRC_FILES := \ jni/src/convert_json.cpp \ jni/src/craftdef.cpp \ jni/src/database-dummy.cpp \ + jni/src/database-files.cpp \ jni/src/database-sqlite3.cpp \ jni/src/database.cpp \ jni/src/debug.cpp \ -- cgit v1.2.3 From 1670bc7366c687ef185b5b3cebda55b9201e004f Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 26 Apr 2017 21:11:46 +0200 Subject: Fix Android build since 2818d3f2244d2146a5cdb61cd41f6561c514f97c --- build/android/jni/Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index b652c6b5e..6525942bd 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -329,8 +329,8 @@ LOCAL_SRC_FILES += \ jni/src/script/lua_api/l_storage.cpp \ jni/src/script/lua_api/l_util.cpp \ jni/src/script/lua_api/l_vmanip.cpp \ - jni/src/script/clientscripting.cpp \ - jni/src/script/serverscripting.cpp \ + jni/src/script/scripting_client.cpp \ + jni/src/script/scripting_server.cpp \ jni/src/script/scripting_mainmenu.cpp #freetype2 support -- cgit v1.2.3 From de028fc056b26e03ee00324888f870f64e28c756 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Fri, 5 May 2017 15:07:36 -0500 Subject: [CSM] Add camera API (#5609) * [CSM] Add camera API roper rebase & squash * Address nerzhul's review --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 6525942bd..d4a8d988f 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -305,6 +305,7 @@ LOCAL_SRC_FILES += \ jni/src/script/cpp_api/s_server.cpp \ jni/src/script/lua_api/l_areastore.cpp \ jni/src/script/lua_api/l_base.cpp \ + jni/src/script/lua_api/l_camera.cpp \ jni/src/script/lua_api/l_client.cpp \ jni/src/script/lua_api/l_craft.cpp \ jni/src/script/lua_api/l_env.cpp \ -- cgit v1.2.3 From 77597c4ff3b666cc37dd257952938df48d7e6f09 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Mon, 6 Jul 2015 12:53:30 -0400 Subject: Clean up numeric.h and split FacePositionCache from it I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition. --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index d4a8d988f..44d98fada 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -143,6 +143,7 @@ LOCAL_SRC_FILES := \ jni/src/dungeongen.cpp \ jni/src/emerge.cpp \ jni/src/environment.cpp \ + jni/src/face_position_cache.cpp \ jni/src/filecache.cpp \ jni/src/filesys.cpp \ jni/src/fontengine.cpp \ -- cgit v1.2.3 From 9b8ca3a746cdb9478a46939d36c30484a97255e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sat, 13 May 2017 11:05:16 +0200 Subject: Move KeyList & InputHandler from game.h to client/inputhandler.h (#5752) * Move KeyList & InputHandler from game.h to client/inputhandler.h We have a header for inputs, move inputhandler class & related keylist object to it Also introduce a cpp file for MyEventReceiver::OnEvent function in inputhandler.h because a so huge function doesn't needs to be inlined * Pass clang-format on inputhandler.{cpp,h} (compatible) --- build/android/jni/Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build') diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index 44d98fada..7b741e04b 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -270,6 +270,7 @@ LOCAL_SRC_FILES := \ jni/src/settings.cpp \ jni/src/wieldmesh.cpp \ jni/src/client/clientlauncher.cpp \ + jni/src/client/inputhandler.cpp \ jni/src/client/tile.cpp \ jni/src/client/joystick_controller.cpp \ jni/src/irrlicht_changes/static_text.cpp -- cgit v1.2.3 From 0d4d35ab930ecb5b313f74ae430edddd0ee79d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sat, 13 May 2017 13:32:59 +0200 Subject: Android dependencies updates (#5755) * irrlicht ogles 5122 -> 5145 * openssl 1.0.2j -> 1.0.2k * curl 7.52 -> 7.54 * sqlite 3.15.2 -> 3.18.0 --- build/android/Makefile | 13 ++++++------- build/android/patches/sqlite3-readonly-fix.patch | 17 ----------------- 2 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 build/android/patches/sqlite3-readonly-fix.patch (limited to 'build') diff --git a/build/android/Makefile b/build/android/Makefile index 2ee3f7dcc..d9a82da4d 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -84,14 +84,14 @@ OGG_TIMESTAMP = $(OGG_DIR)timestamp OGG_TIMESTAMP_INT = $(ANDR_ROOT)/deps/ogg_timestamp OGG_URL_GIT = https://github.com/vincentjames501/libvorbis-libogg-android -IRRLICHT_REVISION = 5122 +IRRLICHT_REVISION = 5145 IRRLICHT_DIR = $(ANDR_ROOT)/deps/irrlicht/ IRRLICHT_LIB = $(IRRLICHT_DIR)lib/Android/libIrrlicht.a IRRLICHT_TIMESTAMP = $(IRRLICHT_DIR)timestamp IRRLICHT_TIMESTAMP_INT = $(ANDR_ROOT)/deps/irrlicht_timestamp IRRLICHT_URL_SVN = https://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@$(IRRLICHT_REVISION) -OPENSSL_VERSION = 1.0.2j +OPENSSL_VERSION = 1.0.2k OPENSSL_BASEDIR = openssl-$(OPENSSL_VERSION) OPENSSL_DIR = $(ANDR_ROOT)/deps/$(OPENSSL_BASEDIR)/ OPENSSL_LIB = $(OPENSSL_DIR)/libssl.so.1.0.0 @@ -99,7 +99,7 @@ OPENSSL_TIMESTAMP = $(OPENSSL_DIR)timestamp OPENSSL_TIMESTAMP_INT = $(ANDR_ROOT)/deps/openssl_timestamp OPENSSL_URL = https://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz -CURL_VERSION = 7.52.0 +CURL_VERSION = 7.54.0 CURL_DIR = $(ANDR_ROOT)/deps/curl-$(CURL_VERSION) CURL_LIB = $(CURL_DIR)/lib/.libs/libcurl.a CURL_TIMESTAMP = $(CURL_DIR)/timestamp @@ -126,8 +126,8 @@ ICONV_TIMESTAMP = $(ICONV_DIR)timestamp ICONV_TIMESTAMP_INT = $(ANDR_ROOT)/deps/iconv_timestamp ICONV_URL_HTTP = https://ftp.gnu.org/pub/gnu/libiconv/libiconv-$(ICONV_VERSION).tar.gz -SQLITE3_FOLDER = sqlite-amalgamation-3150200 -SQLITE3_URL = https://www.sqlite.org/2016/$(SQLITE3_FOLDER).zip +SQLITE3_FOLDER = sqlite-amalgamation-3180000 +SQLITE3_URL = https://www.sqlite.org/2017/$(SQLITE3_FOLDER).zip ANDROID_SDK = $(shell grep '^sdk\.dir' local.properties | sed 's/^.*=[[:space:]]*//') ANDROID_NDK = $(shell grep '^ndk\.dir' local.properties | sed 's/^.*=[[:space:]]*//') @@ -680,8 +680,7 @@ deps/${SQLITE3_FOLDER}/sqlite3.c : wget ${SQLITE3_URL}; \ unzip ${SQLITE3_FOLDER}.zip; \ ln -s ${SQLITE3_FOLDER} sqlite; \ - cd ${SQLITE3_FOLDER}; \ - patch sqlite3.c < ${ANDR_ROOT}/patches/sqlite3-readonly-fix.patch + cd ${SQLITE3_FOLDER}; clean_sqlite3: cd deps && $(RM) -rf ${SQLITE3_FOLDER} && $(RM) -f ${SQLITE3_FOLDER}.zip && \ diff --git a/build/android/patches/sqlite3-readonly-fix.patch b/build/android/patches/sqlite3-readonly-fix.patch deleted file mode 100644 index be19055ee..000000000 --- a/build/android/patches/sqlite3-readonly-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- sqlite3.c 2016-11-29 02:29:24.000000000 +0000 -+++ sqlite3.c 2016-12-08 22:54:54.206465377 +0000 -@@ -30445,7 +30445,14 @@ - #if OS_VXWORKS - struct vxworksFileId *pId; /* Unique file ID for vxworks. */ - #else -- ino_t ino; /* Inode number */ -+ #ifdef ANDROID -+ // Bionic's struct stat has a 64 bit st_ino on both 32 and -+ // 64 bit architectures. ino_t remains 32 bits wide on 32 bit -+ // architectures and can lead to inode truncation. -+ unsigned long long ino; /* Inode number */ -+ #else -+ ino_t ino; /* Inode number */ -+ #endif - #endif - }; -- cgit v1.2.3 From 72eec0f6f55b8515606de05d88717a78e978dd2a Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 3 Jun 2017 19:36:01 +0200 Subject: Android: update build tools version + versionCode bump for release --- build/android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/android/build.gradle b/build/android/build.gradle index 745952a22..1263b2232 100644 --- a/build/android/build.gradle +++ b/build/android/build.gradle @@ -11,10 +11,10 @@ apply plugin: "com.android.application" android { compileSdkVersion 25 - buildToolsVersion "25.0.1" + buildToolsVersion "25.0.3" defaultConfig { - versionCode 16 + versionCode 17 versionName "${System.env.VERSION_STR}.${versionCode}" minSdkVersion 9 targetSdkVersion 9 -- cgit v1.2.3