public void ChangeDirectory() { string dir = _selectedFile; if (dir != null) { if (dir == "...") { if (CurPath.EndsWith("\\")) { } else { CurPath = Directory.GetParent(CurPath).FullName; UpdateContent(); } } else if (dir.Contains("<D>")) { dir = dir.Replace("<D> ", ""); if (CurPath.Length >= 4) { CurPath += '\\' + dir; } else { CurPath += dir; } UpdateContent(); } } }
public static string CurPathString() { if (CurPath.Count == 0) { return(""); } return(String.Join(".", CurPath.ToArray())); }
public void EchoPath() { if (CurPath != null) { CurPath.Echo(); } else { Console.WriteLine("You're not currently on a path."); } }
private void AdvanceBoss() { Boss = null; Fighting = false; CurBoss++; if (CurBoss >= CurPath.Length()) { Console.WriteLine("You're through this path now.."); } else { Boss = CurPath.Bosses[CurBoss].Clone(); Console.WriteLine("Changing boss:" + Boss); } }
/// <summary> /// Adds all of the specified include paths to this VCProject's list of include paths for all modules in the project /// </summary> /// <param name="NewIncludePaths">List of include paths to add</param> public void AddInteliiSenseIncludePaths(HashSet <string> NewIncludePaths, bool bAddingSystemIncludes) { if (ProjectFileGenerator.OnlyGenerateIntelliSenseDataForProject == null || ProjectFileGenerator.OnlyGenerateIntelliSenseDataForProject == this) { foreach (string CurPath in NewIncludePaths) { if (bAddingSystemIncludes ? KnownIntelliSenseSystemIncludeSearchPaths.Add(CurPath) : KnownIntelliSenseIncludeSearchPaths.Add(CurPath)) { string PathRelativeToProjectFile; // If the include string is an environment variable (e.g. $(DXSDK_DIR)), then we never want to // give it a relative path if (CurPath.StartsWith("$(")) { PathRelativeToProjectFile = CurPath; } else { // Incoming include paths are relative to the solution directory, but we need these paths to be // relative to the project file's directory PathRelativeToProjectFile = NormalizeProjectPath(CurPath); } // Trim any trailing slash PathRelativeToProjectFile = PathRelativeToProjectFile.TrimEnd('/', '\\'); // Make sure that it doesn't exist already bool AlreadyExists = false; List <string> SearchPaths = bAddingSystemIncludes ? IntelliSenseSystemIncludeSearchPaths : IntelliSenseIncludeSearchPaths; foreach (string ExistingPath in SearchPaths) { if (PathRelativeToProjectFile == ExistingPath) { AlreadyExists = true; break; } } if (!AlreadyExists) { SearchPaths.Add(PathRelativeToProjectFile); } } } } }
/// <summary> /// Adds the include directory to the list, after converting it to an absolute path to UE4 root directory. /// </summary> /// <param name="FileContent">File content.</param> private void WriteIncludeSection(ref StringBuilder FileContent) { List <string> IncludeDirectories = new List <string>(); List <string> SystemIncludeDirectories = new List <string>(); var UnrealEngineRootPath = Path.GetFullPath(ProjectFileGenerator.RootRelativePath); int IncludeIndex = 1; // Iterate through all the include paths that // UnrealBuildTool.exe generates foreach (var CurProject in GeneratedProjectFiles) { KDevelopProjectFile KDevelopProject = CurProject as KDevelopProjectFile; if (KDevelopProject == null) { System.Console.WriteLine("KDevelopProject == null"); continue; } foreach (var CurPath in KDevelopProject.IntelliSenseIncludeSearchPaths) { string FullProjectPath = ProjectFileGenerator.MasterProjectPath.FullName; string FullPath = ""; // need to test to see if this in the project souce tree if (CurPath.StartsWith("/") && !CurPath.StartsWith(FullProjectPath)) { // Full path to a folder outside of project FullPath = CurPath; } else { FullPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(KDevelopProject.ProjectFilePath.FullName), CurPath)); FullPath = Utils.MakePathRelativeTo(FullPath, FullProjectPath); FullPath = FullPath.TrimEnd('/'); FullPath = Path.Combine(UnrealEngineRootPath, FullPath); } if (!FullPath.Contains("FortniteGame/") && !FullPath.Contains("ThirdParty/")) { SystemIncludeDirectories.Add(String.Format("{0}", FullPath)); IncludeIndex++; } } foreach (var CurPath in KDevelopProject.IntelliSenseSystemIncludeSearchPaths) { string FullProjectPath = ProjectFileGenerator.MasterProjectPath.FullName; string FullPath = ""; if (CurPath.StartsWith("/") && !CurPath.StartsWith(FullProjectPath)) { // Full path to a folder outside of project FullPath = CurPath; } else { FullPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(KDevelopProject.ProjectFilePath.FullName), CurPath)); FullPath = Utils.MakePathRelativeTo(FullPath, FullProjectPath); FullPath = FullPath.TrimEnd('/'); FullPath = Path.Combine(UnrealEngineRootPath, FullPath); } if (!FullPath.Contains("FortniteGame/") && !FullPath.Contains("ThirdParty/")) // @todo: skipping Fortnite header paths to shorten clang command line for building UE4XcodeHelper { SystemIncludeDirectories.Add(String.Format("{0}", FullPath)); IncludeIndex++; } } } // Remove duplicate paths from include dir and system include dir list List <string> Tmp = new List <string>(); List <string> Stmp = new List <string>(); Tmp = IncludeDirectories.Distinct().ToList(); Stmp = SystemIncludeDirectories.Distinct().ToList(); IncludeDirectories = Tmp.ToList(); SystemIncludeDirectories = Stmp.ToList(); foreach (var CurPath in IncludeDirectories) { FileContent.Append(CurPath); FileContent.Append(" \n"); } foreach (var CurPath in SystemIncludeDirectories) { FileContent.Append(CurPath); FileContent.Append(" \n"); } FileContent.Append("\n"); }