1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

C# bindings generator cleanup

- Normal log messages are no longer warnings.
- BindingsGenerator is no longer a singleton.
- Added a log function.
This commit is contained in:
Ignacio Etcheverry
2019-04-25 15:45:12 +02:00
parent bf1fe11143
commit c20a3823a2
7 changed files with 139 additions and 108 deletions

View File

@@ -323,10 +323,13 @@ bool GodotSharpBuilds::make_api_assembly(APIAssembly::Type p_api_type) {
String api_sln_file = api_sln_dir.plus_file(API_SOLUTION_NAME ".sln");
if (!DirAccess::exists(api_sln_dir) || !FileAccess::exists(api_sln_file)) {
BindingsGenerator *gen = BindingsGenerator::get_singleton();
bool gen_verbose = OS::get_singleton()->is_stdout_verbose();
BindingsGenerator bindings_generator;
Error err = gen->generate_cs_api(api_sln_dir, gen_verbose);
if (!OS::get_singleton()->is_stdout_verbose()) {
bindings_generator.set_log_print_enabled(false);
}
Error err = bindings_generator.generate_cs_api(api_sln_dir);
if (err != OK) {
show_build_error_dialog("Failed to generate " API_SOLUTION_NAME " solution. Error: " + itos(err));
return false;