Ejemplo n.º 1
0
 private static void Reinstall(string identifier, bool force)
 {
     RepoManagement.GetReposFromDisk();
     App[] apps = AppExtras.FindApps(identifier);
     if (apps.Length == 0)
     {
         Console.WriteLine("Package not found.");
     }
     else
     {
         App tmp = apps.First();
         Console.WriteLine($"Reinstalling {tmp.Name}");
         AppExtras.Update(tmp, force);
     }
     Console.WriteLine("Done!");
 }
Ejemplo n.º 2
0
        public override void Run()
        {
#if !DEBUG
            try
            {
#endif
            AppExtras.Update(App, false);
            _postInstall?.Invoke();
#if !DEBUG
        }

        catch (Exception e1)
        {
            MessageBox.Show(e1.ToString(), "Install failed");
        }
#endif
        }
Ejemplo n.º 3
0
        private static void DistUpgrade()
        {
            RepoManagement.GetReposFromDisk();
            foreach (KeyValuePair <Guid, App> app in GlobalVariables.Apps.Where(s =>
                                                                                (s.Value.Status & Status.Updatable) == Status.Updatable))
            {
                Console.WriteLine($"Updating {app.Value.Name}");
                AppExtras.Update(app.Value, false);
            }
#if !DEBUG
            if (Assembly.GetExecutingAssembly().GetName().Version < UpdateCheck.OnlineVersion)
            {
                Console.WriteLine("Updating self");
                Other.UpgradeSelf(false);
            }
#endif
            Console.WriteLine("Done!");
        }
Ejemplo n.º 4
0
 private static void Upgrade(string identifier, bool force)
 {
     RepoManagement.GetReposFromDisk();
     App[] apps = AppExtras.FindApps(identifier);
     if (apps.Length == 0)
     {
         Console.WriteLine("Package not found.");
     }
     else
     {
         App tmp = apps.First();
         if ((tmp.Status & Status.Updatable) == Status.Updatable)
         {
             Console.WriteLine($"Upgrading {tmp.Name}");
             AppExtras.Update(tmp, force);
         }
         else
         {
             Console.WriteLine("Package is up-to-date");
         }
     }
     Console.WriteLine("Done!");
 }