You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+21-11
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Because my game uses mod-tracker music inspired by Deus-Ex, and it also makes lo
8
8
9
9
## Where can I find a pre-built addon?
10
10
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!
12
12
13
13
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.
14
14
@@ -18,7 +18,7 @@ Unfortunately there are no MacOS, Android, iOS, or any 32-bit binaries currently
18
18
19
19
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`.
20
20
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.
22
22
23
23
## What platforms does it support?
24
24
@@ -34,30 +34,37 @@ It has been tested on Windows and Linux. MacOS might work but you're on your own
34
34
35
35
### godot-cpp (both platforms)
36
36
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).
38
38
39
39
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).
40
40
41
41
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`).
43
43
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.
44
44
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`!!!)
46
50
then define `CMAKE_BUILD_TYPE` again as the opposite value. This will generate both required libraries for `Release` and `Debug`.
47
51
48
52
## Windows Build Instructions
49
53
50
54
### Requirements
51
55
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.
53
57
54
58
### The Addon
55
59
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`.
57
64
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.
59
66
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.
61
68
62
69
## Linux Build Instructions
63
70
@@ -68,9 +75,13 @@ Also recommended is `ninja-build` for the build system.
68
75
69
76
### The Addon
70
77
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>`,
72
81
then `cd build && ninja`.
73
82
83
+
You can run it again for the opposite configuration if you want both debug and release.
84
+
74
85
After this is done you will have a `.so` file(s) in the `bin` directory of the addon folder.
75
86
76
87
## After Build
@@ -82,4 +93,3 @@ You now can play your mod-tracker formats as a regular audio stream (and even ma
82
93
83
94
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.
84
95
85
-
# This code is experimental, however it is functional (at least on my machine)
0 commit comments