diff --git a/HelloWorld/Classes/Android.mk b/HelloWorld/Classes/Android.mk new file mode 100644 index 0000000000..3de3012b0d --- /dev/null +++ b/HelloWorld/Classes/Android.mk @@ -0,0 +1,18 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) +LOCAL_MODULE := game_logic + +LOCAL_SRC_FILES := AppDelegate.cpp \ + HelloWorldScene.cpp + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../cocos2dx \ + $(LOCAL_PATH)/../../cocos2dx/platform \ + $(LOCAL_PATH)/../../cocos2dx/include \ + $(LOCAL_PATH)/../../CocosDenshion/include \ + $(LOCAL_PATH)/../../cocos2dx/lua_support + +LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../android/libs/$(TARGET_ARCH_ABI)) \ + -lcocos2d -lcocosdenshion \ + -L$(call host-path, $(LOCAL_PATH)/../../cocos2dx/platform/third_party/android/libraries/$(TARGET_ARCH_ABI)) -lcurl + +include $(BUILD_SHARED_LIBRARY) \ No newline at end of file diff --git a/HelloWorld/android/build.properties b/HelloWorld/android/build.properties deleted file mode 100644 index ee52d86d94..0000000000 --- a/HelloWorld/android/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked in Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - diff --git a/HelloWorld/android/build.xml b/HelloWorld/android/build.xml deleted file mode 100644 index 768294d19c..0000000000 --- a/HelloWorld/android/build.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HelloWorld/android/build_native.sh b/HelloWorld/android/build_native.sh index 115d83cb90..ae927d8043 100644 --- a/HelloWorld/android/build_native.sh +++ b/HelloWorld/android/build_native.sh @@ -1,5 +1,5 @@ # set params -ANDROID_NDK_ROOT=/cygdrive/d/programe/android/ndk/android-ndk-r6 +ANDROID_NDK_ROOT=/cygdrive/d/programe/android/ndk/android-ndk-r6b COCOS2DX_ROOT=/cygdrive/e/cocos2d-x HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld/android diff --git a/HelloWorld/android/jni/Android.mk b/HelloWorld/android/jni/Android.mk index bdef5abe06..87e30c591e 100644 --- a/HelloWorld/android/jni/Android.mk +++ b/HelloWorld/android/jni/Android.mk @@ -5,6 +5,6 @@ subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \ cocos2dx \ CocosDenshion/android \ )) -subdirs += $(LOCAL_PATH)/helloworld/Android.mk +subdirs += $(LOCAL_PATH)/../../Classes/Android.mk $(LOCAL_PATH)/helloworld/Android.mk include $(subdirs) diff --git a/HelloWorld/android/jni/Application.mk b/HelloWorld/android/jni/Application.mk index 40ab23a70f..949f3e9f17 100644 --- a/HelloWorld/android/jni/Application.mk +++ b/HelloWorld/android/jni/Application.mk @@ -1,4 +1,6 @@ # it is needed for ndk-r5 APP_STL := stlport_static -APP_MODULES := cocos2d cocosdenshion helloworld \ No newline at end of file +APP_ABI := armeabi armeabi-v7a + +APP_MODULES := cocos2d cocosdenshion game_logic helloworld \ No newline at end of file diff --git a/HelloWorld/android/jni/helloworld/Android.mk b/HelloWorld/android/jni/helloworld/Android.mk index 76214b8f5b..b243aec831 100644 --- a/HelloWorld/android/jni/helloworld/Android.mk +++ b/HelloWorld/android/jni/helloworld/Android.mk @@ -2,23 +2,14 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := helloworld -LOCAL_SRC_FILES := main.cpp \ -../../../Classes/AppDelegate.cpp \ -../../../Classes/HelloWorldScene.cpp +LOCAL_SRC_FILES := main.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \ $(LOCAL_PATH)/../../../../cocos2dx/platform \ $(LOCAL_PATH)/../../../../cocos2dx/include \ - $(LOCAL_PATH)/../../../../cocos2dx/lua_support \ - $(LOCAL_PATH)/../../../../CocosDenshion/include \ $(LOCAL_PATH)/../../../Classes -# it is used for ndk-r5 -# if you build with ndk-r4, comment it -# because the new Windows toolchain doesn't support Cygwin's drive -# mapping (i.e /cygdrive/c/ instead of C:/) -LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \ - -lcocos2d -llog -lcocosdenshion \ - -L$(call host-path, $(LOCAL_PATH)/../../../../cocos2dx/platform/third_party/android/libraries) -lcurl +LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/$(TARGET_ARCH_ABI)) \ + -lcocos2d -llog -lgame_logic include $(BUILD_SHARED_LIBRARY) \ No newline at end of file diff --git a/HelloWorld/android/local.properties b/HelloWorld/android/local.properties deleted file mode 100644 index ba25bfda91..0000000000 --- a/HelloWorld/android/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must *NOT* be checked in Version Control Systems, -# as it contains information specific to your local configuration. - -# location of the SDK. This is only used by Ant -# For customization when using a Version Control System, please read the -# header note. -sdk.dir=/home/laschweinski/android/android-sdk-linux_86 diff --git a/HelloWorld/android/proguard.cfg b/HelloWorld/android/proguard.cfg deleted file mode 100644 index b1cdf17b5b..0000000000 --- a/HelloWorld/android/proguard.cfg +++ /dev/null @@ -1,40 +0,0 @@ --optimizationpasses 5 --dontusemixedcaseclassnames --dontskipnonpubliclibraryclasses --dontpreverify --verbose --optimizations !code/simplification/arithmetic,!field/*,!class/merging/* - --keep public class * extends android.app.Activity --keep public class * extends android.app.Application --keep public class * extends android.app.Service --keep public class * extends android.content.BroadcastReceiver --keep public class * extends android.content.ContentProvider --keep public class * extends android.app.backup.BackupAgentHelper --keep public class * extends android.preference.Preference --keep public class com.android.vending.licensing.ILicensingService - --keepclasseswithmembernames class * { - native ; -} - --keepclasseswithmembers class * { - public (android.content.Context, android.util.AttributeSet); -} - --keepclasseswithmembers class * { - public (android.content.Context, android.util.AttributeSet, int); -} - --keepclassmembers class * extends android.app.Activity { - public void *(android.view.View); -} - --keepclassmembers enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keep class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator *; -} diff --git a/HelloWorld/android/src/org/cocos2dx/application/ApplicationDemo.java b/HelloWorld/android/src/org/cocos2dx/application/ApplicationDemo.java index 1351b74c59..dd74d421eb 100644 --- a/HelloWorld/android/src/org/cocos2dx/application/ApplicationDemo.java +++ b/HelloWorld/android/src/org/cocos2dx/application/ApplicationDemo.java @@ -58,6 +58,7 @@ public class ApplicationDemo extends Cocos2dxActivity{ static { System.loadLibrary("cocos2d"); System.loadLibrary("cocosdenshion"); + System.loadLibrary("game_logic"); System.loadLibrary("helloworld"); } } diff --git a/cocos2dx/Android.mk b/cocos2dx/Android.mk index f806b8c242..66320cfc22 100644 --- a/cocos2dx/Android.mk +++ b/cocos2dx/Android.mk @@ -104,8 +104,6 @@ tileMap_parallax_nodes/CCTileMapAtlas.cpp \ touch_dispatcher/CCTouchDispatcher.cpp \ touch_dispatcher/CCTouchHandler.cpp - - LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/platform \ @@ -114,11 +112,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \ $(LOCAL_PATH)/platform/third_party/android/libxml2 \ $(LOCAL_PATH)/platform/third_party/android/libjpeg -# it is used for ndk-r5 -# if you build with ndk-r4, comment it -# because the new Windows toolchain doesn't support Cygwin's drive -# mapping (i.e /cygdrive/c/ instead of C:/) -LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/platform/third_party/android/libraries) \ +LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/platform/third_party/android/libraries/$(TARGET_ARCH_ABI)) \ -lGLESv1_CM -llog -lz \ -lpng \ -lxml2 \ diff --git a/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libcurl.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libcurl.a.REMOVED.git-id new file mode 100644 index 0000000000..85faa41a12 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libcurl.a.REMOVED.git-id @@ -0,0 +1 @@ +89c49d395ece44cf2d891cd5c2a84f819e229d30 \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libiconv.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libiconv.a.REMOVED.git-id new file mode 100644 index 0000000000..58dbd5283f --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libiconv.a.REMOVED.git-id @@ -0,0 +1 @@ +ed7341a4fe082dfc3323ab2808729baf6faf72a6 \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libjpeg.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libjpeg.a.REMOVED.git-id new file mode 100644 index 0000000000..124780e2de --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libjpeg.a.REMOVED.git-id @@ -0,0 +1 @@ +09011474ff4df140a34e82e7cdb5c86cf9a522bc \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libpng.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libpng.a.REMOVED.git-id new file mode 100644 index 0000000000..91949aab14 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libpng.a.REMOVED.git-id @@ -0,0 +1 @@ +d3c4c2e8858fd0eb83f2f4f8e501d10394836add \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libxml2.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libxml2.a.REMOVED.git-id new file mode 100644 index 0000000000..099c19a8ca --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/armeabi-v7a/libxml2.a.REMOVED.git-id @@ -0,0 +1 @@ +9666bcac0a33d1dcfd5361266eca55f1bace1daf \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/libcurl.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi/libcurl.a.REMOVED.git-id similarity index 100% rename from cocos2dx/platform/third_party/android/libraries/libcurl.a.REMOVED.git-id rename to cocos2dx/platform/third_party/android/libraries/armeabi/libcurl.a.REMOVED.git-id diff --git a/cocos2dx/platform/third_party/android/libraries/libjpeg.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi/libjpeg.a.REMOVED.git-id similarity index 100% rename from cocos2dx/platform/third_party/android/libraries/libjpeg.a.REMOVED.git-id rename to cocos2dx/platform/third_party/android/libraries/armeabi/libjpeg.a.REMOVED.git-id diff --git a/cocos2dx/platform/third_party/android/libraries/libpng.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi/libpng.a.REMOVED.git-id similarity index 100% rename from cocos2dx/platform/third_party/android/libraries/libpng.a.REMOVED.git-id rename to cocos2dx/platform/third_party/android/libraries/armeabi/libpng.a.REMOVED.git-id diff --git a/cocos2dx/platform/third_party/android/libraries/libxml2.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/armeabi/libxml2.a.REMOVED.git-id similarity index 100% rename from cocos2dx/platform/third_party/android/libraries/libxml2.a.REMOVED.git-id rename to cocos2dx/platform/third_party/android/libraries/armeabi/libxml2.a.REMOVED.git-id diff --git a/cocos2dx/platform/third_party/android/libraries/x86/libcurl.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/x86/libcurl.a.REMOVED.git-id new file mode 100644 index 0000000000..9747da75e9 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/x86/libcurl.a.REMOVED.git-id @@ -0,0 +1 @@ +fca1b81187a22728c6c352f121ac03f8abf2ae75 \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/x86/libiconv.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/x86/libiconv.a.REMOVED.git-id new file mode 100644 index 0000000000..a42972f326 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/x86/libiconv.a.REMOVED.git-id @@ -0,0 +1 @@ +f8727a9fe8bb39473706cd3b98cb9a12a4304c6f \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/x86/libjpeg.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/x86/libjpeg.a.REMOVED.git-id new file mode 100644 index 0000000000..c74dda1967 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/x86/libjpeg.a.REMOVED.git-id @@ -0,0 +1 @@ +42f26e695ffe165b38102fd3b9bd0e2be617bf2b \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/x86/libpng.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/x86/libpng.a.REMOVED.git-id new file mode 100644 index 0000000000..7cc65fe607 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/x86/libpng.a.REMOVED.git-id @@ -0,0 +1 @@ +e3e0e06dbb367746764f6b1146884f6ef75bb5a2 \ No newline at end of file diff --git a/cocos2dx/platform/third_party/android/libraries/x86/libxml2.a.REMOVED.git-id b/cocos2dx/platform/third_party/android/libraries/x86/libxml2.a.REMOVED.git-id new file mode 100644 index 0000000000..0e52a14480 --- /dev/null +++ b/cocos2dx/platform/third_party/android/libraries/x86/libxml2.a.REMOVED.git-id @@ -0,0 +1 @@ +3100e9f83cf078971b4b48b757bf5ebac2d02d37 \ No newline at end of file diff --git a/tests/test.android/build_native.sh b/tests/test.android/build_native.sh index 008817f290..c478c196ec 100644 --- a/tests/test.android/build_native.sh +++ b/tests/test.android/build_native.sh @@ -1,6 +1,6 @@ #!/bin/bash # set params -ANDROID_NDK_ROOT=/cygdrive/d/programe/android/ndk/android-ndk-r6 +ANDROID_NDK_ROOT=/cygdrive/d/programe/android/ndk/android-ndk-r6b COCOS2DX_ROOT=/cygdrive/e/cocos2d-x TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android