Пример #1
0
            public override ExitCode Execute()
            {
                var    catalog = GetCatalog();
                string query   = AdditionalArgs.JoinEscapeArguments();

                Handler.Output(Resources.AppList, catalog.Search(query));
                return(ExitCode.OK);
            }
Пример #2
0
        /// <inheritdoc/>
        public override void Parse(IEnumerable <string> args)
        {
            if (Options.Parse(args).Count != 0)
            {
                throw new OptionException(Resources.TooManyArguments + "\n" + AdditionalArgs.JoinEscapeArguments(), "");
            }

            Requirements.InterfaceUri = Config.SelfUpdateUri;

            // Pass in the installation directory to the updater as an argument
            AdditionalArgs.Add(Locations.InstallBase);

            if (_restartCentral)
            {
                AdditionalArgs.Add("--restart-central");
            }
        }
Пример #3
0
            /// <inheritdoc/>
            public override void Parse(IEnumerable <string> args)
            {
                // NOTE: Does not call base method

                AdditionalArgs.AddRange(Options.Parse(args));
                if (AdditionalArgs.Count != 0)
                {
                    throw new OptionException(Resources.TooManyArguments + Environment.NewLine + AdditionalArgs.JoinEscapeArguments(), null);
                }

                SetInterfaceUri(Config.SelfUpdateUri ?? throw new UriFormatException(Resources.SelfUpdateDisabled));
                if (ProgramUtils.GuiAssemblyName != null)
                {
                    Requirements.Command = Command.NameRunGui;
                }

                // Instruct new version of Zero Install in the cache to deploy itself over the location of the current version
                AdditionalArgs.AddRange(new[] { Self.AltName, Deploy.Name, "--batch", Locations.InstallBase });

                if (_restartCentral)
                {
                    AdditionalArgs.Add("--restart-central");
                }
            }
Пример #4
0
        /// <inheritdoc/>
        public override void Parse(IReadOnlyList <string> args)
        {
            // NOTE: Does not call base method

            if (Options.Parse(args).Count != 0)
            {
                throw new OptionException(Resources.TooManyArguments + Environment.NewLine + AdditionalArgs.JoinEscapeArguments(), null);
            }

            SetInterfaceUri(Config.SelfUpdateUri ?? throw new UriFormatException(Resources.SelfUpdateDisabled));
            if (WindowsUtils.IsGuiSession)
            {
                Requirements.Command = Command.NameRunGui;
            }

            FeedManager.Refresh = true;
        }