mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-11-09 09:45:22 +00:00
Deploy website - based on b241545287
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := cocos2djs
|
||||
|
||||
LOCAL_MODULE_FILENAME := libcocos2djs
|
||||
|
||||
ifeq ($(USE_ARM_MODE),1)
|
||||
LOCAL_ARM_MODE := arm
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := hellojavascript/main.cpp \
|
||||
../../Classes/AppDelegate.cpp \
|
||||
../../Classes/jsb_module_register.cpp \
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := cocos2dx_static
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
$(call import-module, cocos)
|
||||
@@ -0,0 +1,49 @@
|
||||
APP_STL := c++_static
|
||||
|
||||
# Uncomment this line to compile to armeabi-v7a, your application will run faster but support less devices
|
||||
APP_ABI := armeabi-v7a
|
||||
|
||||
APP_CPPFLAGS := -frtti -std=c++11 -fsigned-char
|
||||
APP_LDFLAGS := -latomic
|
||||
|
||||
# To solve windows commands char length too long
|
||||
APP_SHORT_COMMANDS := true
|
||||
|
||||
USE_ARM_MODE := 1
|
||||
|
||||
# MUST be careful to modify this manually
|
||||
# disable module will speed up compile time, and reduce package size
|
||||
USE_GFX_RENDERER := 1
|
||||
USE_VIDEO := 1
|
||||
USE_WEB_VIEW := 1
|
||||
USE_AUDIO := 1
|
||||
USE_SOCKET := 1
|
||||
USE_SPINE := 1
|
||||
USE_DRAGONBONES := 1
|
||||
USE_TIFF := 1
|
||||
USE_MIDDLEWARE := 1
|
||||
USE_PARTICLE := 1
|
||||
|
||||
APP_CPPFLAGS += -DUSE_GFX_RENDERER=$(USE_GFX_RENDERER)
|
||||
APP_CPPFLAGS += -DUSE_VIDEO=${USE_VIDEO}
|
||||
APP_CPPFLAGS += -DUSE_WEB_VIEW=${USE_WEB_VIEW}
|
||||
APP_CPPFLAGS += -DUSE_AUDIO=${USE_AUDIO}
|
||||
APP_CPPFLAGS += -DUSE_SOCKET=${USE_SOCKET}
|
||||
APP_CPPFLAGS += -DUSE_SPINE=${USE_SPINE}
|
||||
APP_CPPFLAGS += -DUSE_DRAGONBONES=${USE_DRAGONBONES}
|
||||
APP_CPPFLAGS += -DCC_USE_TIFF=${USE_TIFF}
|
||||
APP_CPPFLAGS += -DUSE_MIDDLEWARE=${USE_MIDDLEWARE}
|
||||
APP_CPPFLAGS += -DUSE_PARTICLE=${USE_PARTICLE}
|
||||
|
||||
ifeq ($(NDK_DEBUG),1)
|
||||
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
|
||||
APP_CFLAGS += -DCOCOS2D_DEBUG=1
|
||||
APP_OPTIM := debug
|
||||
else
|
||||
APP_CPPFLAGS += -DNDEBUG
|
||||
APP_CFLAGS += -DNDEBUG
|
||||
APP_OPTIM := release
|
||||
endif
|
||||
|
||||
# Some Android Simulators don't support SSE instruction, so disable it for x86 arch.
|
||||
APP_CPPFLAGS += -U__SSE__
|
||||
@@ -0,0 +1,53 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "cocos2d.h"
|
||||
#include "platform/android/jni/JniHelper.h"
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
|
||||
#define LOG_TAG "main"
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
||||
using namespace cocos2d;
|
||||
|
||||
//called when JNI_OnLoad()
|
||||
void cocos_jni_env_init(JNIEnv *env)
|
||||
{
|
||||
LOGD("cocos_jni_env_init");
|
||||
}
|
||||
|
||||
//called when onSurfaceCreated()
|
||||
Application *cocos_android_app_init(JNIEnv *env, int width, int height)
|
||||
{
|
||||
LOGD("cocos_android_app_init");
|
||||
auto app = new AppDelegate(width, height);
|
||||
return app;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
/*JNI_CALL_FUNCTION*/
|
||||
}
|
||||
Reference in New Issue
Block a user