Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors preventing build. #3

Open
GeminiSquishGames opened this issue Apr 7, 2024 · 6 comments
Open

Errors preventing build. #3

GeminiSquishGames opened this issue Apr 7, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@GeminiSquishGames
Copy link

GeminiSquishGames commented Apr 7, 2024

Getting the following errors:

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	C1083	Cannot open include file: 'godot_cpp/classes/audio_stream.hpp': No such file or directory	godot-openmpt	D:\dev\godot_extentions\godot libopenmpt\godot-openmpt\src\audio_stream_mpt.h	4		
Error	C1083	Cannot open include file: 'godot_cpp/classes/object.hpp': No such file or directory	godot-openmpt	D:\dev\godot_extentions\godot libopenmpt\godot-openmpt\src\openmpt_singleton.h	4		
Error	C1083	Cannot open include file: 'godot_cpp/classes/global_constants.hpp': No such file or directory	godot-openmpt	D:\dev\godot_extentions\godot libopenmpt\godot-openmpt\godot-cpp\include\godot_cpp\core\property_info.hpp	36		

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 ALL_BUILD 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.

@Dudejoe870
Copy link
Owner

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.

@Dudejoe870 Dudejoe870 added the bug Something isn't working label Apr 7, 2024
@GeminiSquishGames
Copy link
Author

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.

@Dudejoe870
Copy link
Owner

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.

@Dudejoe870
Copy link
Owner

Dudejoe870 commented Apr 7, 2024

Try this build, it adds the missing functions you requested (hopefully)

@GeminiSquishGames
Copy link
Author

GeminiSquishGames commented Apr 8, 2024

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!
image

@Dudejoe870
Copy link
Owner

Awesome! I'll keep the issue open (as the issue with the build script is still valid)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants