-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #982: android template support lua box2d and chipmunk
- Loading branch information
Showing
11 changed files
with
228 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
# set environment paramters | ||
|
||
sh `pwd`/create-android-project.sh linux | ||
sh `pwd`/create-android-project.sh linux $@ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FILE=$1 | ||
NEED_BOX2D=$2 | ||
NEED_CHIPMUNK=$3 | ||
NEED_LUA=$4 | ||
|
||
APP_MODULES="APP_MODULES := cocos2dx_static cocosdenshion_shared" | ||
if [ $NEED_BOX2D == "true" ];then | ||
APP_MODULES+=" box2d_shared" | ||
fi | ||
|
||
if [ $NEED_CHIPMUNK == "true" ]; then | ||
APP_MODULES+=" chipmunk_shared" | ||
fi | ||
|
||
if [ $NEED_LUA == "true" ]; then | ||
APP_MODULES+=" lua_shared" | ||
fi | ||
|
||
APP_MODULES+=" game_shared" | ||
|
||
cat > $FILE << EOF | ||
APP_STL := gnustl_static | ||
APP_CPPFLAGS += -frtti | ||
$APP_MODULES | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FILE=$1 | ||
NEED_BOX2D=$2 | ||
NEED_CHIPMUNK=$3 | ||
NEED_LUA=$4 | ||
|
||
LOCAL_SHARED_LIBRARIES="LOCAL_SHARED_LIBRARIES := cocosdenshion_shared" | ||
|
||
if [ $NEED_BOX2D == "true" ];then | ||
LOCAL_SHARED_LIBRARIES+=" box2d_shared" | ||
fi | ||
|
||
if [ $NEED_CHIPMUNK == "true" ]; then | ||
LOCAL_SHARED_LIBRARIES+=" chipmunk_shared" | ||
fi | ||
|
||
if [ $NEED_LUA == "true" ]; then | ||
LOCAL_SHARED_LIBRARIES+=" lua_shared" | ||
fi | ||
|
||
cat > $FILE << EOF | ||
LOCAL_PATH := \$(call my-dir) | ||
include \$(CLEAR_VARS) | ||
LOCAL_MODULE := game_logic_static | ||
LOCAL_MODULE_FILENAME := libgame_logic | ||
LOCAL_SRC_FILES := AppDelegate.cpp \\ | ||
HelloWorldScene.cpp | ||
LOCAL_EXPORT_C_INCLUDES := \$(LOCAL_PATH) | ||
LOCAL_STATIC_LIBRARIES := png_static_prebuilt | ||
LOCAL_STATIC_LIBRARIES += xml2_static_prebuilt | ||
LOCAL_STATIC_LIBRARIES += jpeg_static_prebuilt | ||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static | ||
$LOCAL_SHARED_LIBRARIES | ||
include \$(BUILD_STATIC_LIBRARY) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libpng) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libxml2) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libjpeg) | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FILE=$1 | ||
NEED_BOX2D=$2 | ||
NEED_CHIPMUNK=$3 | ||
NEED_LUA=$4 | ||
|
||
LOCAL_SHARED_LIBRARIES="LOCAL_SHARED_LIBRARIES := cocosdenshion_shared" | ||
|
||
if [ $NEED_BOX2D == "true" ];then | ||
LOCAL_SHARED_LIBRARIES+=" box2d_shared" | ||
fi | ||
|
||
if [ $NEED_CHIPMUNK == "true" ]; then | ||
LOCAL_SHARED_LIBRARIES+=" chipmunk_shared" | ||
fi | ||
|
||
if [ $NEED_LUA == "true" ]; then | ||
LOCAL_SHARED_LIBRARIES+=" lua_shared" | ||
fi | ||
|
||
cat > $FILE << EOF | ||
LOCAL_PATH := \$(call my-dir) | ||
include \$(CLEAR_VARS) | ||
LOCAL_MODULE := game_shared | ||
LOCAL_MODULE_FILENAME := libgame | ||
LOCAL_SRC_FILES := main.cpp | ||
LOCAL_STATIC_LIBRARIES := png_static_prebuilt | ||
LOCAL_STATIC_LIBRARIES += xml2_static_prebuilt | ||
LOCAL_STATIC_LIBRARIES += jpeg_static_prebuilt | ||
LOCAL_STATIC_LIBRARIES += curl_static_prebuilt | ||
LOCAL_WHOLE_STATIC_LIBRARIES := game_logic_static | ||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static | ||
$LOCAL_SHARED_LIBRARIES | ||
include \$(BUILD_SHARED_LIBRARY) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libcurl) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libpng) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libxml2) | ||
\$(call import-module,cocos2dx/platform/third_party/android/modules/libjpeg) | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FILE=$1 | ||
NEED_BOX2D=$2 | ||
NEED_CHIPMUNK=$3 | ||
NEED_LUA=$4 | ||
|
||
if [ $NEED_BOX2D == "true" ];then | ||
BOX2D="Box2D" | ||
fi | ||
|
||
if [ $NEED_CHIPMUNK == "true" ]; then | ||
CHIPMUNK="chipmunk" | ||
fi | ||
|
||
if [ $NEED_LUA == "true" ]; then | ||
LUA="lua/proj.android/jni" | ||
fi | ||
|
||
cat > $FILE << EOF | ||
LOCAL_PATH := \$(call my-dir) | ||
include \$(CLEAR_VARS) | ||
subdirs := \$(addprefix \$(LOCAL_PATH)/../../../,\$(addsuffix /Android.mk, \\ | ||
cocos2dx \\ | ||
CocosDenshion/android \\ | ||
$BOX2D $CHIPMUNK $LUA \\ | ||
)) | ||
subdirs += \$(LOCAL_PATH)/../../Classes/Android.mk \$(LOCAL_PATH)/helloworld/Android.mk | ||
include \$(subdirs) | ||
EOF |