Skip to content

Commit

Permalink
Fix and enable x86 build for Android (#12700)
Browse files Browse the repository at this point in the history
  • Loading branch information
savilli committed Aug 25, 2022
1 parent 0ab9bf9 commit 75d88dc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/android.yml
Expand Up @@ -40,3 +40,13 @@ jobs:
with:
name: Minetest-arm64-v8a.apk
path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
- name: Save x86 artifact
uses: actions/upload-artifact@v3
with:
name: Minetest-x86.apk
path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
- name: Save x86_64 artifact
uses: actions/upload-artifact@v3
with:
name: Minetest-x86_64.apk
path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk
2 changes: 1 addition & 1 deletion android/app/build.gradle
Expand Up @@ -40,7 +40,7 @@ android {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a'
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}

Expand Down
2 changes: 1 addition & 1 deletion android/native/build.gradle
Expand Up @@ -31,7 +31,7 @@ android {
abi {
enable true
reset()
include 'armeabi-v7a', 'arm64-v8a'//, 'x86'
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}

Expand Down
14 changes: 12 additions & 2 deletions android/native/jni/Android.mk
Expand Up @@ -43,6 +43,16 @@ LOCAL_MODULE := Irrlicht
LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libIrrlichtMt.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := Irrlicht-libpng
LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libpng.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := Irrlicht-libjpeg
LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)

ifndef USE_BUILTIN_LUA

include $(CLEAR_VARS)
Expand Down Expand Up @@ -270,7 +280,7 @@ LOCAL_STATIC_LIBRARIES += \
Curl libmbedcrypto libmbedtls libmbedx509 \
Freetype \
Iconv libcharset \
Irrlicht \
Irrlicht Irrlicht-libpng Irrlicht-libjpeg \
OpenAL \
Gettext \
SQLite3 \
Expand All @@ -281,7 +291,7 @@ ifndef USE_BUILTIN_LUA
endif
LOCAL_STATIC_LIBRARIES += android_native_app_glue $(PROFILER_LIBS)

LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES
LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES -lz

include $(BUILD_SHARED_LIBRARY)

Expand Down

0 comments on commit 75d88dc

Please sign in to comment.