Skip to content

Commit c5e5d51

Browse files
committed
Improve build instructions
1 parent 10bb65a commit c5e5d51

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

README.md

+21-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Because my game uses mod-tracker music inspired by Deus-Ex, and it also makes lo
88

99
## Where can I find a pre-built addon?
1010

11-
Just go to the prebuilt branch and use the download ZIP feature of Github, extract it into your project and you're done!
11+
Just go to the prebuilt branch and use the download ZIP feature of Github, or use "Releases" on the side, extract it into your project and you're done!
1212

1313
If you want to take a look at a commit that's more recent, then you can download the addon as a CI build artifact from the Github workflow action.
1414

@@ -18,7 +18,7 @@ Unfortunately there are no MacOS, Android, iOS, or any 32-bit binaries currently
1818

1919
For information on what functions you can use either look at the source code, or look at the in-editor docs for the types `AudioStreamMPT` and `AudioStreamPlaybackMPT`.
2020

21-
There is no official written documentation for the time being, but just the function names and parameter names should most likely be helpful enough; and if you know any amount of C++, the code should be pretty easy to parse.
21+
There is no official written documentation for the time being, but just the function names and parameter names should most likely be helpful enough; and if you know any amount of C++ the code should be pretty easy to parse.
2222

2323
## What platforms does it support?
2424

@@ -34,30 +34,37 @@ It has been tested on Windows and Linux. MacOS might work but you're on your own
3434

3535
### godot-cpp (both platforms)
3636

37-
If you're on Windows, you'll still want to use CMake from the terminal and not from Visual Studio like recommended below.
37+
If you're on Windows use the Visual Studio 2022 CMake integration; though you'll want to use CMake from a Visual Studio Developer Command Prompt terminal and probably not from Visual Studio itself (though you could, it's just probably easier to do it from a terminal).
3838

3939
Open the `custom-godotcpp-build` directory in the terminal. Here we'll use CMake with this as the source *and* the binary directory (this is required for the main build script to work).
4040

4141
There is an optional define called `GENERATE_DEBUG_SYMBOLS`, this is the reason we need a custom build script in the first place.
42-
If you're developing and ran into an error in GodotCPP, feel free to turn it on, but if you're just building this for any other reason define it to be `OFF` (`-DGENERATE_DEBUG_SYMBOLS=OFF`).
42+
If you're developing and ran into an error in godot-cpp OR libopenmpt itself, feel free to turn it on. But if you're just building this for any other reason define it to be `OFF` (`-DGENERATE_DEBUG_SYMBOLS=OFF`).
4343
Otherwise, the binaries will end up being pretty big (perhaps so big that Github won't even let you push the files anymore!), so use with caution.
4444

45-
If you want to build both `Release` and `Debug` versions you'll have to define the `CMAKE_BUILD_TYPE`, then delete all the extra CMake generated files (other than the `bin` and `gen` directories)
45+
You can run something like this: ``cmake . -G Ninja -DGENERATE_DEBUG_SYMBOLS=OFF -DCMAKE_BUILD_TYPE=<INSERT EITHER Release OR Debug HERE>``
46+
Then run `ninja`, the generator we defined; which is recommended since it's fast and comes with VS:
47+
``ninja``
48+
49+
If you want to build both `Release` and `Debug` versions you'll have to define the `CMAKE_BUILD_TYPE` for one of them, then delete all the extra CMake generated files (other than the `bin` and `gen` directories, do NOT delete `CMakeLists.txt`!!!)
4650
then define `CMAKE_BUILD_TYPE` again as the opposite value. This will generate both required libraries for `Release` and `Debug`.
4751

4852
## Windows Build Instructions
4953

5054
### Requirements
5155

52-
I recommend using Visual Studio 2022 and its CMake integration.
56+
I recommend using Visual Studio 2022 and its CMake integration, but through a Visual Studio Developer Command Prompt; which comes with VS2022.
5357

5458
### The Addon
5559

56-
Open the root repository directory in Visual Studio 2022 and build it in `x64-Debug`.
60+
This is pretty similar to building godot-cpp.
61+
62+
Run CMake in the root repository directory `cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=<INSERT EITHER Release OR Debug HERE>`,
63+
then `cd build && ninja`.
5764

58-
Create a configuration for `x64-Release` setting the build type appropriately in the panel, build that as well.
65+
You can run it again for the opposite configuration if you want both debug and release.
5966

60-
After this is done you will have both `.dll`s in the `bin` directory of the addon folder.
67+
After this is done you will have a `.dll` file(s) in the `bin` directory of the addon folder.
6168

6269
## Linux Build Instructions
6370

@@ -68,9 +75,13 @@ Also recommended is `ninja-build` for the build system.
6875

6976
### The Addon
7077

71-
Run CMake in the root repository directory, in this case `cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=<INSERT EITHER Release OR Debug HERE>`,
78+
It's pretty much the same as the Windows instructions:
79+
80+
Run CMake in the root repository directory, `cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=<INSERT EITHER Release OR Debug HERE>`,
7281
then `cd build && ninja`.
7382

83+
You can run it again for the opposite configuration if you want both debug and release.
84+
7485
After this is done you will have a `.so` file(s) in the `bin` directory of the addon folder.
7586

7687
## After Build
@@ -82,4 +93,3 @@ You now can play your mod-tracker formats as a regular audio stream (and even ma
8293

8394
Open an issue, I'll be happy to take a look. I can't guarantee support though, I'm just a solo hobby developer, but I'm more than willing to take feedback or try to help if I can.
8495

85-
# This code is experimental, however it is functional (at least on my machine)

addons/godot-openmpt/openmpt.gdextension

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ compatibility_minimum = "4.2"
55

66
[libraries]
77

8-
macos.debug = "bin/libgdmpt-macos.debug.64.framework"
9-
macos.release = "bin/libgdmpt-macos.release.64.framework"
108
windows.debug.x86_64 = "bin/libgdmpt-windows.debug.64.dll"
119
windows.release.x86_64 = "bin/libgdmpt-windows.release.64.dll"
1210
linux.debug.x86_64 = "bin/libgdmpt-linux.debug.64.so"

0 commit comments

Comments
 (0)