Ejemplo n.º 1
0
        internal static string GetPlatform(params string[] args)
        {
            string platform = "internal"; // "prod" is another option

            var argumentProcessor = new Utils.CmdLineArgs(args);

            // check platform base on the name of installer
            if (argumentProcessor.CheckArg("prod"))
            {
                platform = "prod";
            }
            else if (argumentProcessor.CheckArg("internal"))
            {
                platform = "internal";
            }
            else if (argumentProcessor.CheckArg("update"))
            {
                // in case of update we default this to prod https://lavasoft.atlassian.net/browse/WC-1972
                platform = "prod";
            }
            else
            {
                var myName = Process.GetCurrentProcess().ProcessName;
                if (myName.EndsWith("-prod"))
                {
                    platform = "prod";
                }
            }

            return(platform);
        }
        internal CreatePartnerInfoStep(params string[] args)
        {
            var argumentProcessor = new Utils.CmdLineArgs(args);

            if (argumentProcessor.CheckArg("partner"))
            {
                _partnerId = argumentProcessor.GetArgValue("partner");
            }
            if (argumentProcessor.CheckArg("campaign"))
            {
                _campaignId = argumentProcessor.GetArgValue("campaign");
            }
            if (argumentProcessor.CheckArg("xToken"))
            {
                _xToken = argumentProcessor.GetArgValue("xToken");
            }
        }
Ejemplo n.º 3
0
        internal DownloadStep(string tmpFolder, TimeSpan timeout, int maxRetries, params string[] args)
        {
            _tmpFolder         = tmpFolder;
            _timeout           = timeout;
            _iMaxDownloadRetry = maxRetries;

            var argumentProcessor = new Utils.CmdLineArgs(args);

            if (argumentProcessor.CheckArg("version"))
            {
                _version = argumentProcessor.GetArgValue("version");
            }
            if (argumentProcessor.CheckArg("zip"))
            {
                _useZipFile = argumentProcessor.GetArgValue("zip");
            }

            // check platform base on the name of installer
            //_platform = InstallUtils.GetPlatform(args);
        }