refactor(srp): split universal managed pipeline assembly
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user