mirror of https://github.com/axmolengine/axmol.git
Update a bunch of JS projects for android
This commit is contained in:
parent
23061fb312
commit
5531272979
|
@ -10,11 +10,16 @@
|
|||
<application android:label="@string/app_name"
|
||||
android:icon="@drawable/icon">
|
||||
|
||||
<activity android:name=".CocosDragonJS"
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize">
|
||||
|
||||
<!-- Tell NativeActivity the name of our .so -->
|
||||
<meta-data android:name="android.app.lib_name"
|
||||
android:value="cocosdragonjs" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
@ -16,6 +16,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
|
|||
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += scriptingcore-spidermonkey
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
|
||||
|
||||
LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT
|
||||
|
||||
|
@ -26,3 +27,4 @@ $(call import-module,CocosDenshion/android)
|
|||
$(call import-module,external/chipmunk)
|
||||
$(call import-module,scripting/javascript/spidermonkey-android)
|
||||
$(call import-module,scripting/javascript/bindings)
|
||||
$(call import-module,cocos2dx/platform/android)
|
||||
|
|
|
@ -10,35 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
{
|
||||
JniHelper::setJavaVM(vm);
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
|
||||
{
|
||||
if (!Director::getInstance()->getOpenGLView())
|
||||
{
|
||||
EGLView *view = EGLView::getInstance();
|
||||
view->setFrameSize(w, h);
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
Application::getInstance()->run();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL::invalidateStateCache();
|
||||
ShaderCache::getInstance()->reloadDefaultShaders();
|
||||
DrawPrimitives::init();
|
||||
TextureCache::reloadAllTextures();
|
||||
NotificationCenter::getInstance()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
|
||||
Director::getInstance()->setGLDefaultValues();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-10
|
||||
target=android-13
|
||||
|
||||
android.library.reference.1=../../../../cocos2dx/platform/android/java
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
No Java files
|
|
@ -1,39 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
package org.cocos2dx.cocosdragonjs;
|
||||
|
||||
import org.cocos2dx.lib.Cocos2dxActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class CocosDragonJS extends Cocos2dxActivity{
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
static {
|
||||
System.loadLibrary("cocosdragonjs");
|
||||
}
|
||||
}
|
|
@ -10,11 +10,16 @@
|
|||
<application android:label="@string/app_name"
|
||||
android:icon="@drawable/icon">
|
||||
|
||||
<activity android:name=".CrystalCraze"
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize">
|
||||
|
||||
<!-- Tell NativeActivity the name of our .so -->
|
||||
<meta-data android:name="android.app.lib_name"
|
||||
android:value="crystalcraze" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
@ -16,6 +16,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
|
|||
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += scriptingcore-spidermonkey
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
|
||||
|
||||
LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT
|
||||
|
||||
|
@ -26,3 +27,4 @@ $(call import-module,CocosDenshion/android)
|
|||
$(call import-module,external/chipmunk)
|
||||
$(call import-module,scripting/javascript/spidermonkey-android)
|
||||
$(call import-module,scripting/javascript/bindings)
|
||||
$(call import-module,cocos2dx/platform/android)
|
||||
|
|
|
@ -10,35 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
{
|
||||
JniHelper::setJavaVM(vm);
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
|
||||
{
|
||||
if (!Director::getInstance()->getOpenGLView())
|
||||
{
|
||||
EGLView *view = EGLView::getInstance();
|
||||
view->setFrameSize(w, h);
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
Application::getInstance()->run();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL::invalidateStateCache();
|
||||
ShaderCache::getInstance()->reloadDefaultShaders();
|
||||
DrawPrimitives::init();
|
||||
TextureCache::reloadAllTextures();
|
||||
NotificationCenter::getInstance()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
|
||||
Director::getInstance()->setGLDefaultValues();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-10
|
||||
target=android-13
|
||||
|
||||
android.library.reference.1=../../../../cocos2dx/platform/android/java
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
No Java files
|
|
@ -1,39 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
package org.cocos2dx.crystalcraze;
|
||||
|
||||
import org.cocos2dx.lib.Cocos2dxActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class CrystalCraze extends Cocos2dxActivity{
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
static {
|
||||
System.loadLibrary("crystalcraze");
|
||||
}
|
||||
}
|
|
@ -10,11 +10,16 @@
|
|||
<application android:label="@string/app_name"
|
||||
android:icon="@drawable/icon">
|
||||
|
||||
<activity android:name=".MoonWarriors"
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize">
|
||||
|
||||
<!-- Tell NativeActivity the name of our .so -->
|
||||
<meta-data android:name="android.app.lib_name"
|
||||
android:value="moonwarriors" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
@ -16,6 +16,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
|
|||
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += scriptingcore-spidermonkey
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
|
||||
|
||||
LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT
|
||||
|
||||
|
@ -26,3 +27,4 @@ $(call import-module,CocosDenshion/android)
|
|||
$(call import-module,external/chipmunk)
|
||||
$(call import-module,scripting/javascript/spidermonkey-android)
|
||||
$(call import-module,scripting/javascript/bindings)
|
||||
$(call import-module,cocos2dx/platform/android)
|
||||
|
|
|
@ -10,35 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
{
|
||||
JniHelper::setJavaVM(vm);
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
|
||||
{
|
||||
if (!Director::getInstance()->getOpenGLView())
|
||||
{
|
||||
EGLView *view = EGLView::getInstance();
|
||||
view->setFrameSize(w, h);
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
Application::getInstance()->run();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL::invalidateStateCache();
|
||||
ShaderCache::getInstance()->reloadDefaultShaders();
|
||||
DrawPrimitives::init();
|
||||
TextureCache::reloadAllTextures();
|
||||
NotificationCenter::getInstance()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
|
||||
Director::getInstance()->setGLDefaultValues();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-10
|
||||
target=android-13
|
||||
|
||||
android.library.reference.1=../../../../cocos2dx/platform/android/java
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
No Java files
|
|
@ -1,39 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
package org.cocos2dx.moonwarriors;
|
||||
|
||||
import org.cocos2dx.lib.Cocos2dxActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class MoonWarriors extends Cocos2dxActivity{
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
static {
|
||||
System.loadLibrary("moonwarriors");
|
||||
}
|
||||
}
|
|
@ -10,11 +10,16 @@
|
|||
<application android:label="@string/app_name"
|
||||
android:icon="@drawable/icon">
|
||||
|
||||
<activity android:name="org.cocos2dx.watermelonwithme.WatermelonWithMe"
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize">
|
||||
|
||||
<!-- Tell NativeActivity the name of our .so -->
|
||||
<meta-data android:name="android.app.lib_name"
|
||||
android:value="watermelonwithme" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
@ -16,6 +16,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
|
|||
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += scriptingcore-spidermonkey
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
|
||||
|
||||
LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT
|
||||
|
||||
|
@ -26,3 +27,4 @@ $(call import-module,CocosDenshion/android)
|
|||
$(call import-module,external/chipmunk)
|
||||
$(call import-module,scripting/javascript/spidermonkey-android)
|
||||
$(call import-module,scripting/javascript/bindings)
|
||||
$(call import-module,cocos2dx/platform/android)
|
||||
|
|
|
@ -10,35 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
jint JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||
{
|
||||
JniHelper::setJavaVM(vm);
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
|
||||
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
|
||||
{
|
||||
if (!Director::getInstance()->getOpenGLView())
|
||||
{
|
||||
EGLView *view = EGLView::getInstance();
|
||||
view->setFrameSize(w, h);
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
Application::getInstance()->run();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL::invalidateStateCache();
|
||||
ShaderCache::getInstance()->reloadDefaultShaders();
|
||||
DrawPrimitives::init();
|
||||
TextureCache::reloadAllTextures();
|
||||
NotificationCenter::getInstance()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
|
||||
Director::getInstance()->setGLDefaultValues();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-10
|
||||
target=android-13
|
||||
|
||||
android.library.reference.1=../../../../cocos2dx/platform/android/java
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
No Java files
|
|
@ -1,39 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
****************************************************************************/
|
||||
package org.cocos2dx.watermelonwithme;
|
||||
|
||||
import org.cocos2dx.lib.Cocos2dxActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class WatermelonWithMe extends Cocos2dxActivity{
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
static {
|
||||
System.loadLibrary("watermelonwithme");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue