mirror of
https://github.com/godotengine/godot.git
synced 2025-02-06 10:51:18 +00:00
Don't print 'Cannot find Mono in the registry' if bundled with Godot
Closes #24753
This commit is contained in:
parent
d17ba9a140
commit
a8dfe9ff7f
@ -241,11 +241,21 @@ void GDMono::initialize() {
|
|||||||
assembly_rootdir = bundled_assembly_rootdir;
|
assembly_rootdir = bundled_assembly_rootdir;
|
||||||
config_dir = bundled_config_dir;
|
config_dir = bundled_config_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WINDOWS_ENABLED
|
||||||
|
if (assembly_rootdir.empty() || config_dir.empty()) {
|
||||||
|
// Assertion: if they are not set, then they weren't found in the registry
|
||||||
|
CRASH_COND(mono_reg_info.assembly_dir.length() > 0 || mono_reg_info.config_dir.length() > 0);
|
||||||
|
|
||||||
|
ERR_PRINT("Cannot find Mono in the registry");
|
||||||
|
}
|
||||||
|
#endif // WINDOWS_ENABLED
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// These are always the directories in export templates
|
// These are always the directories in export templates
|
||||||
assembly_rootdir = bundled_assembly_rootdir;
|
assembly_rootdir = bundled_assembly_rootdir;
|
||||||
config_dir = bundled_config_dir;
|
config_dir = bundled_config_dir;
|
||||||
#endif
|
#endif // TOOLS_ENABLED
|
||||||
|
|
||||||
// Leak if we call mono_set_dirs more than once
|
// Leak if we call mono_set_dirs more than once
|
||||||
mono_set_dirs(assembly_rootdir.length() ? assembly_rootdir.utf8().get_data() : NULL,
|
mono_set_dirs(assembly_rootdir.length() ? assembly_rootdir.utf8().get_data() : NULL,
|
||||||
|
@ -158,8 +158,6 @@ MonoRegInfo find_mono() {
|
|||||||
if (_find_mono_in_reg_old("Software\\Novell\\Mono", info) == ERROR_SUCCESS)
|
if (_find_mono_in_reg_old("Software\\Novell\\Mono", info) == ERROR_SUCCESS)
|
||||||
return info;
|
return info;
|
||||||
|
|
||||||
ERR_PRINT("Cannot find mono in the registry");
|
|
||||||
|
|
||||||
return MonoRegInfo();
|
return MonoRegInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user