public static CompileSpecification Parse(GenericStructure gs)
 {
     var spec = new CompileSpecification { ID = gs["ID"] ?? "", Name = gs["Name"] ?? ""};
     var tools = gs.GetChildren("Tool");
     spec.Tools.AddRange(tools.Select(CompileTool.Parse));
     var presets = gs.GetChildren("Preset");
     spec.Presets.AddRange(presets.Select(CompilePreset.Parse));
     return spec;
 }
Beispiel #2
0
 public static CompileTool Parse(GenericStructure gs)
 {
     var tool = new CompileTool
     {
         Name = gs["Name"] ?? "",
         Description = gs["Description"] ?? "",
         Order = gs.PropertyInteger("Order")
     };
     var parameters = gs.GetChildren("Parameter");
     tool.Parameters.AddRange(parameters.Select(CompileParameter.Parse));
     return tool;
 }
Beispiel #3
0
        public void Read(GenericStructure gs)
        {
            ID = gs.PropertyInteger("ID");
            Name = gs["Name"];
            Specification = gs["Specification"];
            Engine = (Engine)Enum.Parse(typeof(Engine), gs["EngineID"]);
            DontRedirectOutput = gs.PropertyBoolean("DontRedirectOutput");
            Path = gs["Path"];
            Bsp = gs["Bsp"];
            Csg = gs["Csg"];
            Vis = gs["Vis"];
            Rad = gs["Rad"];
            IncludePathInEnvironment = gs.PropertyBoolean("IncludePathInEnvironment", true);

            WorkingDirectory = gs.PropertyEnum("WorkingDirectory", CompileWorkingDirectory.TemporaryDirectory);
            AfterCopyBsp = gs.PropertyBoolean("AfterCopyBsp");
            AfterRunGame = gs.PropertyBoolean("AfterRunGame");
            AfterAskBeforeRun = gs.PropertyBoolean("AfterAskBeforeRun");

            CopyBsp = gs.PropertyBoolean("CopyBsp");
            CopyRes = gs.PropertyBoolean("CopyRes");
            CopyLin = gs.PropertyBoolean("CopyLin");
            CopyMap = gs.PropertyBoolean("CopyMap");
            CopyPts = gs.PropertyBoolean("CopyPts");
            CopyLog = gs.PropertyBoolean("CopyLog");
            CopyErr = gs.PropertyBoolean("CopyErr");

            foreach (var prof in gs.GetChildren("Profile"))
            {
                var bp = new BuildProfile();
                bp.Read(prof);
                Profiles.Add(bp);
            }
        }