Exemplo n.º 1
0
        public override bool WriteProjectFile(List <UnrealTargetPlatform> InPlatforms, List <UnrealTargetConfiguration> InConfigurations)
        {
            bool bSuccess = false;

            var TargetName = ProjectFilePath.GetFileNameWithoutExtension();

            FileReference             GameProjectPath = null;
            List <DirectoryReference> GameFolders     = UEBuildTarget.DiscoverAllGameFolders();

            foreach (var GameFolder in GameFolders)
            {
                FileReference UProjectPath = FileReference.Combine(GameFolder, TargetName + ".uproject");
                if (FileReference.Exists(UProjectPath))
                {
                    GameProjectPath = UProjectPath;
                    break;
                }
            }

            var ProjectFileContent = new StringBuilder();

            ProjectFileContent.Append("# @Eddie Workset@" + ProjectFileGenerator.NewLine);
            ProjectFileContent.Append("AddWorkset \"" + this.ToString() + ".wkst\" \"" + ProjectFilePath.FullName + "\"" + ProjectFileGenerator.NewLine);

            ParseSourceFilesIntoGroups();
            EmitProject(ProjectFileContent, Folders);

            bSuccess = ProjectFileGenerator.WriteFileIfChanged(ProjectFilePath.FullName, ProjectFileContent.ToString(), new UTF8Encoding());

            return(bSuccess);
        }