Skip to content

Commit 0577b5d

Browse files
authored
Update build instructions
1 parent 8a07d28 commit 0577b5d

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

README.md

+26-27
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ Because my game uses mod-tracker music inspired by Deus-Ex, and it also makes lo
1010

1111
Just go to the prebuilt branch and use the download ZIP feature of Github, extract it into your project and you're done!
1212

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+
1315
Unfortunately there are no MacOS, Android, iOS, or any 32-bit binaries currently prebuilt. If you need any of those you will have to build them yourself (and in the case of mobile platforms, add them to the .gdextension file)
1416

17+
## Documentation
18+
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+
21+
There is no offical 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+
1523
## What platforms does it support?
1624

1725
In theory, all of them. In practice building for certain platforms sucks and so hasn't been tested. I have only tested Windows and Linux thus far. As for MacOS... I don't have a Mac neither do I have the money for one so unless someone else would like to volunteer to compile it and provide fixes if anything goes wrong on Mac, I can't test it myself. Blame Apple for having stupid licensing in regards to their system headers, otherwise cross-compilation probably wouldn't be that hard.
@@ -20,64 +28,55 @@ As for mobile platforms, I haven't tested them either because I don't make mobil
2028

2129
## How to build
2230

23-
This project uses CMake so it's recommended to use that (even for building godot-cpp as the DLL names are different and I had issues mixing SCons and CMake before).
31+
This project uses CMake so it's recommended to use that (even for building godot-cpp as the library names are different and I had issues mixing SCons and CMake before).
2432

25-
It has been tested on Windows and Linux (via Ubuntu WSL on Clang). MacOS might work but you're on your own (at least for now), open an issue if it has any problems and I'll try to address them or you can address them yourself in a PR (probably easier if you can, since I can't test things without a Mac).
33+
It has been tested on Windows and Linux. MacOS might work but you're on your own (at least for now), open an issue if it has any problems and I'll try to address them or you can address them yourself in a PR (probably easier if you can, since I can't test things without a Mac).
2634

27-
I recommend using Visual Studio 2022 and its CMake integration.
35+
### godot-cpp (both platforms)
2836

29-
## Windows Build Instructions
37+
If you're on Windows, you'll still want to use CMake from the terminal and not from Visual Studio like recommended below.
3038

31-
### godot-cpp
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).
3240

33-
Open the `godot-cpp` subdirectory in Visual Studio 2022 and build the project in the `x64-Debug` default configuration. (May take a while)
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`).
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.
3444

35-
Now create a configuration for `x64-Release` and build it in that too (you may have to do a full rebuild). (May take a little longer)
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)
46+
then define `CMAKE_BUILD_TYPE` again as the opposite value. This will generate both required libraries for `Release` and `Debug`.
3647

37-
Now in the `out/build` folder you should have two directories for each config.
48+
## Windows Build Instructions
3849

39-
Go into the `bin` folder of each and copy the libraries to a new `bin` folder at the root of the `godot-cpp` subdirectory.
50+
### Requirements
4051

41-
Also copy the `gen` folder from one of the folders into the root of the `godot-cpp` subdirectory.
52+
I recommend using Visual Studio 2022 and its CMake integration.
4253

4354
### The Addon
4455

4556
Open the root repository directory in Visual Studio 2022 and build it in `x64-Debug`.
4657

47-
Create a configuration for `x64-Release` just like before and build that as well.
58+
Create a configuration for `x64-Release` setting the build type appropriately in the panel, build that as well.
4859

4960
After this is done you will have both `.dll`s in the `bin` directory of the addon folder.
5061

5162
## Linux Build Instructions
5263

5364
### Requirements
5465

55-
You will need `cmake`, either the `gcc` toolchain or the `clang`/`llvm` toolchain. Also recommended is `ninja-build` for the build system.
56-
57-
### godot-cpp
58-
59-
Open the `godot-cpp` subdirectory in a terminal, run `cmake . -B build`. If you are using ninja add `-G Ninja`, also if you wish to build for debug / the editor add `-DCMAKE_BUILD_TYPE=Debug`
60-
(If you want both Debug and Release you will have to do these instructions two times, one with the Debug flag, and one without).
61-
62-
`cd build`, then run your build system. In this case, `ninja`.
63-
64-
Copy the `.a` file(s) from the `bin` directory of the `build` subdirectory to a new `bin` directory at the root of the `godot-cpp` directory.
65-
66-
Also copy the `gen` directory to the root of the `godot-cpp` directory.
66+
You will need `cmake`, either the `gcc` toolchain or the `clang`/`llvm` toolchain (this is actually relatively untested as of the latest buildsystem changes, so it may or may not work with Clang anymore).
67+
Also recommended is `ninja-build` for the build system.
6768

6869
### The Addon
6970

70-
Now change to the root repository directory. Run cmake just like before, in this case `cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug`,
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>`,
7172
then `cd build && ninja`.
7273

7374
After this is done you will have a `.so` file(s) in the `bin` directory of the addon folder.
7475

7576
## After Build
7677

7778
Now you're pretty much done, just copy the addon directory to your Godot project, reload it if you have it open, enable the importer plugin and boom.
78-
You now can play your mod-tracker formats as a regular audio stream (and even manipulate the playback of them a little too).
79-
80-
For more 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`.
79+
You now can play your mod-tracker formats as a regular audio stream (and even manipulate the playback of them quite a lot).
8180

8281
## Problems?
8382

0 commit comments

Comments
 (0)