static void BuildSolutionExplorerState_VS2017(MasterProjectFolder Folder, string Suffix, VCSolutionExplorerState ExplorerState, ProjectFile DefaultProject) { foreach (ProjectFile Project in Folder.ChildProjects) { string ProjectIdentifier = String.Format("{0}{1}", Project.ProjectFilePath.GetFileNameWithoutExtension(), Suffix); if (Project == DefaultProject) { ExplorerState.OpenProjects.Add(new Tuple <string, string[]>(ProjectIdentifier, new string[] { ProjectIdentifier })); } else { ExplorerState.OpenProjects.Add(new Tuple <string, string[]>(ProjectIdentifier, new string[] { })); } } foreach (MasterProjectFolder SubFolder in Folder.SubFolders) { string SubFolderName = SubFolder.FolderName + Suffix; if (SubFolderName == "Automation;Programs") { ExplorerState.OpenProjects.Add(new Tuple <string, string[]>(SubFolderName, new string[] { })); } else { ExplorerState.OpenProjects.Add(new Tuple <string, string[]>(SubFolderName, new string[] { SubFolderName })); } BuildSolutionExplorerState_VS2017(SubFolder, ";" + SubFolderName, ExplorerState, DefaultProject); } }
static IDictionary <MasterProjectFolder, Guid> GenerateProjectFolderGuids(MasterProjectFolder RootFolder) { IDictionary <MasterProjectFolder, Guid> Guids = new Dictionary <MasterProjectFolder, Guid>(); foreach (MasterProjectFolder Folder in RootFolder.SubFolders) { GenerateProjectFolderGuids("UE4", Folder, Guids); } return(Guids); }
static void GenerateProjectFolderGuids(string ParentPath, MasterProjectFolder Folder, IDictionary <MasterProjectFolder, Guid> Guids) { string Path = String.Format("{0}/{1}", ParentPath, Folder.FolderName); Guids[Folder] = MakeMd5Guid(Encoding.UTF8.GetBytes(Path)); foreach (MasterProjectFolder SubFolder in Folder.SubFolders) { GenerateProjectFolderGuids(Path, SubFolder, Guids); } }