You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- For temp single target projects, put the targetname into the workspace name, so that multiple program targets being compiled/finalized at once don't all write to the same workspace file
#rb none [CL 26001703 by josh adams in ue5-main branch]
This commit is contained in:
@@ -247,7 +247,19 @@ namespace UnrealBuildTool
|
||||
|
||||
private string PrimaryProjectNameForPlatform(UnrealTargetPlatform? Platform)
|
||||
{
|
||||
return Platform == null ? PrimaryProjectName : $"{PrimaryProjectName} ({Platform})";
|
||||
Console.WriteLine("SingleTargetName = '{0}'", SingleTargetName);
|
||||
Console.WriteLine("PrimaryProjectName = '{0}'", PrimaryProjectName);
|
||||
string ProjectName = PrimaryProjectName;
|
||||
if (!string.IsNullOrEmpty(SingleTargetName))
|
||||
{
|
||||
ProjectName = $"{ProjectName}_{SingleTargetName}";
|
||||
}
|
||||
// if there are projectplatforms, then there is a platform name already in the name
|
||||
if (Platform != null && ProjectPlatforms.Count == 0)
|
||||
{
|
||||
ProjectName = $"{ProjectName} ({Platform})";
|
||||
}
|
||||
return ProjectName;
|
||||
}
|
||||
|
||||
private bool WriteXcodeWorkspace(ILogger Logger)
|
||||
@@ -393,25 +405,28 @@ namespace UnrealBuildTool
|
||||
}
|
||||
}
|
||||
|
||||
// delete outdated workspace files, reduce confusion
|
||||
if (bHasModernProjects)
|
||||
// delete outdated workspace files, reduce confusion (only for real workspaces, not stub ones)
|
||||
if (!bGenerateRunOnlyProject)
|
||||
{
|
||||
DirectoryReference OutdatedWorkspaceDirectory = new DirectoryReference(PrimaryProjectPath + "/" + PrimaryProjectNameForPlatform(null) + ".xcworkspace");
|
||||
if (DirectoryReference.Exists(OutdatedWorkspaceDirectory))
|
||||
if (bHasModernProjects)
|
||||
{
|
||||
DirectoryReference.Delete(OutdatedWorkspaceDirectory, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (UnrealTargetPlatform? Platform in WorkspacePlatforms)
|
||||
{
|
||||
DirectoryReference OutdatedWorkspaceDirectory = new DirectoryReference(PrimaryProjectPath + "/" + PrimaryProjectNameForPlatform(Platform) + ".xcworkspace");
|
||||
DirectoryReference OutdatedWorkspaceDirectory = new DirectoryReference(PrimaryProjectPath + "/" + PrimaryProjectNameForPlatform(null) + ".xcworkspace");
|
||||
if (DirectoryReference.Exists(OutdatedWorkspaceDirectory))
|
||||
{
|
||||
DirectoryReference.Delete(OutdatedWorkspaceDirectory, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (UnrealTargetPlatform? Platform in WorkspacePlatforms)
|
||||
{
|
||||
DirectoryReference OutdatedWorkspaceDirectory = new DirectoryReference(PrimaryProjectPath + "/" + PrimaryProjectNameForPlatform(Platform) + ".xcworkspace");
|
||||
if (DirectoryReference.Exists(OutdatedWorkspaceDirectory))
|
||||
{
|
||||
DirectoryReference.Delete(OutdatedWorkspaceDirectory, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bSuccess;
|
||||
|
||||
Reference in New Issue
Block a user