diff --git a/spine-cocos2dx/README.md b/spine-cocos2dx/README.md index ad1ff1bcf..5f70e8d75 100644 --- a/spine-cocos2dx/README.md +++ b/spine-cocos2dx/README.md @@ -47,13 +47,12 @@ The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android. 2. Install CMake via the [Windows installer package](https://cmake.org/download/). 3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above. 4. Run CMake GUI from the start menu -5. Click `Browse Source` and select the directory `spine-runtimes` -6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build` directory. You can create the `build` folder directly in the file dialog via `New Folder`. -7. Click `Configure`. Check `SPINE_COCOS2D_X` -8. Click `Configure` again. 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. -7. Open the file `spine-cocos2dx\example\cocos2d\cocos\2d\cocos2dx.props` and remove the `libSpine.lib` entry from the `` tag. +5. Click `Browse Source` and select the directory `spine-runtimes/spine-cocos2dx/` +6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build/` directory. You can create the `build` folder directly in the file dialog via `New Folder`. +7. Click `Configure` again. 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. +8. Open the file `spine-cocos2dx\example\cocos2d\cocos\2d\cocos2dx.props` and remove the `libSpine.lib` entry from the `` tag. 8. Open the `spine-runtimes/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.sln` file in Visual Studio 2019. Visual Studio may ask you to install the Windows XP/7 SDK, which you should install. -9. Expand `References` of the libcocos2d sub project, and remove the entry for `libSpine`, which should be marked with an error. +9. Expand `References` of the `libcocos2d` sub project, and remove the entry for `libSpine`, which should be marked with an error. 9. Right click the `spine-cocos2d-x` project in the solution explorer and select `Set as Startup Project` from the context menu 10. Click `Local Windows Debugger` to run the example @@ -83,19 +82,20 @@ The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android. ### Cocos2d-x v4.x +Please note the [new prerequisits to compile Cocos2d-x v4 projects on different platforms](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/prerequisites.html). This includes an installation of Python 2.7.x! + #### Windows 1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx) 2. Install CMake via the [Windows installer package](https://cmake.org/download/). 3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above. 4. Run CMake GUI from the start menu 5. Click `Browse Source` and select the directory `spine-runtimes` -6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build` directory. You can create the `build` folder directly in the file dialog via `New Folder`. -7. Click `Configure`. Check `SPINE_COCOS2D_X` +6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build-v4` directory. You can create the `build-v4` folder directly in the file dialog via `New Folder`. +7. Click `Configure`. Check `USE_COCOS2DX_V4` 8. Click `Configure` again. 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. -7. Open the file `spine-cocos2dx\example\cocos2d\cocos\2d\cocos2dx.props` and remove the `libSpine.lib` entry from the `` tag. -8. Open the `spine-runtimes/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.sln` file in Visual Studio 2019. Visual Studio may ask you to install the Windows XP/7 SDK, which you should install. -9. Expand `References` of the libcocos2d sub project, and remove the entry for `libSpine`, which should be marked with an error. -9. Right click the `spine-cocos2d-x` project in the solution explorer and select `Set as Startup Project` from the context menu +9. Click `Generate` this will create the Visual Studio solution in `spine-runtimes/spine-cocos2dx/build-v4`. +8. Open the `spine-runtimes/spine-cocos2dx/build-v4/spine-cocos2dx-example.sln` file in Visual Studio 2019. Visual Studio may ask you to install the Windows XP/7 SDK, which you should install. +9. Right click the `spine-cocos2dx-example` project in the solution explorer and select `Set as Startup Project` from the context menu 10. Click `Local Windows Debugger` to run the example #### macOS diff --git a/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj b/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj index fa1df7380..ec0df170f 100644 --- a/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj +++ b/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj @@ -67,7 +67,7 @@ Disabled - $(EngineRoot)external;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories);$(_COCOS_HEADER_WIN32_BEGIN);$(_COCOS_HEADER_WIN32_END);$(SolutionDir)..\..\..\spine-cpp\spine-cpp\include;$(SolutionDir)..\..\src;$(IncludePath) + $(EngineRoot)external;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories);$(_COCOS_HEADER_WIN32_BEGIN);$(_COCOS_HEADER_WIN32_END);..\..\..\spine-cpp\spine-cpp\include;$(SolutionDir)..\..\src;$(IncludePath) WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) false EnableFastChecks @@ -203,14 +203,15 @@ xcopy "$(ProjectDir)..\Resources" "$(OutDir)\Resources" /D /E /I /F /Y - + - + + @@ -300,15 +301,16 @@ xcopy "$(ProjectDir)..\Resources" "$(OutDir)\Resources" /D /E /I /F /Y - + - + + diff --git a/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj.filters b/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj.filters index 8b7720b34..ec494f191 100644 --- a/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj.filters +++ b/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.vcxproj.filters @@ -27,15 +27,6 @@ spine-cocos2dx - - spine-cocos2dx - - - spine-cocos2dx - - - spine-cocos2dx - spine-cocos2dx @@ -249,6 +240,18 @@ src + + spine-cocos2dx + + + spine-cocos2dx + + + spine-cocos2dx + + + src + @@ -260,15 +263,6 @@ spine-cocos2dx - - spine-cocos2dx - - - spine-cocos2dx - - - spine-cocos2dx - spine-cocos2dx @@ -539,6 +533,18 @@ src + + spine-cocos2dx + + + spine-cocos2dx + + + spine-cocos2dx + + + src +