diff --git a/extlibs/android/extlibs/Android.mk b/extlibs/android/extlibs/Android.mk index f0b3dec6..f61dc306 100644 --- a/extlibs/android/extlibs/Android.mk +++ b/extlibs/android/extlibs/Android.mk @@ -12,40 +12,14 @@ LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libjpeg.a LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) -LOCAL_MODULE := ogg -LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libogg.so -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -include $(PREBUILT_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := flac -LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libFLAC.so -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -include $(PREBUILT_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := vorbis -LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libvorbis.so -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -include $(PREBUILT_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := vorbisenc -LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libvorbisenc.so -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -include $(PREBUILT_SHARED_LIBRARY) - include $(CLEAR_VARS) LOCAL_MODULE := sndfile LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsndfile.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_SHARED_LIBRARIES := ogg flac vorbis vorbisenc include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := openal LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libopenal.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_SHARED_LIBRARIES := ogg flac vorbis vorbisenc include $(PREBUILT_SHARED_LIBRARY) diff --git a/extlibs/android/extlibs/lib/armeabi-v7a/libFLAC.so b/extlibs/android/extlibs/lib/armeabi-v7a/libFLAC.so deleted file mode 100755 index cf6e7e73..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi-v7a/libFLAC.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi-v7a/libogg.so b/extlibs/android/extlibs/lib/armeabi-v7a/libogg.so deleted file mode 100755 index a90d769e..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi-v7a/libogg.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi-v7a/libsndfile.so b/extlibs/android/extlibs/lib/armeabi-v7a/libsndfile.so index eeccd7fc..e99805c5 100755 Binary files a/extlibs/android/extlibs/lib/armeabi-v7a/libsndfile.so and b/extlibs/android/extlibs/lib/armeabi-v7a/libsndfile.so differ diff --git a/extlibs/android/extlibs/lib/armeabi-v7a/libvorbis.so b/extlibs/android/extlibs/lib/armeabi-v7a/libvorbis.so deleted file mode 100755 index fed5872a..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi-v7a/libvorbis.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi-v7a/libvorbisenc.so b/extlibs/android/extlibs/lib/armeabi-v7a/libvorbisenc.so deleted file mode 100755 index 6837f7f3..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi-v7a/libvorbisenc.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi/libFLAC.so b/extlibs/android/extlibs/lib/armeabi/libFLAC.so deleted file mode 100755 index cc95fada..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi/libFLAC.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi/libogg.so b/extlibs/android/extlibs/lib/armeabi/libogg.so deleted file mode 100755 index 4b62c993..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi/libogg.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi/libsndfile.so b/extlibs/android/extlibs/lib/armeabi/libsndfile.so index fe43deb4..4407050e 100755 Binary files a/extlibs/android/extlibs/lib/armeabi/libsndfile.so and b/extlibs/android/extlibs/lib/armeabi/libsndfile.so differ diff --git a/extlibs/android/extlibs/lib/armeabi/libvorbis.so b/extlibs/android/extlibs/lib/armeabi/libvorbis.so deleted file mode 100755 index 872ba984..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi/libvorbis.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/armeabi/libvorbisenc.so b/extlibs/android/extlibs/lib/armeabi/libvorbisenc.so deleted file mode 100755 index 7d6869c6..00000000 Binary files a/extlibs/android/extlibs/lib/armeabi/libvorbisenc.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/mips/libsndfile.so b/extlibs/android/extlibs/lib/mips/libsndfile.so new file mode 100755 index 00000000..6ef05651 Binary files /dev/null and b/extlibs/android/extlibs/lib/mips/libsndfile.so differ diff --git a/extlibs/android/extlibs/lib/x86/libFLAC.so b/extlibs/android/extlibs/lib/x86/libFLAC.so deleted file mode 100755 index 63576a3e..00000000 Binary files a/extlibs/android/extlibs/lib/x86/libFLAC.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/x86/libogg.so b/extlibs/android/extlibs/lib/x86/libogg.so deleted file mode 100755 index 367502b3..00000000 Binary files a/extlibs/android/extlibs/lib/x86/libogg.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/x86/libsndfile.so b/extlibs/android/extlibs/lib/x86/libsndfile.so index 1396798f..1d953474 100755 Binary files a/extlibs/android/extlibs/lib/x86/libsndfile.so and b/extlibs/android/extlibs/lib/x86/libsndfile.so differ diff --git a/extlibs/android/extlibs/lib/x86/libvorbis.so b/extlibs/android/extlibs/lib/x86/libvorbis.so deleted file mode 100755 index 26355c1d..00000000 Binary files a/extlibs/android/extlibs/lib/x86/libvorbis.so and /dev/null differ diff --git a/extlibs/android/extlibs/lib/x86/libvorbisenc.so b/extlibs/android/extlibs/lib/x86/libvorbisenc.so deleted file mode 100755 index c2937515..00000000 Binary files a/extlibs/android/extlibs/lib/x86/libvorbisenc.so and /dev/null differ diff --git a/src/SFML/Android.mk b/src/SFML/Android.mk index 62dfda6b..2a85b26d 100644 --- a/src/SFML/Android.mk +++ b/src/SFML/Android.mk @@ -4,7 +4,6 @@ include $(CLEAR_VARS) LOCAL_MODULE := sfml-system LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-system.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_EXPORT_LDLIBS := -llog -landroid include $(PREBUILT_SHARED_LIBRARY) @@ -12,7 +11,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := sfml-window LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-window.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_EXPORT_LDLIBS := -lEGL +LOCAL_EXPORT_LDLIBS := -lEGL -llog -landroid LOCAL_SHARED_LIBRARIES := sfml-system include $(PREBUILT_SHARED_LIBRARY) @@ -21,10 +20,6 @@ include $(CLEAR_VARS) LOCAL_MODULE := sfml-graphics LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-graphics.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -#LOCAL_EXPORT_LDLIBS := -lGLESv1_CM - -LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)/extlibs/include -LOCAL_SHARED_LIBRARIES := freetype jpeg LOCAL_SHARED_LIBRARIES += sfml-system sfml-window include $(PREBUILT_SHARED_LIBRARY) @@ -33,9 +28,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := sfml-audio LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-audio.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -#LOCAL_EXPORT_LDLIBS := -lOpenSLES -LOCAL_SHARED_LIBRARIES := openal sndfile -LOCAL_SHARED_LIBRARIES += sfml-system sfml-window +LOCAL_SHARED_LIBRARIES := sfml-window sfml-system openal sndfile include $(PREBUILT_SHARED_LIBRARY) @@ -51,7 +44,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := sfml-main LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libsfml-main.a LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_SHARED_LIBRARIES := sfml-system sfml-window +LOCAL_SHARED_LIBRARIES := sfml-window sfml-system include $(PREBUILT_STATIC_LIBRARY) diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt index d952af2b..f9ea919b 100644 --- a/src/SFML/Audio/CMakeLists.txt +++ b/src/SFML/Audio/CMakeLists.txt @@ -49,14 +49,7 @@ else() find_host_package(OpenAL REQUIRED) find_host_package(Sndfile REQUIRED) set(AUDIO_EXT_INCLUDE_PATHS ${OPENAL_INCLUDE_DIRS} ${SNDFILE_INCLUDE_DIR}) - set(AUDIO_EXT_LIBS -landroid - -lOpenSLES - ${OPENAL_LIBRARY} - ${SNDFILE_LIBRARY} - ${PROJECT_SOURCE_DIR}/extlibs/android/extlibs/lib/${ANDROID_ABI}/libvorbisenc.so - ${PROJECT_SOURCE_DIR}/extlibs/android/extlibs/lib/${ANDROID_ABI}/libvorbis.so - ${PROJECT_SOURCE_DIR}/extlibs/android/extlibs/lib/${ANDROID_ABI}/libFLAC.so - ${PROJECT_SOURCE_DIR}/extlibs/android/extlibs/lib/${ANDROID_ABI}/libogg.so) + set(AUDIO_EXT_LIBS -landroid -lOpenSLES ${OPENAL_LIBRARY} ${SNDFILE_LIBRARY}) endif() # add include paths of external libraries diff --git a/src/SFML/Main/SFMLActivity.cpp b/src/SFML/Main/SFMLActivity.cpp index 2db09ba5..60654d08 100644 --- a/src/SFML/Main/SFMLActivity.cpp +++ b/src/SFML/Main/SFMLActivity.cpp @@ -67,7 +67,7 @@ void* loadLibrary(const char* libraryName, JNIEnv* lJNIEnv, jobject& ObjectActiv } // Release the Java string - lJNIEnv->ReleaseStringUTFChars(THESTRING, pathStr); + lJNIEnv->ReleaseStringUTFChars(javaLibraryPath, libraryPath); return handle; } @@ -103,7 +103,7 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_ lResult=lJavaVM->AttachCurrentThread(&lJNIEnv, &lJavaVMAttachArgs); if (lResult == JNI_ERR) { - LOG("Couldn't attach the current thread to the Java virtual machine"); + LOGE("Couldn't attach the current thread to the Java virtual machine"); exit(1); } @@ -137,13 +137,7 @@ void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, size_ loadLibrary("stlport_shared", lJNIEnv, ObjectActivityInfo); loadLibrary("sfml-system", lJNIEnv, ObjectActivityInfo); loadLibrary("sfml-window", lJNIEnv, ObjectActivityInfo); - loadLibrary("jpeg", lJNIEnv, ObjectActivityInfo); - loadLibrary("freetype", lJNIEnv, ObjectActivityInfo); loadLibrary("sfml-graphics", lJNIEnv, ObjectActivityInfo); - loadLibrary("ogg", lJNIEnv, ObjectActivityInfo); - loadLibrary("FLAC", lJNIEnv, ObjectActivityInfo); - loadLibrary("vorbis", lJNIEnv, ObjectActivityInfo); - loadLibrary("vorbisenc", lJNIEnv, ObjectActivityInfo); loadLibrary("sndfile", lJNIEnv, ObjectActivityInfo); loadLibrary("openal", lJNIEnv, ObjectActivityInfo); loadLibrary("sfml-audio", lJNIEnv, ObjectActivityInfo);