Open GeminiSquishGames opened 8 months ago
To be honest, I didn't really test building with the VS generators. I tested with gcc (installed via scoop, the windows package manager) and Ninja (a build system that can be used as a build generator). The build system honestly is kind of a mess, I honestly hate C++ build systems in general they kind of always suck. I think part of the problem might be that Visual Studio isn't using the right working directory. The source, build, and working directory all need to be in the custom-godotcpp-build folder, and or I think the working directory can be one level out (like it is in the github-workflow I believe). Another potential way to build it is using act which requires docker. I found it a little finnicky to setup personally (mostly due to docker, but if you have that already then it's pretty easy to get act via scoop), but once you do, you can simply run the github action locally on your computer with a --artifact-server-path
where the ".gz__" files will appear (just rename the extension to .gz and extract the file using WinRAR or something and you'll have your binaries). I know that's not a great solution but it turns out that building DLLs that aren't over 100MB takes a lot of custom configuration. This whole thing has honestly made me want to program my own build system lol (one that doesn't suck), took me hours and hours to get this working at all.
I sorta feel the same way about the build systems. I'm more used to FreeBasic, Pascal/Delphi, and C# or just pushing build and being done in VS for C/C++. I had trouble when I tried to tackle this as an extension, Scons doesn't play well. My second implementation of libopenmpt was just going to be a C# addon for the mono build but I couldn't figure how to get the stream to work on the existing stream players and it wasn't that important to m project so I just gave up at the time. Thanks for the ideas though and I'll work on it a bit. I need to get a demo going of my game soon and I'll want to get the dynamic music going for that.
The main reason I wanted to be able to build it myself is mostly for openmpt_module_get_pattern_row_channel_command(), which lets you read row data in at arbitrary points. There is another one that the Tracker uses for highlighting as well. The sub reasons are control over the built in effects (and maybe making my own), instrument and sample data control with my own extension logic, and callback access for connections to signals. I have a fork going, I might be able to figure something out and notify you. That said, Godot's GDExtension workflow needs a good custom build system, if you don't hopefully someone does.
Oh well, I mean I didn't implement those because I didn't think they'd actually be that useful. But I mean I could probably add implementations for them pretty easily.
Try this build, it adds the missing functions you requested (hopefully)
Thank you so much, that works great! Can get the info either as it plays or at any place I want in the data, I wasn't really as concerned with the formatted string and highlight ones but that's good to have too!
Awesome! I'll keep the issue open (as the issue with the build script is still valid)
Getting the following errors:
I feel like I'm missing something. Following your instructions, I run cmake on the custom_* directory, it makes the .sln files and the ALL_BUILD there. I build root of the repo, the directory containing the custom directory in VS 2022. I get these errors where it cannot find these header files.
I also tried specifically cmake -S .\custom-godotcpp-build -B .\custom-godotcpp-build -DGENERATE_DEBUG_SYMBOLS=OFF just to be sure as well as simply "cmake .."I tried using cmake in the root of the repo as well and it makes ALLBUILD and other's but on building I get the same errors. I've tried building in VS in the custom* directory as well, both of the last two steps are not in your instructions, but I had to try whatever I could.
Edit: I was thinking the custom-godotcpp build was working the original godot-cpp directory. I guess it does not. I'll have to try again after that make finishes.