mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[sfml] Update sample instructions
This commit is contained in:
parent
e81ad9072d
commit
072d5f1539
@ -33,10 +33,10 @@ The Spine SFML example works on Windows, Linux and Mac OS X.
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
1. Install [Visual Studio 2022 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx). Make sure you install support for C++, CMake, as well as th Windows SDK for XP/7/8.
|
1. Install [Visual Studio 2022 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx). Make sure you install support for C++, CMake as well as th Windows SDK for XP/7/8.
|
||||||
2. 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.
|
1. Open Visual Studio and open the `spine-sfml/c` folder via the `Open a local folder` button
|
||||||
|
1. Let CMake finish, then select `spine-sfml-cpp-example.exe` as the start-up project
|
||||||
The entire example code is contained in [main.cpp](example/main.cpp#L61)
|
1. Start debugging to run the example
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ The entire example code is contained in [main.cpp](example/main.cpp#L61)
|
|||||||
4. Open a terminal, and `cd` into the `spine-runtimes/spine-sfml/c` folder
|
4. Open a terminal, and `cd` into the `spine-runtimes/spine-sfml/c` folder
|
||||||
5. Type `mkdir build && cd build && cmake ..` to generate Make files
|
5. Type `mkdir build && cd build && cmake ..` to generate Make files
|
||||||
6. Type `make -j8` to compile the example
|
6. Type `make -j8` to compile the example
|
||||||
7. Run the example by `./spine-sfml-c-example`
|
7. Run the example via `./spine-sfml-c-example`
|
||||||
|
|
||||||
### Mac OS X
|
### Mac OS X
|
||||||
|
|
||||||
|
|||||||
@ -33,20 +33,10 @@ The Spine SFML example works on Windows, Linux and Mac OS X.
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
1. Install [Visual Studio 2022 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx). Make sure you install support for C++ as well as th Windows SDK for XP/7/8.
|
1. Install [Visual Studio 2022 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx). Make sure you install support for C++, CMake as well as th Windows SDK for XP/7/8.
|
||||||
2. Install CMake via the [Windows installer package](https://cmake.org/download/).
|
1. Open Visual Studio and open the `spine-sfml/cpp` folder via the `Open a local folder` button
|
||||||
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.
|
1. Let CMake finish, then select `spine-sfml-cpp-example.exe` as the start-up project
|
||||||
4. Run CMake GUI from the start menu
|
1. Start debugging to run the example
|
||||||
5. Click `Browse Source` and select the directory `spine-runtimes`
|
|
||||||
6. Click `Browse Build` and select the `spine-runtimes/spine-sfml/build` directory. You can create the `build` folder directly in the file dialog via `New Folder`.
|
|
||||||
7. Click `Configure`. Check `SPINE_SFML`. Then click `Generate`. This will create a Visual Studio 2015 solution file called `spine.sln` in `spine-runtimes/spine-sfml/build` and also download the SFML dependencies.
|
|
||||||
8. Open the `spine.sln` file in Visual Studio 2022
|
|
||||||
9. Right click the `spine-sfml-cpp-example` project in the solution explorer and select `Set as Startup Project` from the context menu
|
|
||||||
10. Right click the `spine-sfml-cpp-example` project in the solution explorer and select `Properties` from the context menu
|
|
||||||
11. Select `Debugging` in the left-hand list, then set `Working Directory` to `$(OutputPath)`
|
|
||||||
12. Click `Local Windows Debugger` to run the example
|
|
||||||
|
|
||||||
The entire example code is contained in [main.cpp](example/main.cpp)
|
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
@ -56,7 +46,7 @@ The entire example code is contained in [main.cpp](example/main.cpp)
|
|||||||
4. Open a terminal, and `cd` into the `spine-runtimes/spine-sfml/cpp` folder
|
4. Open a terminal, and `cd` into the `spine-runtimes/spine-sfml/cpp` folder
|
||||||
5. Type `mkdir build && cd build && cmake ../..` to generate Make files
|
5. Type `mkdir build && cd build && cmake ../..` to generate Make files
|
||||||
6. Type `make` to compile the example
|
6. Type `make` to compile the example
|
||||||
7. Run the example by `cd spine-sfml && ./spine-sfml-example`
|
7. Run the example via `./spine-sfml-cpp-example`
|
||||||
|
|
||||||
### Mac OS X
|
### Mac OS X
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user