Пример #1
0
        public ImportQueue(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            this.QueueName = xe.Attribute("QueueName").Value;
            this.Rep       = xe.Attribute("Rep").Value;

            // Die ImportQueue muss sich im Container registirieren
            container.ImportQueues.Add(this.QueueName, this);
        }
Пример #2
0
        public Publish4Cloud(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            this.Package = container.ParseParameters(xe.Attribute("Package").Value);
            this.Version = container.ParseParameters(xe.Attribute("Version").Value);
            this.Setting = container.ParseParameters(xe.Attribute("Setting").Value);

            this.Arguments = "\\PUBLISH4CLOUD \\PACKAGE \"" + this.Package + "\" \\VERSION \"" + this.Version + "\""
                             + " \\SETTING \"" + this.Setting + "\"";
        }
Пример #3
0
        public ApprovedImport(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            var xaDir = xe.Attribute("Dir");

            this.Dir = container.ParseParameters(xaDir != null ? xaDir.Value : "{ApprovedImportDir}");

            var xaHistoryDir = xe.Attribute("HistoryDir");

            this.HistoryDir = container.ParseParameters(xaDir != null ? xaDir.Value : "{ApprovedHistoryDir}");

            // nicht parsen - wird erst im Execute geparsed
            this.Rep = xe.Attribute("Rep").Value;
        }
Пример #4
0
        public ExportDoc(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            this.Package        = container.ParseParameters(xe.Attribute("Package").Value);
            this.Version        = container.ParseParameters(xe.Attribute("Version").Value);
            this.Iso            = container.ParseParameters(xe.Attribute("Iso").Value);
            this.ExportDBTables = (string)xe.Attribute("ExportDBTables") == "1";
            this.UseLicense     = (string)xe.Attribute("UseLicense") == "1";
            this.Setting        = container.ParseParameters(xe.Attribute("Setting")?.Value);

            var xaDir = xe.Attribute("Dir");

            if (xaDir != null)
            {
                Dir = container.ParseParameters(xaDir.Value);
            }
            else
            {
                Dir = container.ParseParameters("{" + this.ExportDirParameter + "}");
            }

            string folder = Path.Combine(this.Dir, container.CreateExportFileName(this.Package, this.Version) + "_Help_" + this.Iso);

            var args = new List <string>()
            {
                @"\DOCUMENTATION",
                @"\PACKAGE", this.Package,
                @"\VERSION", this.Version,
                @"\ISO", this.Iso,
                @"\OUTPUT", folder
            };

            if (UseLicense)
            {
                args.Add(@"\USELICENSE");
                args.Add(@"\SETTING");
                args.Add(this.Setting);
            }

            if (ExportDBTables)
            {
                args.Add(@"\ExportDBTables");
            }

            this.Arguments = FSUtils.EscapeCommandLineArgs(args)
                             // ggf. manuelle "Args" aus dem Basis-Konstruktor übernehmen
                             + (!string.IsNullOrEmpty(this.Arguments) ? " " + this.Arguments : "");
        }
Пример #5
0
        public CompileRun(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            Run = container.ParseParameters(xe.Attribute("Run").Value);

            this.Arguments = "\\COMPILERUN \"" + this.Run + "\" \\NewProcessPerStep";

            // Ab FS 3.6 werden die MaxTasks unterstützt.
            if (this.FSVer >= new Version(3, 6))
            {
                var xaMaxParallel = xe.Attribute("MaxParallel");
                if (xaMaxParallel != null)
                {
                    int maxParallel = 0;
                    if (int.TryParse(xaMaxParallel.Value, out maxParallel))
                    {
                        this.MaxParallal = maxParallel;
                    }
                }

                if (this.MaxParallal > 0)
                {
                    this.Arguments += " \\MaxParallel " + this.MaxParallal;
                }
            }

            System.Version fsVer;
            bool           fsVerOk = System.Version.TryParse(this.FSVersion, out fsVer);

            if (this.FSVer >= new System.Version(3, 4))
            {
                if ((bool?)xe.Attribute("DeleteCompileDir") != false)
                {
                    // Dieser Parameter steht seit FS 3.4 zur Verfügung
                    this.Arguments += " \\DELETECOMPILEDIR";
                }
            }
            else
            {
                // bis Version 3.3 musste Debug-Code explizit gesetzt sein
                this.Arguments += " \\DebugCode";
            }
        }
Пример #6
0
        public Batch(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            this.Cmd = container.ParseParameters(xe.Attribute("Cmd").Value);

            this.Directory = container.ParseParameters((string)xe.Attribute("Directory"));
            if (!string.IsNullOrWhiteSpace(this.Directory))
            {
                this.Directory = Path.GetFullPath(this.Directory);
            }

            this.Args = ParseArgs(xe, container);

            this.LogDetails += Cmd + " " + this.Args + Environment.NewLine;
            if (!string.IsNullOrWhiteSpace(this.Directory))
            {
                this.LogDetails += "Working Directory: " + this.Directory + Environment.NewLine;
            }
            this.LogDetails += "-----------------------" + Environment.NewLine;
        }
Пример #7
0
        public FSConsole(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            this.FSVersion = xe.Attribute("FS").Value;

            System.Version fsVer;
            if (System.Version.TryParse(this.FSVersion, out fsVer))
            {
                this.FSVer = fsVer;
            }

            // nicht parsen - wird erst im Execute geparsed
            this.Rep = xe.Attribute("Rep").Value;

            var arguments = ParseArgs(xe, container);

            if (!string.IsNullOrEmpty(arguments))
            {
                this.Arguments = arguments;
            }
        }
Пример #8
0
        public Export(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            var xaDir = xe.Attribute("Dir");

            if (xaDir != null)
            {
                Dir = container.ParseParameters(xaDir.Value);
            }
            else
            {
                Dir = container.ParseParameters("{" + this.ExportDirParameter + "}");
            }
            Package = container.ParseParameters(xe.Attribute("Package").Value);
            Version = container.ParseParameters(xe.Attribute("Version").Value);
            var attrMode = xe.Attribute("Mode");

            if (attrMode != null)
            {
                this.Mode = attrMode.Value;
            }

            string file = Path.Combine(this.Dir, container.CreateExportFileName(this.Package, this.Version, this.FSVersion));

            var xaQueue = xe.Attribute("Queue");

            if (xaQueue != null)
            {
                this.Queue = xaQueue.Value;
            }

            this.IncludeBasePackages = (string)xe.Attribute("IncludeBasePackages");
            string argumentIncludeBasePackages = null;

            if (!String.IsNullOrEmpty(this.IncludeBasePackages))
            {
                argumentIncludeBasePackages = @" \IncludeBasePackages " + this.IncludeBasePackages;
            }

            System.Version fsVer;
            bool           fsVerOk = System.Version.TryParse(this.FSVersion, out fsVer);

            if ("Bugfix".Equals(this.Mode, StringComparison.OrdinalIgnoreCase))
            {
                if (fsVerOk && fsVer >= new System.Version(3, 10))
                {
                    // seit FS 3.10 gibt es keine separate Debug-Datei mehr
                    this.ExportFile1 = file + ".srdb";
                }
                else if (fsVerOk && fsVer >= new System.Version(3, 8))
                {
                    // seit FS 3.8 heißt Bugfix ServierRelease (SR)
                    this.ExportFile1 = file + ".srdb";
                    this.ExportFile2 = file + ".debugsrdb";
                }
                else if (fsVerOk && fsVer >= new System.Version(3, 4))
                {
                    // seit FS 3.4 gibt es die debugbugfixdb
                    this.ExportFile1 = file + ".bugfixdb";
                    this.ExportFile2 = file + ".debugbugfixdb";
                }
                else
                {
                    this.ExportFile1 = file + ".bugfixdb";
                    this.ExportFile2 = file + ".debugdb";
                }

                if (!String.IsNullOrEmpty(this.ExportFile1))
                {
                    this.Arguments = "\\PACKAGE \"" + this.Package + "\" \\VERSION \"" + this.Version + "\" \\EXPORT true \"" + this.ExportFile1 + "\"" + argumentIncludeBasePackages;
                }
                if (!String.IsNullOrEmpty(this.ExportFile2))
                {
                    this.Arguments2 = "\\PACKAGE \"" + this.Package + "\" \\VERSION \"" + this.Version + "\" \\EXPORT true \"" + this.ExportFile2 + "\"" + argumentIncludeBasePackages;
                }
            }
            else
            {
                if (fsVerOk && fsVer >= new System.Version(3, 10))
                {
                    // seit FS 3.10 gibt es keine separate Debug-Datei mehr
                    this.ExportFile1 = file + ".db";
                    this.Arguments   = "\\PACKAGE \"" + this.Package + "\" \\VERSION \"" + this.Version + "\" \\EXPORT true \"" + this.ExportFile1 + "\"" + argumentIncludeBasePackages;
                }
                else
                {
                    this.ExportFile1 = file + ".db";
                    this.Arguments   = "\\PACKAGE \"" + this.Package + "\" \\VERSION \"" + this.Version + "\" \\EXPORT true \"" + this.ExportFile1 + "\"";

                    this.ExportFile2 = file + ".debugdb";
                    this.Arguments2  = "\\PACKAGE \"" + this.Package + "\" \\VERSION \"" + this.Version + "\" \\EXPORT true \"" + this.ExportFile2 + "\"";
                }
            }
        }
Пример #9
0
        public Import(XElement xe, ExecutableContainer container, int indent)
            : base(xe, container, indent)
        {
            var attrDir = xe.Attribute("Dir");

            if (attrDir != null)
            {
                Dir = container.ParseParameters(attrDir.Value);
            }
            else
            {
                Dir = container.ParseParameters("{ExportDir}");
            }

            var xaFile = xe.Attribute("ExportFile");

            if (xaFile != null)
            {
                this.ExportFile = xaFile.Value;
                string file = Path.Combine(this.Dir, this.ExportFile);

                System.Version fsVer;
                bool           fsVerOk = System.Version.TryParse(this.FSVersion, out fsVer);

                this.Arguments = "\\IMPORT \"" + file + "\"";
                // Seit FS 3.5 wird das Debug-Paket automatisch mit importiert
                // und seit FS 3.10 gibt es keine Separate Debug-Datei mehr - da passt diese Bedingung hier auch.
                if (fsVerOk && fsVer < new System.Version(3, 5))
                {
                    if (file.EndsWith(".db", StringComparison.OrdinalIgnoreCase))
                    {
                        this.Arguments2 = "\\IMPORT \"" + Path.ChangeExtension(file, ".debugdb") + "\"";
                    }
                    else if (file.EndsWith(".bugfixdb", StringComparison.OrdinalIgnoreCase))
                    {
                        if (fsVer >= new System.Version(3, 4))
                        {
                            this.Arguments2 = "\\IMPORT \"" + Path.ChangeExtension(file, ".debugbugfixdb") + "\"";
                        }
                        else
                        {
                            this.Arguments2 = "\\IMPORT \"" + Path.ChangeExtension(file, ".debugdb") + "\"";
                        }
                    }
                }
            }
            else
            {
                Package = container.ParseParameters(xe.Attribute("Package").Value);
                Version = container.ParseParameters(xe.Attribute("Version").Value);
                var attrMode = xe.Attribute("Mode");
                if (attrMode != null)
                {
                    this.Mode = attrMode.Value;
                }

                string file = Path.Combine(this.Dir, container.CreateExportFileName(this.Package, this.Version, this.FSVersion));

                System.Version fsVer;
                bool           fsVerOk = System.Version.TryParse(this.FSVersion, out fsVer);

                if ("Bugfix".Equals(this.Mode, StringComparison.OrdinalIgnoreCase))
                {
                    if (fsVerOk && fsVer >= new System.Version(3, 8))
                    {
                        // seit FS 3.8 heißt "Bugfix" "Service Release" (SR)
                        this.Arguments = "\\IMPORT \"" + file + ".srdb\"";
                    }
                    else if (fsVerOk && fsVer >= new System.Version(3, 5))
                    {
                        this.Arguments = "\\IMPORT \"" + file + ".bugfixdb\"";
                        // seit FS 3.5 wird das Debug-Paket automatisch mit importiert
                    }
                    else if (fsVerOk && fsVer >= new System.Version(3, 4))
                    {
                        this.Arguments = "\\IMPORT \"" + file + ".bugfixdb\"";
                        // seit FS 3.4 gibt es die debugbugfixdb
                        this.Arguments2 = "\\IMPORT \"" + file + ".debugbugfixdb\"";
                    }
                    else
                    {
                        this.Arguments  = "\\IMPORT \"" + file + ".bugfixdb\"";
                        this.Arguments2 = "\\IMPORT \"" + file + ".debugdb\"";
                    }
                }
                else
                {
                    this.Arguments = "\\IMPORT \"" + file + ".db\"";
                    // Seit FS 3.5 wird das Debug-Paket automatisch mit importiert
                    if (!fsVerOk || fsVer < new System.Version(3, 5))
                    {
                        this.Arguments2 = "\\IMPORT \"" + file + ".debugdb\"";
                    }
                }
            }
        }
Пример #10
0
 public MakeDir(XElement xe, ExecutableContainer container, int indent)
     : base(xe, container, indent)
 {
     this.Dir = container.ParseParameters(xe.Attribute("Dir").Value);
 }
Пример #11
0
 public ApprovedExport(XElement xe, ExecutableContainer container, int indent)
     : base(xe, container, indent)
 {
 }