Skip to content

Commit

Permalink
supported CC_USE_CURL in Android
Browse files Browse the repository at this point in the history
  • Loading branch information
SunLightJuly committed Nov 17, 2014
1 parent d2425ca commit 1d65a60
Show file tree
Hide file tree
Showing 16 changed files with 2,004 additions and 1,851 deletions.
6 changes: 6 additions & 0 deletions cocos/base/ccConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ To enable set it to a value different than 0. Disabled by default.
#define CC_USE_WEBP 1
#endif // CC_USE_WEBP

/** Use curl or not. If your application don't use curl, you can undefine this macro to save package size.
*/
#ifndef CC_USE_CURL
#define CC_USE_CURL 1
#endif // CC_USE_CURL

/** Enable Script binding */
#ifndef CC_ENABLE_SCRIPT_BINDING
#define CC_ENABLE_SCRIPT_BINDING 1
Expand Down
11 changes: 10 additions & 1 deletion cocos/network/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,26 @@ LOCAL_MODULE := cocos_network_static

LOCAL_MODULE_FILENAME := libnetwork

LOCAL_SRC_FILES := HttpClient.cpp \
LOCAL_SRC_FILES := \
SocketIO.cpp \
WebSocket.cpp

ifeq ($(CC_USE_CURL),1)
LOCAL_SRC_FILES += HttpClient.cpp
endif


LOCAL_EXPORT_C_INCLUDES :=

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../external/curl/include/android \
$(LOCAL_PATH)/../../external/websockets/include/android

LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static

ifeq ($(CC_USE_CURL),1)
LOCAL_STATIC_LIBRARIES += cocos_curl_static
endif

LOCAL_STATIC_LIBRARIES += libwebsockets_static

include $(BUILD_STATIC_LIBRARY)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--------------------------------
-- @module cc

--------------------------------------------------------
-- the cc AssetsManager
-- @field [parent=#cc] AssetsManager#AssetsManager AssetsManager preloaded module


--------------------------------------------------------
-- the cc EventAssetsManagerEx
-- @field [parent=#cc] EventAssetsManagerEx#EventAssetsManagerEx EventAssetsManagerEx preloaded module


--------------------------------------------------------
-- the cc Manifest
-- @field [parent=#cc] Manifest#Manifest Manifest preloaded module


--------------------------------------------------------
-- the cc AssetsManagerEx
-- @field [parent=#cc] AssetsManagerEx#AssetsManagerEx AssetsManagerEx preloaded module


--------------------------------------------------------
-- the cc EventListenerAssetsManagerEx
-- @field [parent=#cc] EventListenerAssetsManagerEx#EventListenerAssetsManagerEx EventListenerAssetsManagerEx preloaded module


return nil
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,4 @@
-- @field [parent=#cc] TableView#TableView TableView preloaded module


--------------------------------------------------------
-- the cc AssetsManager
-- @field [parent=#cc] AssetsManager#AssetsManager AssetsManager preloaded module


--------------------------------------------------------
-- the cc EventAssetsManagerEx
-- @field [parent=#cc] EventAssetsManagerEx#EventAssetsManagerEx EventAssetsManagerEx preloaded module


--------------------------------------------------------
-- the cc Manifest
-- @field [parent=#cc] Manifest#Manifest Manifest preloaded module


--------------------------------------------------------
-- the cc AssetsManagerEx
-- @field [parent=#cc] AssetsManagerEx#AssetsManagerEx AssetsManagerEx preloaded module


--------------------------------------------------------
-- the cc EventListenerAssetsManagerEx
-- @field [parent=#cc] EventListenerAssetsManagerEx#EventListenerAssetsManagerEx EventListenerAssetsManagerEx preloaded module


return nil
Loading

0 comments on commit 1d65a60

Please sign in to comment.