From 685e7a193c4e21e08c5852e8ac42667cc91e5bfb Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 25 Mar 2022 18:23:50 +0100 Subject: [PATCH] [cocos2dx] Fix Xcode project. --- spine-cocos2dx/CMakeLists.txt | 8 ++++---- spine-cocos2dx/README.md | 1 + .../spine-cocos2d-x.xcodeproj/project.pbxproj | 12 ++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/spine-cocos2dx/CMakeLists.txt b/spine-cocos2dx/CMakeLists.txt index 86f5c2b3a..90b8d0d35 100644 --- a/spine-cocos2dx/CMakeLists.txt +++ b/spine-cocos2dx/CMakeLists.txt @@ -6,13 +6,13 @@ set(EXAMPLE_DIR "${CMAKE_CURRENT_LIST_DIR}/example") option(USE_COCOS2DX_V4 "Use cocos2d-x version 4.0+" OFF) if(USE_COCOS2DX_V4) - set(COCOS_FOLDER_NAME "cocos2d-x-4.0") - set(COCOS_DOWNLOAD_URL "https://download.cocos.com/Cocos2D-X/${COCOS_FOLDER_NAME}.zip") + set(COCOS_FOLDER_NAME "cocos2d-x-4.0") + set(COCOS_DOWNLOAD_URL "https://digitalocean.cocos2d-x.org/Cocos2D-X/${COCOS_FOLDER_NAME}.zip") set(COCOS_SHORT_VERSION "v4") set(EXAMPLE_DIR "${CMAKE_CURRENT_LIST_DIR}/example-v4") else() set(COCOS_FOLDER_NAME "cocos2d-x-3.17.2") - set(COCOS_DOWNLOAD_URL "http://download.cocos.com/Cocos2D-X/${COCOS_FOLDER_NAME}.zip") + set(COCOS_DOWNLOAD_URL "https://digitalocean.cocos2d-x.org/Cocos2D-X/${COCOS_FOLDER_NAME}.zip") set(COCOS_SHORT_VERSION "v3") endif() @@ -25,7 +25,7 @@ endif() if (NOT EXISTS ${EXAMPLE_DIR}/cocos2d) if(NOT EXISTS ${EXAMPLE_DIR}/cocos2dx.zip) - message(STATUS "Downloading cocos2dx ${COCOS_SHORT_VERSION}, this may take some time!") + message(STATUS "Downloading cocos2dx ${COCOS_SHORT_VERSION} from ${COCOS_DOWNLOAD_URL}, this may take some time!") # download cocos2d-x package file(DOWNLOAD ${COCOS_DOWNLOAD_URL} "${EXAMPLE_DIR}/cocos2dx.zip" SHOW_PROGRESS) else() diff --git a/spine-cocos2dx/README.md b/spine-cocos2dx/README.md index 9592afe07..5bcfedb55 100644 --- a/spine-cocos2dx/README.md +++ b/spine-cocos2dx/README.md @@ -65,6 +65,7 @@ The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android. 5. Type `mkdir build && cd build && cmake ../..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea. 6. Open the Xcode project in `spine-runtimes/spine-cocos2dx/example/proj.ios_mac` 7. Expand the `cocos2d_libs.xcodeproj` sub project, delete the group `editor-support/spine`. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x. +8. Open `cocos2d_lib/audio/mac/CDXMacOSXSupport.h` and remove lines 43-46, deleting the `AudioSessionProperties` enum. This will allow cocos2d-x 3.7 to compile with the latest Xcode version. 8. Click the `Run` button or type `CMD+R` to run the example #### Android (on macOS) diff --git a/spine-cocos2dx/example/proj.ios_mac/spine-cocos2d-x.xcodeproj/project.pbxproj b/spine-cocos2dx/example/proj.ios_mac/spine-cocos2d-x.xcodeproj/project.pbxproj index 50f1e7db3..1b0579bc9 100644 --- a/spine-cocos2dx/example/proj.ios_mac/spine-cocos2d-x.xcodeproj/project.pbxproj +++ b/spine-cocos2dx/example/proj.ios_mac/spine-cocos2d-x.xcodeproj/project.pbxproj @@ -46,6 +46,10 @@ 521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */; }; 52B47A471A53D09C004E4C60 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52B47A461A53D09B004E4C60 /* Security.framework */; }; 7602C5551D7DAA1300C7C674 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7602C5541D7DAA1300C7C674 /* CoreText.framework */; }; + 76268DDB27EE05E200D1B4E1 /* Sequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76268DD827EE05E200D1B4E1 /* Sequence.cpp */; }; + 76268DDC27EE05E200D1B4E1 /* Sequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76268DD827EE05E200D1B4E1 /* Sequence.cpp */; }; + 76268DDD27EE05E200D1B4E1 /* SequenceTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76268DDA27EE05E200D1B4E1 /* SequenceTimeline.cpp */; }; + 76268DDE27EE05E200D1B4E1 /* SequenceTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76268DDA27EE05E200D1B4E1 /* SequenceTimeline.cpp */; }; 763104C320BC1B5E00927A1E /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048620BC1B5400927A1E /* Event.cpp */; }; 763104C420BC1B5E00927A1E /* PathConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048720BC1B5400927A1E /* PathConstraint.cpp */; }; 763104C520BC1B5E00927A1E /* ScaleTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048820BC1B5400927A1E /* ScaleTimeline.cpp */; }; @@ -305,6 +309,8 @@ 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; 52B47A461A53D09B004E4C60 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 7602C5541D7DAA1300C7C674 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; + 76268DD827EE05E200D1B4E1 /* Sequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sequence.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Sequence.cpp"; sourceTree = ""; }; + 76268DDA27EE05E200D1B4E1 /* SequenceTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SequenceTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SequenceTimeline.cpp"; sourceTree = ""; }; 7631048620BC1B5400927A1E /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Event.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Event.cpp"; sourceTree = ""; }; 7631048720BC1B5400927A1E /* PathConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathConstraint.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathConstraint.cpp"; sourceTree = ""; }; 7631048820BC1B5400927A1E /* ScaleTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScaleTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp"; sourceTree = ""; }; @@ -624,6 +630,8 @@ 76AAA3B21D180F7300C54FCB /* spine */ = { isa = PBXGroup; children = ( + 76268DD827EE05E200D1B4E1 /* Sequence.cpp */, + 76268DDA27EE05E200D1B4E1 /* SequenceTimeline.cpp */, 76798D1C22A95AB300F77964 /* ConstraintData.cpp */, 763104B620BC1B5C00927A1E /* Animation.cpp */, 7631049B20BC1B5600927A1E /* AnimationState.cpp */, @@ -919,6 +927,7 @@ 76AAA4111D18106000C54FCB /* spine-cocos2dx.cpp in Sources */, 763104FC20BC1B5E00927A1E /* PathConstraintData.cpp in Sources */, 763104DC20BC1B5E00927A1E /* Atlas.cpp in Sources */, + 76268DDD27EE05E200D1B4E1 /* SequenceTimeline.cpp in Sources */, 763104FF20BC1B5E00927A1E /* TranslateTimeline.cpp in Sources */, 763104C320BC1B5E00927A1E /* Event.cpp in Sources */, 763104DA20BC1B5E00927A1E /* TextureLoader.cpp in Sources */, @@ -929,6 +938,7 @@ 763104DE20BC1B5E00927A1E /* Skeleton.cpp in Sources */, 76AAA3C21D180F7C00C54FCB /* GoblinsExample.cpp in Sources */, 763104FB20BC1B5E00927A1E /* DeformTimeline.cpp in Sources */, + 76268DDB27EE05E200D1B4E1 /* Sequence.cpp in Sources */, 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */, 503AE10117EB989F00D1A890 /* main.m in Sources */, 76F1083B239FC8DA005B0CE9 /* SkeletonBatch.cpp in Sources */, @@ -961,6 +971,7 @@ 767D80E422B2A003000BD703 /* MixAndMatchExample.cpp in Sources */, 76798D1E22A95AEF00F77964 /* ConstraintData.cpp in Sources */, 7631059E20BC1B9700927A1E /* Animation.cpp in Sources */, + 76268DDC27EE05E200D1B4E1 /* Sequence.cpp in Sources */, 7631059F20BC1B9700927A1E /* AnimationState.cpp in Sources */, 763105A020BC1B9700927A1E /* AnimationStateData.cpp in Sources */, 763105A120BC1B9700927A1E /* Atlas.cpp in Sources */, @@ -1036,6 +1047,7 @@ 76AAA4461D1811B000C54FCB /* SpineboyExample.cpp in Sources */, 76AAA4471D1811B000C54FCB /* SpineboyExample.h in Sources */, 76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */, + 76268DDE27EE05E200D1B4E1 /* SequenceTimeline.cpp in Sources */, 76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */, 76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */, 76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */,