mirror of
https://github.com/blanking003/cx-cocos.git
synced 2025-10-30 02:45:33 +00:00
init
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cx3.blank.so"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.CALL_PHONE"/>
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:usesCleartextTraffic="true">
|
||||
|
||||
<meta-data android:name="android.app.lib_name"
|
||||
android:value="cocos" />
|
||||
|
||||
<meta-data android:name="com.amap.api.v2.apikey" android:value="94f84f93c7305329b9ebe12f761dbbac"/>
|
||||
|
||||
<activity
|
||||
android:name=".AppActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize|screenLayout"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:launchMode="singleTask"
|
||||
android:taskAffinity="" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
81
cx-framework3.1/cocos3-libs/cocos3-libso/app/build.gradle
Normal file
81
cx-framework3.1/cocos3-libs/cocos3-libso/app/build.gradle
Normal file
@@ -0,0 +1,81 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
RES_PATH = RES_PATH.replace("\\", "/")
|
||||
COCOS_ENGINE_PATH = COCOS_ENGINE_PATH.replace("\\", "/")
|
||||
|
||||
buildDir = "${RES_PATH}/build/$project.name"
|
||||
android {
|
||||
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
|
||||
buildToolsVersion PROP_BUILD_TOOLS_VERSION
|
||||
// ndkPath PROP_NDK_PATH
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId APPLICATION_ID
|
||||
minSdkVersion PROP_MIN_SDK_VERSION
|
||||
targetSdkVersion PROP_TARGET_SDK_VERSION
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
targets "cocos"
|
||||
arguments "-DRES_DIR=${RES_PATH}", "-DCOCOS_X_PATH=${COCOS_ENGINE_PATH}", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_LD=gold"
|
||||
cppFlags "-frtti -fexceptions -fsigned-char"
|
||||
}
|
||||
ndk { abiFilters PROP_APP_ABI.split(':') }
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "../engine/CMakeLists.txt"
|
||||
buildStagingDirectory "${RES_PATH}/build"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
manifest.srcFile "AndroidManifest.xml"
|
||||
java.srcDirs "src"
|
||||
jniLibs.srcDirs = ["libs"]
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
||||
storeFile file(RELEASE_STORE_FILE)
|
||||
storePassword RELEASE_STORE_PASSWORD
|
||||
keyAlias RELEASE_KEY_ALIAS
|
||||
keyPassword RELEASE_KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
debuggable false
|
||||
jniDebuggable false
|
||||
renderscriptDebuggable false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
debug {
|
||||
debuggable true
|
||||
jniDebuggable true
|
||||
renderscriptDebuggable true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
|
||||
}
|
||||
40
cx-framework3.1/cocos3-libs/cocos3-libso/app/proguard-rules.pro
vendored
Normal file
40
cx-framework3.1/cocos3-libs/cocos3-libso/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in E:\developSoftware\Android\SDK/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Proguard Cocos2d-x-lite for release
|
||||
-keep public class com.cocos.** { *; }
|
||||
-dontwarn com.cocos.**
|
||||
|
||||
# Proguard Apache HTTP for release
|
||||
-keep class org.apache.http.** { *; }
|
||||
-dontwarn org.apache.http.**
|
||||
|
||||
# Proguard okhttp for release
|
||||
-keep class okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
-keep class okio.** { *; }
|
||||
-dontwarn okio.**
|
||||
|
||||
# Proguard Android Webivew for release. you can comment if you are not using a webview
|
||||
-keep public class android.net.http.SslError
|
||||
-keep public class android.webkit.WebViewClient
|
||||
|
||||
-dontwarn android.webkit.WebView
|
||||
-dontwarn android.net.http.SslError
|
||||
-dontwarn android.webkit.WebViewClient
|
||||
@@ -0,0 +1,9 @@
|
||||
package cx3.blank.so;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
public class AppActivity extends Activity
|
||||
{
|
||||
|
||||
}
|
||||
28
cx-framework3.1/cocos3-libs/cocos3-libso/build.gradle
Normal file
28
cx-framework3.1/cocos3-libs/cocos3-libso/build.gradle
Normal file
@@ -0,0 +1,28 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
53
cx-framework3.1/cocos3-libs/cocos3-libso/engine/CMakeLists.txt
Executable file
53
cx-framework3.1/cocos3-libs/cocos3-libso/engine/CMakeLists.txt
Executable file
@@ -0,0 +1,53 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
option(APP_NAME "Project Name" "cx3-so")
|
||||
project(${APP_NAME} CXX)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/common/CMakeLists.txt)
|
||||
|
||||
|
||||
set(LIB_NAME cocos)
|
||||
|
||||
set(PROJ_SOURCES
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxCreator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxCreator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxDefine.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxIntf.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxIntf.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxJsb.hpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/cxJsb.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/Game.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/Game.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/jsb_module_register.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/jni/main.cpp
|
||||
)
|
||||
|
||||
# -------------- SRART ---------------
|
||||
# USED BY COCOS SERVICE, DON'T REMOVE!
|
||||
if(EXISTS ${RES_DIR}/service.cmake)
|
||||
set(SERVICE_NATIVE_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
include(${RES_DIR}/service.cmake)
|
||||
endif()
|
||||
# -------------- END ----------------
|
||||
|
||||
#list(APPEND PROJ_SOURCES
|
||||
# ${CMAKE_CURRENT_LIST_DIR}/../../../cx-native/jsb_module_register.cpp
|
||||
#)
|
||||
|
||||
add_library(${LIB_NAME} SHARED ${PROJ_SOURCES})
|
||||
|
||||
# -------------- SRART ---------------
|
||||
# USED BY COCOS SERVICE, DON'T REMOVE!
|
||||
if(COMMAND service_insert_library)
|
||||
service_insert_library()
|
||||
endif()
|
||||
# -------------- END ----------------
|
||||
|
||||
target_link_libraries(${LIB_NAME}
|
||||
"-Wl,--whole-archive" cocos2d_jni "-Wl,--no-whole-archive"
|
||||
cocos2d
|
||||
)
|
||||
|
||||
target_include_directories(${LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../cx-native
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"ndk_module_path" :[
|
||||
"${COCOS_ROOT}",
|
||||
"${COCOS_ROOT}/cocos",
|
||||
"${COCOS_ROOT}/external"
|
||||
],
|
||||
"copy_resources": []
|
||||
}
|
||||
13
cx-framework3.1/cocos3-libs/cocos3-libso/engine/cfg.cmake
Normal file
13
cx-framework3.1/cocos3-libs/cocos3-libso/engine/cfg.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
set(CC_USE_GLES3 ON)
|
||||
set(CC_USE_GLES2 ON)
|
||||
set(APP_NAME cx3-so)
|
||||
set(COCOS_X_PATH "/Applications/CocosCreator/Creator/3.1.1/CocosCreator.app/Contents/Resources/resources/3d/engine-native")
|
||||
set(CC_USE_VULKAN OFF)
|
||||
set(USE_PHYSICS_PHYSX OFF)
|
||||
set(USE_AUDIO ON)
|
||||
set(USE_VIDEO ON)
|
||||
set(USE_WEBVIEW ON)
|
||||
set(USE_SPINE OFF)
|
||||
set(USE_DRAGONBONES ON)
|
||||
set(USE_JOB_SYSTEM_TBB ON)
|
||||
|
||||
64
cx-framework3.1/cocos3-libs/cocos3-libso/engine/common/CMakeLists.txt
Executable file
64
cx-framework3.1/cocos3-libs/cocos3-libso/engine/common/CMakeLists.txt
Executable file
@@ -0,0 +1,64 @@
|
||||
enable_language(C ASM)
|
||||
|
||||
|
||||
set(DEVELOPMENT_TEAM "" CACHE STRING "APPLE Developtment Team")
|
||||
set(RES_DIR "" CACHE STRING "Resource path")
|
||||
set(COCOS_X_PATH "" CACHE STRING "Path to cocos2d-x-lite/")
|
||||
|
||||
set(TARGET_OSX_VERSION "10.14" CACHE STRING "Target MacOSX version" FORCE)
|
||||
set(TARGET_IOS_VERSION "12.0" CACHE STRING "Target iOS version" FORCE)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
option(USE_SE_V8 "Use V8 JavaScript Engine" ON)
|
||||
option(USE_V8_DEBUGGER "Enable Chrome Remote inspector" OFF)
|
||||
option(USE_SOCKET "Enable WebSocket & SocketIO" OFF)
|
||||
option(USE_AUDIO "Enable Audio" ON) #Enable AudioEngine
|
||||
option(USE_EDIT_BOX "Enable EditBox" ON)
|
||||
option(USE_SE_JSC "Use JavaScriptCore on MacOSX/iOS" OFF)
|
||||
option(USE_VIDEO "Enable VideoPlayer Component" ON)
|
||||
option(USE_WEBVIEW "Enable WebView Component" ON)
|
||||
option(USE_MIDDLEWARE "Enable Middleware" ON)
|
||||
option(USE_DRAGONBONES "Enable Dragonbones" ON)
|
||||
option(USE_SPINE "Enable Spine" OFF)
|
||||
option(USE_WEBSOCKET_SERVER "Enable WebSocket Server" OFF)
|
||||
option(USE_JOB_SYSTEM_TASKFLOW "Use taskflow as job system backend" OFF)
|
||||
option(USE_JOB_SYSTEM_TBB "Use tbb as job system backend" OFF)
|
||||
option(USE_PHYSICS_PHYSX "USE PhysX Physics" OFF)
|
||||
|
||||
if(NOT RES_DIR)
|
||||
message(FATAL_ERROR "RES_DIR is not set!")
|
||||
endif()
|
||||
|
||||
include(${RES_DIR}/engine/cfg.cmake)
|
||||
|
||||
if(NOT COCOS_X_PATH)
|
||||
message(FATAL_ERROR "COCOS_X_PATH is not set!")
|
||||
endif()
|
||||
|
||||
include(${COCOS_X_PATH}/CMakeLists.txt)
|
||||
|
||||
set(ASSET_FILES)
|
||||
macro(include_resources ARG_RES_ROOT)
|
||||
foreach(res ${ARG_RES_ROOT})
|
||||
set(res_list)
|
||||
if(NOT EXISTS ${res})
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(IS_DIRECTORY ${res})
|
||||
file(GLOB_RECURSE res_list "${res}/*")
|
||||
else()
|
||||
set(res_list ${res})
|
||||
endif()
|
||||
foreach(res ${res_list})
|
||||
get_filename_component(res_abs ${res} ABSOLUTE)
|
||||
file(RELATIVE_PATH res_rel ${ARG_RES_ROOT} ${res_abs})
|
||||
get_filename_component(res_dir ${res_rel} PATH)
|
||||
set_source_files_properties(${res_abs} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION "Resources/${res_dir}/"
|
||||
HEADER_FILE_ONLY 1
|
||||
)
|
||||
list(APPEND ASSET_FILES ${res_abs})
|
||||
endforeach()
|
||||
endforeach()
|
||||
endmacro()
|
||||
29
cx-framework3.1/cocos3-libs/cocos3-libso/engine/jni/main.cpp
Normal file
29
cx-framework3.1/cocos3-libs/cocos3-libso/engine/jni/main.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2017-2020 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 "Game.h"
|
||||
|
||||
cc::Application *cocos_main(int width, int height) {
|
||||
return new Game(width, height);
|
||||
}
|
||||
38
cx-framework3.1/cocos3-libs/cocos3-libso/gradle.properties
Normal file
38
cx-framework3.1/cocos3-libs/cocos3-libso/gradle.properties
Normal file
@@ -0,0 +1,38 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
android.injected.testOnly=false
|
||||
|
||||
# Android SDK version that will be used as the compile project
|
||||
PROP_COMPILE_SDK_VERSION=28
|
||||
|
||||
# Android SDK version that will be used as the earliest version of android this application can run on
|
||||
PROP_MIN_SDK_VERSION=21
|
||||
|
||||
# Android SDK version that will be used as the latest version of android this application has been tested on
|
||||
PROP_TARGET_SDK_VERSION=27
|
||||
|
||||
# Android Build Tools version that will be used as the compile project
|
||||
PROP_BUILD_TOOLS_VERSION=28.0.2
|
||||
|
||||
PROP_NDK_PATH=/Users/blank/Library/Android/sdk/ndk-bundle
|
||||
|
||||
# Cocos Engine Path
|
||||
COCOS_ENGINE_PATH=/Applications/CocosCreator/Creator/3.1.1/CocosCreator.app/Contents/Resources/resources/3d/engine-native
|
||||
|
||||
# Res path
|
||||
RES_PATH=/Users/blank/ccapp3/cx-framework3.1/cocos3-libs/cocos3-libso
|
||||
|
||||
# Application ID
|
||||
APPLICATION_ID=cx3.blank.so
|
||||
|
||||
# List of CPU Archtexture to build that application with
|
||||
# Available architextures (armeabi-v7a | arm64-v8a | x86)
|
||||
# To build for multiple architexture, use the `:` between them
|
||||
# Example - PROP_APP_ABI=armeabi-v7a
|
||||
#PROP_APP_ABI=armeabi-v7a:x86_64
|
||||
PROP_APP_ABI=armeabi-v7a
|
||||
|
||||
RELEASE_STORE_FILE=/Applications/CocosCreator/Creator/3.1.1/CocosCreator.app/Contents/Resources/tools/keystore/debug.keystore
|
||||
RELEASE_STORE_PASSWORD=123456
|
||||
RELEASE_KEY_ALIAS=debug_keystore
|
||||
RELEASE_KEY_PASSWORD=123456
|
||||
6
cx-framework3.1/cocos3-libs/cocos3-libso/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
cx-framework3.1/cocos3-libs/cocos3-libso/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Wed May 05 22:20:29 CST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
|
||||
164
cx-framework3.1/cocos3-libs/cocos3-libso/gradlew
vendored
Executable file
164
cx-framework3.1/cocos3-libs/cocos3-libso/gradlew
vendored
Executable file
@@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
90
cx-framework3.1/cocos3-libs/cocos3-libso/gradlew.bat
vendored
Normal file
90
cx-framework3.1/cocos3-libs/cocos3-libso/gradlew.bat
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,9 @@
|
||||
## This file must *NOT* be checked into Version Control Systems,
|
||||
# as it contains information specific to your local configuration.
|
||||
#
|
||||
# Location of the SDK. This is only used by Gradle.
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
#Wed May 05 22:19:02 CST 2021
|
||||
ndk.dir=/Users/blank/Library/Android/sdk/ndk-bundle
|
||||
sdk.dir=/Users/blank/Library/Android/sdk
|
||||
1
cx-framework3.1/cocos3-libs/cocos3-libso/settings.gradle
Normal file
1
cx-framework3.1/cocos3-libs/cocos3-libso/settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
include ':app'
|
||||
Reference in New Issue
Block a user