Пример #1
0
 /// <summary>
 /// Constructor. Reads a makefile from disk.
 /// </summary>
 /// <param name="Reader">The archive to read from</param>
 public TargetMakefile(BinaryArchiveReader Reader)
 {
     CreateTimeUtc                = new DateTime(Reader.ReadLong(), DateTimeKind.Utc);
     ToolchainInfo                = Reader.ReadString();
     ExternalMetadata             = Reader.ReadString();
     ReceiptFile                  = Reader.ReadFileReference();
     ProjectIntermediateDirectory = Reader.ReadDirectoryReference();
     TargetType              = (TargetType)Reader.ReadInt();
     bDeployAfterCompile     = Reader.ReadBool();
     bHasProjectScriptPlugin = Reader.ReadBool();
     AdditionalArguments     = Reader.ReadArray(() => Reader.ReadString());
     PreBuildScripts         = Reader.ReadArray(() => Reader.ReadFileReference());
     Actions = Reader.ReadList(() => new Action(Reader));
     EnvironmentVariables    = Reader.ReadList(() => Tuple.Create(Reader.ReadString(), Reader.ReadString()));
     OutputItems             = Reader.ReadList(() => Reader.ReadFileItem());
     ModuleNameToOutputItems = Reader.ReadDictionary(() => Reader.ReadString(), () => Reader.ReadArray(() => Reader.ReadFileItem()), StringComparer.OrdinalIgnoreCase);
     HotReloadModuleNames    = Reader.ReadHashSet(() => Reader.ReadString(), StringComparer.OrdinalIgnoreCase);
     DirectoryToSourceFiles  = Reader.ReadDictionary(() => Reader.ReadDirectoryItem(), () => Reader.ReadArray(() => Reader.ReadFileItem()));
     WorkingSet = Reader.ReadHashSet(() => Reader.ReadFileItem());
     CandidatesForWorkingSet = Reader.ReadHashSet(() => Reader.ReadFileItem());
     UObjectModules          = Reader.ReadList(() => new UHTModuleInfo(Reader));
     UObjectModuleHeaders    = Reader.ReadList(() => new UHTModuleHeaderInfo(Reader));
     PluginFiles             = Reader.ReadHashSet(() => Reader.ReadFileItem());
     AdditionalDependencies  = Reader.ReadHashSet(() => Reader.ReadFileItem());
 }
Пример #2
0
        /// <summary>
        /// Construct a TargetInfo from an archive on disk
        /// </summary>
        /// <param name="Reader">Archive to read from</param>
        public TargetInfo(BinaryArchiveReader Reader)
        {
            this.Name     = Reader.ReadString();
            this.Platform = UnrealTargetPlatform.Parse(Reader.ReadString());
            string ConfigurationStr = Reader.ReadString();

            this.Architecture = Reader.ReadString();
            this.ProjectFile  = Reader.ReadFileReference();
            string[] ArgumentStrs = Reader.ReadArray(() => Reader.ReadString());

            if (!UnrealTargetConfiguration.TryParse(ConfigurationStr, out Configuration))
            {
                throw new BuildException(string.Format("The configration name {0} is not a valid configration name. Valid names are ({1})", Name,
                                                       string.Join(",", Enum.GetValues(typeof(UnrealTargetConfiguration)).Cast <UnrealTargetConfiguration>().Select(x => x.ToString()))));
            }

            Arguments = new CommandLineArguments(ArgumentStrs);
        }