Example #1
0
    public static void Main(string[] args)
    {
        string version    = "";
        string arch       = "";
        bool   isAllLangs = false;

        for (int i = 0; i < args.Length; i++)
        {
            if (args[i] == "--version" && Regex.Match(args[i + 1], @"^\d+$.^\d+$.^\d+$", RegexOptions.None) != null)
            {
                version = args[i + 1];
            }

            if (args[i] == "--arch" && (args[i + 1] == "x64" || args[i + 1] == "x86"))
            {
                arch = args[i + 1];
            }

            if (args[i] == "--all-languages")
            {
                isAllLangs = true;
            }
        }

        var srvInstaller = new ServerInstaller(version, arch);

        if (isAllLangs)
        {
            srvInstaller.BuildMultilanguageMsi();
        }
        else
        {
            srvInstaller.BuildMsi();
        }
    }
Example #2
0
    public static void Main(string[] args)
    {
        string version    = "";
        string arch       = "";
        bool   isAllLangs = false;

        for (int i = 0; i < args.Length; i++)
        {
            if (args[i] == "--version" && Regex.IsMatch(args[i + 1], @"^([0-9]+\.){2}[0-9]+$"))
            {
                version = args[i + 1];
            }

            if (args[i] == "--arch" && (args[i + 1] == "x64" || args[i + 1] == "x86"))
            {
                arch = args[i + 1];
            }

            if (args[i] == "--all-languages")
            {
                isAllLangs = true;
            }
        }

        if (version != null && arch != null)
        {
            var srvInstaller = new ServerInstaller(version, arch);
            srvInstaller.Version = new Version(version);

            if (isAllLangs)
            {
                srvInstaller.BuildMultilanguageMsi();
            }
            else
            {
                srvInstaller.BuildMsi();
            }
        }
        else
        {
            Console.WriteLine("ERROR - Values for arch or version are null or incorrect!");
            Environment.ExitCode = 0xA0;             // Bad argument
        }
    }