Skip to content

rrcenter/cocos2d-x-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cocos2d-x

Games

  1. https://play.google.com/store/apps/details?id=com.sosc.firstfantasy1

tested

  1. cocos command 3.8.1 with ndk-r10d

    cocos run -p android --android-studio --app-abi armeabi-v7a:arm64-v8a
    cocos run -p android --android-studio --app-abi armeabi-v7a:arm64-v8a -m release
    
  2. cocos command 3.8.1 with ndk-r14b

    cocos run -p android --android-studio --app-abi armeabi-v7a:arm64-v8a:x86
    cocos run -p android --android-studio --app-abi armeabi-v7a:arm64-v8a:x86 -m release
    
  3. hellolua with win32 (vs2019)/android studio project(3.2.1)

setup

  • ? Android Studio 3.2.1 (Mac/Windows)
  • Android Studio 4.1.2 (Windows)
  • Android Studio Ladybug | 2024.2.1 Patch 2
  • NDK: r10d / r14b / r16b
  • PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
  • keystore config with gradle.properties:
    keytool.exe -genkey -v -keystore app.keystore -alias android -keyalg RSA -keysize 2048 -validity 20000 -dname "CN=Android,O=Android,C=US"
    

Set Android NDK location:

  1. Update libs to 3.16

    • libjpeg
    • libpng (1.6.16)
    • libtiff (20120922)
    • libwebp
    • libcurl (7.52.1)
    • openssl (OpenSSL 1.1.0c 10 Nov 2016)
    • zlib (1.2.8)
  2. Remove armeabi

  3. Not build http & websocket (maybe rebuild old curl version to support http)

  4. Android Studio support

  5. Keep iOS,Android,Win32,Mac platform

  6. Remove Javascript

  7. Add void CCScheduler::performFunctionInCocosThread(const std::function<void ()> &function)

    CCLog("> Current cocos thread = %lu", std::hash<std::thread::id>{}(std::this_thread::get_id()));
    std::thread th ([pDirector]() {
        CCLog("> Hello from thread = %lu", std::hash<std::thread::id>{}(std::this_thread::get_id()));
        pDirector->getScheduler()->performFunctionInCocosThread([]() {
            CCLog("> Hello from cocos thread = %lu", std::hash<std::thread::id>{}(std::this_thread::get_id()));
        });
    });
    th.join();
  8. Support 64bit Android

  9. c++11 runtime

  10. libwebsocket support Android arm64

  11. ImGui 1.79 on macOS

  12. fix getFileData crash when multi thread

  13. Preserve EGL context when the GLSurfaceView is paused

  14. http: SSL certificate problem: unable to get local issuer certificate ( CURLOPT_SSL_VERIFYPEER, 1L CURLOPT_SSL_VERIFYHOST, 2L )

TODO

  1. NDK >= r13b
  2. NDK = 16.1.4479499
  3. openjdk@11

Android ENV

export ANDROID_SDK_ROOT=~/Library/Android/sdk export ANDROID_HOME=$ANDROID_SDK_ROOT export NDK_HOME=$ANDROID_SDK_ROOT/ndk/16.1.4479499 export ANDROID_NDK_HOME=$NDK_HOME export JAVA_HOME="/usr/local/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home"

cocos2d-x is a multi-platform 2D game framework in C++, branched on cocos2d-iphone and licensed under MIT.

ref

https://forum.cocos.org/t/cocos2d-x3-17-as3-6-make-no-rule-to-make-target-cocos2dlua-stop/89479/4

compileSdkVersion 27
buildToolsVersion '28.0.3'
minSdkVersion 18
targetSdkVersion 27
classpath 'com.android.tools.build:gradle:3.4.0'
sdk.dir=/path/to/sdk
ndk.dir=/path/to/android-ndk-r16b
PROP_APP_ABI=armeabi-v7a:arm64-v8a
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-bin.zip

more

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published