Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2020-04-01 20:36:04 +01:00
commit e324d40c5b

View file

@ -9,8 +9,8 @@ Branch | Description
[accurate](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/accurate) | The main decompilation branch. The code intended to be as close to the original as possible, down to all the bugs and platform-dependencies. [accurate](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/accurate) | The main decompilation branch. The code intended to be as close to the original as possible, down to all the bugs and platform-dependencies.
[portable](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/portable) | This branch ports the engine to SDL2, and addresses numerous portability issues, allowing it to run on other platforms. [portable](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/portable) | This branch ports the engine to SDL2, and addresses numerous portability issues, allowing it to run on other platforms.
[enhanced](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/enhanced) | Based on the portable branch, this adds several enhancements to the engine, and makes it more accessible to modders. [enhanced](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/enhanced) | Based on the portable branch, this adds several enhancements to the engine, and makes it more accessible to modders.
[emscripten](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/emscripten) | Modifies the engine to build with Emscripten, [allowing it to run in web browsers](http://sonicresearch.org/clownacy/cave.html). [emscripten](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/emscripten) | Modifies the engine to build with Emscripten, [allowing it to run in web browsers](http://sonicresearch.org/clownacy/cave.html) (no longer maintained).
[wii](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/wii) | Ports the engine to the Nintendo Wii. [wii](https://www.github.com/Clownacy/Cave-Story-Engine-2/tree/wii) | Ports the engine to the Nintendo Wii (no longer maintained).
# Cave Story Engine 2 (Portable) # Cave Story Engine 2 (Portable)
@ -50,12 +50,14 @@ Many months of copypasting and tinkering later, here is the result.
This project primarily uses CMake, allowing it to be built with a range of compilers. This project primarily uses CMake, allowing it to be built with a range of compilers.
In this folder, create another folder called 'build', then switch to the command-line (Visual Studio users should open the [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)) and `cd` into it. After that, generate the files for your build system with: Switch to the terminal (Visual Studio users should open the [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)) and `cd` into this folder. After that, generate the files for your build system with:
``` ```
cmake .. -DCMAKE_BUILD_TYPE=Release cmake -B build -DCMAKE_BUILD_TYPE=Release
``` ```
MSYS2 users may want to append `-G"MSYS Makefiles"` to this command, also.
You can also add the following flags: You can also add the following flags:
Name | Function Name | Function
@ -72,7 +74,7 @@ Name | Function
`-DBACKEND_AUDIO=miniaudio` | Use the miniaudio-driven software audio-mixer `-DBACKEND_AUDIO=miniaudio` | Use the miniaudio-driven software audio-mixer
`-DLTO=ON` | Enable link-time optimisation `-DLTO=ON` | Enable link-time optimisation
`-DPKG_CONFIG_STATIC_LIBS=ON` | On platforms with pkg-config, static-link the dependencies (good for Windows builds, so you don't need to bundle DLL files) `-DPKG_CONFIG_STATIC_LIBS=ON` | On platforms with pkg-config, static-link the dependencies (good for Windows builds, so you don't need to bundle DLL files)
`-DMSVC_LINK_STATIC_RUNTIME=ON` | Link the static MSVC runtime library `-DMSVC_LINK_STATIC_RUNTIME=ON` | Link the static MSVC runtime library (Visual Studio only)
`-DFORCE_LOCAL_LIBS=ON` | Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones `-DFORCE_LOCAL_LIBS=ON` | Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones
You can pass your own compiler flags with `-DCMAKE_C_FLAGS` and `-DCMAKE_CXX_FLAGS`. You can pass your own compiler flags with `-DCMAKE_C_FLAGS` and `-DCMAKE_CXX_FLAGS`.
@ -80,14 +82,14 @@ You can pass your own compiler flags with `-DCMAKE_C_FLAGS` and `-DCMAKE_CXX_FLA
You can then compile CSE2 with this command: You can then compile CSE2 with this command:
``` ```
cmake --build . --config Release cmake --build build --config Release
``` ```
If you're a Visual Studio user, you can open the generated `CSE2.sln` file instead. If you're a Visual Studio user, you can open the generated `CSE2.sln` file instead, which can be found in the `build` folder.
Once built, the executables can be found in the `game_english`/`game_japanese` folder, depending on the selected language. Once built, the executables can be found in the `game_english`/`game_japanese` folder, depending on the selected language.
### Makefile ### Makefile \[deprecated - use CMake instead\]
*Note: this requires pkg-config* *Note: this requires pkg-config*
@ -115,4 +117,4 @@ Once built, the executables can be found in the `game_english`/`game_japanese` f
## Licensing ## Licensing
Being a decompilation, the majority of the code in this project belongs to Daisuke "Pixel" Amaya - not us. We've yet to agree on a license for our own code. Being a decompilation, the majority of the code in this project belongs to Daisuke "Pixel" Amaya - not us. We've yet to agree on a licence for our own code.