- David Jefferies
- Posts: 27
- Joined:
Unreal Build Configurations
We want to build our project such that the Shipping and Test version links to Release version of Noesis and other versions link to the Profile version.
We've tried trivially changing the existing Noesis build script (Noesis.build.cs) such that it chooses a different folder for each config
e.g. change this:
to this:
we get the build error
"Unable to merge actions 'Noesis.dll' and 'Noesis.dll': PrerequisiteItems, CommandArguments are different"
I think this is because the Editor is always built as Development and so when building a Shipping version of the game, it builds a Development version of the tools and both versions map Noesis.dll to the same path.
Any ideas on how to do this properly?
We've tried trivially changing the existing Noesis build script (Noesis.build.cs) such that it chooses a different folder for each config
e.g. change this:
Code: Select all
if (Target.Platform == UnrealTargetPlatform.Win64)
{
PublicAdditionalLibraries.Add(Path.Combine(NoesisBasePath, "Lib", "windows_x86_64", "Noesis.lib"));
string NoesisDllPath = Path.Combine(NoesisBasePath, "Bin", "windows_x86_64", "Noesis.dll");
string NoesisDllTargetPath = Path.Combine("$(BinaryOutputDir)", "Noesis.dll");
RuntimeDependencies.Add(NoesisDllTargetPath, NoesisDllPath, StagedFileType.NonUFS);
}
Code: Select all
string ConfigurationFolder = "profile";
if (Target.Configuration == UnrealTargetConfiguration.Shipping || Target.Configuration == UnrealTargetConfiguration.Test)
{
ConfigurationFolder = "release";
}
if (Target.Platform == UnrealTargetPlatform.Win64)
{
PublicAdditionalLibraries.Add(Path.Combine(NoesisBasePath, "Lib", "windows_x86_64", ConfigurationFolder, "Noesis.lib"));
string NoesisDllPath = Path.Combine(NoesisBasePath, "Bin", "windows_x86_64", ConfigurationFolder, "Noesis.dll");
string NoesisDllTargetPath = Path.Combine("$(BinaryOutputDir)", "Noesis.dll");
RuntimeDependencies.Add(NoesisDllTargetPath, NoesisDllPath, StagedFileType.NonUFS);
}
"Unable to merge actions 'Noesis.dll' and 'Noesis.dll': PrerequisiteItems, CommandArguments are different"
I think this is because the Editor is always built as Development and so when building a Shipping version of the game, it builds a Development version of the tools and both versions map Noesis.dll to the same path.
Any ideas on how to do this properly?
Re: Unreal Build Configurations
Hi David,
I haven't been able to reproduce you exact problem, but I've found a similar one. I think you're right in your assesment: multiple configurations of our dll have to coexist in the same directory. That means that having them called the same in different directories won't work.
What we've done is to give the dlls/libs suffixes based on the configuration, and use the following code:
We will probably name them Noesis_debug.dll, Noesis_profile.dll and leave plain Noesis.dll for the release configuration but, for now, name them as you wish.
Just to test your same scenario: how were you building the game to get that error?
I haven't been able to reproduce you exact problem, but I've found a similar one. I think you're right in your assesment: multiple configurations of our dll have to coexist in the same directory. That means that having them called the same in different directories won't work.
What we've done is to give the dlls/libs suffixes based on the configuration, and use the following code:
Code: Select all
string ConfigurationSuffix = "";
if (Target.Configuration == UnrealTargetConfiguration.Shipping || Target.Configuration == UnrealTargetConfiguration.Test)
{
ConfigurationSuffix = "_release";
}
if (Target.Platform == UnrealTargetPlatform.Win64)
{
PublicAdditionalLibraries.Add(Path.Combine(NoesisBasePath, "Lib", "windows_x86_64", "Noesis" + ConfigurationSuffix + ".lib"));
string NoesisDllPath = Path.Combine(NoesisBasePath, "Bin", "windows_x86_64", "Noesis" + ConfigurationSuffix + ".dll");
string NoesisDllTargetPath = Path.Combine("$(BinaryOutputDir)", "Noesis" + ConfigurationSuffix + ".dll");
RuntimeDependencies.Add(NoesisDllTargetPath, NoesisDllPath, StagedFileType.NonUFS);
}
Just to test your same scenario: how were you building the game to get that error?
- David Jefferies
- Posts: 27
- Joined:
Re: Unreal Build Configurations
I was using a custom bat file that calls RunUAT.bat - once for building the editor for cooking, and once to build the game
Code: Select all
rem build Editor (always development config) - this gets used for cooking
CALL ..\..\..\RunUAT BuildEditor -project=!PRJ!
rem build game
CALL ..\..\..\RunUAT BuildGame -project=!PRJ! -platform=!PLAT! -configuration=!CFG!
- David Jefferies
- Posts: 27
- Joined:
Re: Unreal Build Configurations
I've tried the script changes and it builds and Noesis_release.dll gets copied to Binaries/Win64 correctly
However when I try to run the game I get the system error box with:
"The code execution cannot proceed because Noesis.dll was not found"
So it looks like the game is still trying to load Noesis.dll instead of Noesis_release.dll - but I can't see how the name of the dll is determined
However when I try to run the game I get the system error box with:
"The code execution cannot proceed because Noesis.dll was not found"
So it looks like the game is still trying to load Noesis.dll instead of Noesis_release.dll - but I can't see how the name of the dll is determined
Re: Unreal Build Configurations
Did you just rename the DLL and LIB files? They need to be rebuilt with the changed name. The DLL name is in the associated LIB file, so just renaming them won't work.
- David Jefferies
- Posts: 27
- Joined:
Re: Unreal Build Configurations
ah thanks - I'd been renaming them so will rebuild them instead
Who is online
Users browsing this forum: No registered users and 4 guests