OSDN Git Service

na-get-lib,起動高速化機能追加時にインストール済みソフトのバージョン認識がされていないことがあったのを修正。
[applistation/AppliStation.git] / all-get / Main.cs
index 90eb234..876d8aa 100644 (file)
@@ -80,6 +80,7 @@ namespace AllGet
                        downloader.DownloadEventRaised += new EventHandler<DownloadEventArgs>(dl.OnDownload);\r
                        \r
                        pkgListMan = new PackageListsManager();\r
+                       pkgListMan.LoadPackageLists();\r
                }\r
                \r
                public void Update()\r
@@ -95,7 +96,6 @@ namespace AllGet
                public void update(bool downloadPackageListFlag)\r
                {\r
                        NaGet.SubCommands.NaGetUpdate tasks = new NaGet.SubCommands.NaGetUpdate(pkgListMan, downloadPackageListFlag);\r
-                       tasks.Downloader = this.downloader;\r
                        tasks.TaskSetRaised += delegate(object sender, NaGetTaskSetEventArgs e) { \r
                                switch (e.Type) {\r
 //                                     case NaGetTaskSetEventType.COMPLETED_TASKSET\r
@@ -118,6 +118,8 @@ namespace AllGet
                                                break;\r
                                }\r
                        };\r
+                       DownloadListener dl = new DownloadListener();\r
+                       tasks.Downloader.DownloadEventRaised += dl.OnDownload;\r
                        \r
                        tasks.Run();\r
                }\r
@@ -288,6 +290,13 @@ namespace AllGet
                                }\r
                        }\r
                        \r
+                       Installation[] depInstallations;\r
+                       {\r
+                               Installation[] resolved;\r
+                               DependeciesResolver.ResolveInstallations(installations, pkgListMan, out resolved, out depInstallations);\r
+                               installations = resolved;\r
+                       }\r
+                       \r
                        Console.WriteLine("The following packages will be downloaded:");\r
                        Console.WriteLine("  {0}", Installation.ToString(installations));\r
                        if (AllGet.Util.Confirm("Do you want to continue [Y/n]?", true) == false) {\r
@@ -296,7 +305,6 @@ namespace AllGet
                        }\r
                        \r
                        NaGet.SubCommands.NaGetInstall tasks = new NaGet.SubCommands.NaGetInstall(pkgListMan, installations);\r
-                       tasks.Downloader = this.downloader;\r
                        tasks.TaskQueryRaised += delegate(object sender, NaGetTaskQueryArgs e) {\r
                                char result = '\u0000';\r
                                if (e.SelectionFlag == (NaGetTaskQueryResult.CONTINUE | NaGetTaskQueryResult.RETRY | NaGetTaskQueryResult.CANCEL)) {\r
@@ -342,6 +350,8 @@ namespace AllGet
                                                break;\r
                                }\r
                        };\r
+                       DownloadListener dl = new DownloadListener();\r
+                       tasks.Downloader.DownloadEventRaised += dl.OnDownload;\r
                        \r
                        tasks.Run();\r
                }\r
@@ -478,6 +488,7 @@ namespace AllGet
                        Console.WriteLine("誰か {0} をスーパー牛さんパワー化してくれ", executeFileName);\r
                }\r
                \r
+               [STAThread]\r
                public static void Main(string[] args)\r
                {\r
                        // アーカイブSYSTEM32をパスに足す\r