aboutsummaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/app/build.gradle11
-rw-r--r--android/native/jni/Android.mk9
2 files changed, 15 insertions, 5 deletions
diff --git a/android/app/build.gradle b/android/app/build.gradle
index b7d93ef0f..53fe85910 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -76,10 +76,13 @@ task prepareAssets() {
copy {
from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}"
}
- /*copy {
- // ToDo: fix broken locales
- from "${projRoot}/po" into "${assetsFolder}/po"
- }*/
+ fileTree("${projRoot}/po").include("**/*.po").forEach { poFile ->
+ def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/"
+ file(moPath).mkdirs()
+ exec {
+ commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile
+ }
+ }
copy {
from "${projRoot}/textures" into "${assetsFolder}/textures"
}
diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk
index 5039f325e..f92ac1d60 100644
--- a/android/native/jni/Android.mk
+++ b/android/native/jni/Android.mk
@@ -48,6 +48,11 @@ LOCAL_SRC_FILES := deps/Android/OpenAL-Soft/${NDK_TOOLCHAIN_VERSION}/$(APP_ABI)/
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
+LOCAL_MODULE := GetText
+LOCAL_SRC_FILES := deps/Android/GetText/${NDK_TOOLCHAIN_VERSION}/$(APP_ABI)/libintl.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := Vorbis
LOCAL_SRC_FILES := deps/Android/Vorbis/${NDK_TOOLCHAIN_VERSION}/$(APP_ABI)/libvorbis.a
include $(PREBUILT_STATIC_LIBRARY)
@@ -64,6 +69,7 @@ LOCAL_CFLAGS += \
-DUSE_FREETYPE=1 \
-DUSE_LEVELDB=0 \
-DUSE_LUAJIT=1 \
+ -DUSE_GETTEXT=1 \
-DVERSION_MAJOR=${versionMajor} \
-DVERSION_MINOR=${versionMinor} \
-DVERSION_PATCH=${versionPatch} \
@@ -89,6 +95,7 @@ LOCAL_C_INCLUDES := \
deps/Android/Freetype/include \
deps/Android/Irrlicht/include \
deps/Android/LevelDB/include \
+ deps/Android/GetText/include \
deps/Android/libiconv/include \
deps/Android/libiconv/libcharset/include \
deps/Android/LuaJIT/src \
@@ -194,7 +201,7 @@ LOCAL_SRC_FILES += \
# SQLite3
LOCAL_SRC_FILES += deps/Android/sqlite/sqlite3.c
-LOCAL_STATIC_LIBRARIES += Curl Freetype Irrlicht OpenAL mbedTLS mbedx509 mbedcrypto Vorbis LuaJIT android_native_app_glue $(PROFILER_LIBS) #LevelDB
+LOCAL_STATIC_LIBRARIES += Curl Freetype Irrlicht OpenAL mbedTLS mbedx509 mbedcrypto Vorbis LuaJIT GetText android_native_app_glue $(PROFILER_LIBS) #LevelDB
LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES