refactor(srp): split universal managed pipeline assembly

This commit is contained in:
2026-04-19 05:03:56 +08:00
parent f45b34a03a
commit 5fa209ab5d
15 changed files with 231 additions and 44 deletions

View File

@@ -58,11 +58,26 @@ std::filesystem::path ResolveProjectGameScriptsDllPath() {
return ResolveProjectManagedOutputDirectory() / "GameScripts.dll";
}
std::filesystem::path ResolveProjectRenderPipelinesUniversalDllPath() {
constexpr const char* configuredPath =
XCENGINE_TEST_PROJECT_RENDER_PIPELINES_UNIVERSAL_DLL;
if (configuredPath[0] != '\0') {
return std::filesystem::path(configuredPath);
}
return ResolveProjectManagedOutputDirectory() /
"XCEngine.RenderPipelines.Universal.dll";
}
MonoScriptRuntime::Settings CreateProjectMonoSettings() {
MonoScriptRuntime::Settings settings;
settings.assemblyDirectory = ResolveProjectManagedOutputDirectory();
settings.corlibDirectory = settings.assemblyDirectory;
settings.coreAssemblyPath = ResolveProjectScriptCoreDllPath();
settings.engineAssemblies.push_back(
MonoScriptRuntime::ManagedAssemblyDescriptor{
"XCEngine.RenderPipelines.Universal",
ResolveProjectRenderPipelinesUniversalDllPath()});
settings.appAssemblyPath = ResolveProjectGameScriptsDllPath();
return settings;
}
@@ -71,6 +86,9 @@ class ProjectScriptAssemblyTest : public ::testing::Test {
protected:
void SetUp() override {
ASSERT_TRUE(std::filesystem::exists(ResolveProjectScriptCoreDllPath()));
ASSERT_TRUE(
std::filesystem::exists(
ResolveProjectRenderPipelinesUniversalDllPath()));
ASSERT_TRUE(std::filesystem::exists(ResolveProjectGameScriptsDllPath()));
runtime = std::make_unique<MonoScriptRuntime>(CreateProjectMonoSettings());