editor: prefer bundled mono runtime discovery

This commit is contained in:
2026-04-13 00:27:11 +08:00
parent 2326857a43
commit 6f876678f5
2 changed files with 13 additions and 4 deletions

View File

@@ -48,6 +48,11 @@ std::filesystem::path FindBundledMonoRootDirectory(const std::filesystem::path&
return {};
}
const std::filesystem::path projectBundledMonoRoot = repositoryRoot / "engine" / "third_party" / "mono";
if (std::filesystem::exists(projectBundledMonoRoot / "binary" / "mscorlib.dll", ec)) {
return projectBundledMonoRoot.lexically_normal();
}
for (std::filesystem::directory_iterator it(repositoryRoot, ec), end; it != end && !ec; it.increment(ec)) {
if (ec || !it->is_directory(ec)) {
continue;