OSDN Git Service

ソフトコレクションファイル対応(branch list4envtrans)をマージ
[applistation/AppliStation.git] / na-get-lib / NaGet.SubCommands / NaGetInstall.cs
index 6b58eac..390f1a0 100644 (file)
@@ -1,4 +1,5 @@
-using System;\r
+using System;\r
+using System.Collections.Generic;\r
 using NaGet.Packages.Install;\r
 using NaGet.Packages;\r
 using NaGet.Net;\r
@@ -13,7 +14,24 @@ namespace NaGet.SubCommands
                \r
                private PackageListsManager pkgListMan;\r
                \r
-               public Downloader Downloader; // TODO \8eQ\8fÆ\82ð\82µ\82Ä\83Z\83b\83g\82·\82é\82æ\82¤\82É\r
+               /// <summary>\r
+               /// ダウンロードに使うダウンローダオブジェクト\r
+               /// </summary>\r
+               public Downloader Downloader {\r
+                       get {\r
+                               if (downloader == null) {\r
+                                       downloader = new Downloader();\r
+                                       downloader.DownloadEventRaised += delegate(object sender, DownloadEventArgs e) {\r
+                                               if (e.Type == DownloadEventType.DOWNLOADING && e.TaskProgressPercent > 0) {\r
+                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.PING, string.Empty, GetProgressPercent(NaGetTaskSetEventType.PING, e.TaskProgressPercent));\r
+                                               }\r
+                                       };\r
+                               }\r
+                               return downloader;\r
+                       }\r
+               }\r
+               \r
+               private Downloader downloader;\r
                \r
                private bool packageInstallerDownloaded = false;\r
                \r
@@ -22,23 +40,23 @@ namespace NaGet.SubCommands
                }\r
                \r
                /// <summary>\r
-               /// \83C\83\93\83X\83g\81[\83\8b\82·\82é\83p\83b\83P\81[\83W\r
+               /// インストールするパッケージ\r
                /// </summary>\r
                public Installation[] Installations;\r
                \r
                /// <summary>\r
-               /// \83R\83\93\83X\83g\83\89\83N\83^\r
+               /// コンストラクタ\r
                /// </summary>\r
-               /// <param name="pkgs">\83C\83\93\83X\83g\81[\83\8b\82·\82é\83p\83b\83P\81[\83W</param>\r
+               /// <param name="pkgs">インストールするパッケージ</param>\r
                public NaGetInstall(PackageListsManager pkgListMan, Package[] pkgs)\r
                        : this(pkgListMan, Installation.ConvertInstallations(pkgs))\r
                {\r
                }\r
                \r
                /// <summary>\r
-               /// \83R\83\93\83X\83g\83\89\83N\83^\r
+               /// コンストラクタ\r
                /// </summary>\r
-               /// <param name="installations">\83C\83\93\83X\83g\81[\83\8b\8f\88\97\9d\82Ì\94z\97ñ</param>\r
+               /// <param name="installations">インストール処理の配列</param>\r
                public NaGetInstall(PackageListsManager pkgMan, Installation[] installations)\r
                {\r
                        pkgListMan = pkgMan;\r
@@ -49,17 +67,18 @@ namespace NaGet.SubCommands
                \r
                private void initializeMainTaskSetNames()\r
                {\r
-                       System.Collections.Generic.List<string> taskSetNames = new System.Collections.Generic.List<string>();\r
+                       List<string> taskSetNames = new List<string>();\r
                        \r
                        for (int i =0; i < Installations.Length; i++) {\r
-                               taskSetNames.Add(string.Format("\8eæ\93¾: {0}", Installations[i].ToString()));\r
+                               taskSetNames.Add(string.Format("取得: {0}", Installations[i].ToString()));\r
+                               taskSetNames.Add(string.Format("ウイルススキャン: {0}", Installations[i].ToString()));\r
                        }\r
-                       taskSetNames.Add("\83C\83\93\83X\83g\81[\83\89\82Ì\8c\9f\8fØ");\r
+                       taskSetNames.Add("インストーラーの検証");\r
                        for (int i =0; i < Installations.Length; i++) {\r
-                               taskSetNames.Add(string.Format("\83C\83\93\83X\83g\81[\83\8b: {0}", Installations[i].ToString()));\r
+                               taskSetNames.Add(string.Format("インストール: {0}", Installations[i].ToString()));\r
                        }\r
-                       taskSetNames.Add(string.Format("\83\8a\83X\83g\8dX\90V: {0}", NaGet.Env.ArchiveInstalledPackageListFile));\r
-                       taskSetNames.Add(string.Format("\83\8a\83X\83g\8dX\90V: {0}", NaGet.Env.SystemInstalledPackageListFile));\r
+                       taskSetNames.Add(string.Format("リスト更新: {0}", NaGet.Env.ArchiveInstalledPackageListFile));\r
+                       taskSetNames.Add(string.Format("リスト更新: {0}", NaGet.Env.SystemInstalledPackageListFile));\r
                        \r
                        TaskSetNames = taskSetNames.ToArray();\r
                }\r
@@ -67,39 +86,51 @@ namespace NaGet.SubCommands
                public override void Run()\r
                {\r
                        currentTaskSetIndex = 0;\r
-                       RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED, "\83C\83\93\83X\83g\81[\83\8b\8f\88\97\9d\8aJ\8en");\r
+                       RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED, "インストール処理開始");\r
                        \r
                        {\r
-                               // \83n\83b\83V\83\85\94ñ\93K\8d\87\82È\83C\83\93\83X\83g\81[\83\89\82Ì\95\\r
-                               System.Collections.Generic.List<Installation> invalidInstallers = null;\r
+                               // ハッシュ非適合なインストーラの表\r
+                               List<Installation> invalidInstallers = null;\r
                                \r
-                               while (invalidInstallers == null || invalidInstallers.Count > 0) {\r
+                               do {\r
                                        currentTaskSetIndex = 0;\r
                                        packageInstallerDownloaded = false;\r
                                        \r
-                                       runDownloadInstallers();\r
-                                       if (done) return; // \82à\82µrunDownloadInstallers()\93à\82Å\83G\83\89\81[\8fI\97¹\82µ\82Ä\82¢\82½\82È\82ç\8fI\97¹\r
+                                       runDownloadAndVirusCheckInstallers();\r
+                                       if (done) return; // もしrunDownloadInstallers()内でエラー終了していたなら終了\r
                                        \r
                                        packageInstallerDownloaded = true;\r
                                        \r
-                                       // \83n\83b\83V\83\85\82Ì\89ó\82ê\82Ä\82¢\82é\83C\83\93\83X\83g\81[\83\89\82ð\8eæ\93¾\r
+                                       \r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
+                                       \r
+                                       // ハッシュの壊れているインストーラーを取得\r
                                        invalidInstallers = runCheckHashForInstaller();\r
                                        \r
-                                       // \83n\83b\83V\83\85\82ª\89ó\82ê\82Ä\82¢\82é\82Æ\82«\82Ì\91Î\8dô\r
-                                       if (invalidInstallers.Count >= 0) {\r
-                                               string msg = string.Format("{0}\8cÂ\82Ì\83p\83b\83P\81[\83W\82Å\83t\83@\83C\83\8b\82ª\89ó\82ê\82Ä\82¢\82é\89Â\94\\90«\82ª\82 \82è\82Ü\82·\n\8b­\90§\93I\82É\83C\83\93\83X\83g\81[\83\8b\82ð\91±\8ds\82µ\82Ü\82·\82©?",\r
-                                                                          invalidInstallers.Count);\r
-                                               NaGetTaskQueryResult result = RaiseTaskSetQueryEvent(msg, NaGetTaskQueryResult.CONTINUE\r
-                                                                                                    | NaGetTaskQueryResult.RETRY\r
-                                                                                                    | NaGetTaskQueryResult.CANCEL);\r
+                                       // ハッシュが壊れているときの対策\r
+                                       if (invalidInstallers.Count > 0) {\r
+                                               System.Text.StringBuilder invalidInstallerNames = new System.Text.StringBuilder();\r
+                                               foreach (Installation invalidInst in invalidInstallers) {\r
+                                                       invalidInstallerNames.AppendFormat(" - {0}\n", invalidInst.ToString());\r
+                                               }\r
+                                               \r
+                                               string msg = string.Format("以下の{0}個のパッケージでファイルが壊れている可能性があります。\n{1}\n強制的にインストールを続行しますか?",\r
+                                                                          invalidInstallers.Count, invalidInstallerNames.ToString());\r
+                                               NaGetTaskQueryResult result = NaGetTaskQueryResult.CANCEL;\r
+                                               \r
+                                               if (!cancelCalled) {\r
+                                                       result = RaiseTaskSetQueryEvent(msg, NaGetTaskQueryResult.CONTINUE\r
+                                                                                       | NaGetTaskQueryResult.RETRY\r
+                                                                                       | NaGetTaskQueryResult.CANCEL);\r
+                                               }\r
                                                \r
                                                switch (result) {\r
                                                        case NaGetTaskQueryResult.CONTINUE:\r
-                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, "\83n\83b\83V\83\85\82Ì\94ñ\90®\8d\87\82ð\96³\8e\8b\82µ\82Ä\83C\83\93\83X\83g\81[\83\8b\82ð\8cp\91±");\r
-                                                               invalidInstallers.Clear(); // \83n\83b\83V\83\85\94ñ\93K\8d\87\83p\83b\83P\81[\83W\82ð\8b­\90§\93I\82É\96\95\8fÁ\r
+                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, "ハッシュの非整合を無視してインストールを継続");\r
+                                                               invalidInstallers.Clear(); // ハッシュ非適合パッケージを強制的に抹消\r
                                                                break;\r
                                                        case NaGetTaskQueryResult.RETRY:\r
-                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "\83_\83E\83\93\83\8d\81[\83h\8f\88\97\9d\82ð\8dÄ\8e\8e\8ds");\r
+                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "ダウンロード処理を再試行");\r
                                                                \r
                                                                foreach (Installation invalidInst in invalidInstallers) {\r
                                                                        invalidInst.RemoveDownloadedFile();\r
@@ -108,24 +139,33 @@ namespace NaGet.SubCommands
                                                                break;\r
                                                        //case NaGetTaskQueryResult.CANCEL:\r
                                                        default:\r
-                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "\83p\83b\83P\81[\83W\82Ì\83C\83\93\83X\83g\81[\83\8b\8f\88\97\9d\82ª\83L\83\83\83\93\83Z\83\8b\82³\82ê\82Ü\82µ\82½");\r
+                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "パッケージのインストール処理がキャンセルされました");\r
                                                                done = true;\r
                                                                return;\r
                                                }\r
                                        }\r
-                                       currentTaskSetIndex ++;\r
-                               }\r
+                                       \r
+                                       // もしハッシュが不適合なソフトがあるならばダウンロード処理からやり直す\r
+                               } while (invalidInstallers == null || invalidInstallers.Count > 0);\r
+                               RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
+                               currentTaskSetIndex ++;\r
                        }\r
                        \r
                        foreach (Installation inst in Installations) {\r
-                               RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, inst.ToString());\r
+                               string installTaskMsg = TaskSetNames[currentTaskSetIndex];\r
+                               if (inst.Silent && (!inst.SupportsSilentOnly)) {\r
+                                       installTaskMsg += " (サイレントインストール)";\r
+                               }\r
+                               \r
+                               RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, installTaskMsg);\r
                                \r
                                try {\r
+                                       \r
                                        inst.ErrorDataReceived += this.ReceivedErrorData;\r
                                        inst.OutputDataReceived += this.ReceivedOutputData;\r
                                        int exitCode = inst.Install();\r
                                        if (exitCode != 0) {\r
-                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, "\83C\83\93\83X\83g\81[\83\8b\82ª\90³\8fí\82É\8fI\82¦\82Ä\82¢\82È\82¢\89Â\94\\90«\82ª\82 \82è\82Ü\82·\81B\83C\83\93\83X\83g\81[\83\89\82Ì\8fI\97¹\83R\81[\83h:"+exitCode);\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, "インストールが正常に終えていない可能性があります。プロセスの終了コード:"+exitCode);\r
                                        }\r
                                        \r
                                        pkgListMan.WriteInstallationLog(inst);\r
@@ -134,94 +174,146 @@ namespace NaGet.SubCommands
                                        done = true;\r
                                        return;\r
                                }\r
+                               RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, installTaskMsg);\r
                                currentTaskSetIndex ++;\r
                                \r
-                               RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, inst.ToString());\r
-                               \r
                                if (cancelCalled) {\r
-                                       RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "\83p\83b\83P\81[\83W\82Ì\83C\83\93\83X\83g\81[\83\8b\8f\88\97\9d\82ª\83L\83\83\83\93\83Z\83\8b\82³\82ê\82Ü\82µ\82½");\r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "パッケージのインストール処理がキャンセルされました");\r
                                        done = true;\r
                                        return;\r
                                }\r
                        }\r
-                       pkgListMan.SaveSystemInstalledLogList(); // \83\8d\83O\82Ì\83R\83~\83b\83g\r
                        \r
                        runLocalUpdate();\r
                        \r
                        done = true;\r
                        \r
-                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED, "\8fI\97¹", 100);\r
+                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED, "終了", 100);\r
                }\r
                \r
                \r
                /// <summary>\r
-               /// \8f\88\97\9d\93à\97e\82Ì\83_\83E\83\93\83\8d\81[\83h\95\94\95ª\82Ì\83T\83u\83\8b\81[\83`\83\93\r
+               /// 処理内容のダウンロード・ウイルススキャン部分のサブルーチン\r
                /// </summary>\r
-               private void runDownloadInstallers()\r
+               private void runDownloadAndVirusCheckInstallers()\r
                {\r
-                       foreach (Installation inst in Installations) {\r
-                               if (! inst.IsInstallablePackage()) {\r
-                                       string msg = string.Format("{0}\82Í\83C\83\93\83X\83g\81[\83\8b\82·\82é\82±\82Æ\82ª\82Å\82«\82Ü\82¹\82ñ", inst.ToString());\r
-                                       \r
-                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, msg);\r
-                                       done = true;\r
-                                       return;\r
-                               }\r
-                               \r
-                               RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, inst.ToString());\r
-                               \r
-                               if (! inst.Downloaded) {\r
-                                       try {\r
-                                               inst.Download(Downloader);\r
-                                       } catch (NaGetTaskCanceledException) {\r
-                                               RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "\83C\83\93\83X\83g\81[\83\89\82Ì\83_\83E\83\93\83\8d\81[\83h\8f\88\97\9d\82ª\83L\83\83\83\93\83Z\83\8b\82³\82ê\82Ü\82µ\82½");\r
+                       using (DownloadScanner scanner = new DownloadScanner()) {\r
+                               scanner.Init();\r
+                               foreach (Installation inst in Installations) {\r
+                                       if (! inst.IsInstallablePackage()) {\r
+                                               string msg = string.Format("{0}はインストールすることができません", inst.ToString());\r
+                                               \r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, msg);\r
                                                done = true;\r
                                                return;\r
-                                       } catch (System.Net.WebException e) {\r
-                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, e.Message);\r
-                                               if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) {\r
-                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, "\83l\83b\83g\83\8f\81[\83N\82É\90Ú\91±\82³\82ê\82Ä\82¢\82Ü\82¹\82ñ\81B");\r
-                                               } else {\r
-                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, "\83l\83b\83g\83\8f\81[\83N\82É\90Ú\91±\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½\81B\83l\83b\83g\83\8f\81[\83N\82ª\90Ø\92f\82³\82ê\82Ä\82¢\82é\82©\81A\83t\83@\83C\83A\83E\83H\81[\83\8b\82É\82æ\82Á\82Ä\8eÕ\92f\82³\82ê\82½\89Â\94\\90«\82ª\82 \82è\82Ü\82·\81B");\r
+                                       }\r
+                                       \r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
+                                       \r
+                                       if (! inst.Downloaded) {\r
+                                               try {\r
+                                                       inst.Download(Downloader);\r
+                                               } catch (NaGetTaskCanceledException) {\r
+                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "インストーラーのダウンロード処理がキャンセルされました");\r
+                                                       done = true;\r
+                                                       return;\r
+                                               } catch (System.Net.WebException e) {\r
+                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, e.Message);\r
+                                                       if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) {\r
+                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, "ネットワークに接続されていません。");\r
+                                                       } else {\r
+                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, "ネットワークに接続できませんでした。ネットワークが切断されているか、ファイアウォールによって遮断された可能性があります。");\r
+                                                       }\r
+                                                       done = true;\r
+                                                       return;\r
+                                               } catch (Exception e) {\r
+                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, e.Message);\r
+                                                       done = true;\r
+                                                       return;\r
                                                }\r
+                                       }\r
+                                       \r
+                                       if (! inst.Downloaded) { // インストールが完了せずに終わった=失敗=エラー\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, string.Format("{0}のインストーラーファイルを正常にダウンロードできませんでした", inst.ToString()));\r
                                                done = true;\r
                                                return;\r
-                                       } catch (Exception e) {\r
-                                               RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, e.Message);\r
+                                       }\r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
+                                       currentTaskSetIndex ++;\r
+                                       \r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
+                                       if (! NaGet.Env.EnableScanInstallerFile) {\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "ウイルススキャンを行わない設定のため、ダウンロードしたファイルはウイルススキャンされませんでした");\r
+                                       } else if (!scanner.HasScanner) {\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "ダウンロードしたファイルはウイルススキャンされませんでした(ウイルススキャンソフトが検出できませんでした)");\r
+                                       } else {\r
+                                               try {\r
+                                                       DownloadScannerResult result = inst.ScanInstallerFile(scanner);\r
+                                                       \r
+                                                       switch (result) {\r
+                                                               case DownloadScannerResult.ScannerNotFound:\r
+                                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "ダウンロードしたファイルはウイルススキャンされませんでした(ウイルススキャンソフトが検出できませんでした)");\r
+                                                                       break;\r
+                                                               case DownloadScannerResult.InfectedAndCleaned:\r
+                                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR,\r
+                                                                                 "インストーラーファイルからウイルス感染が検出されたため、削除されました。");\r
+                                                                       done = true;\r
+                                                                       return;\r
+                                                               case DownloadScannerResult.InfectedButNotCleaned:\r
+                                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR,\r
+                                                                                 "インストーラーファイルからウイルス感染が検出されました。");\r
+                                                                       done = true;\r
+                                                                       break;\r
+                                                               case DownloadScannerResult.ErrorNotFound:\r
+                                                                       throw new System.IO.FileNotFoundException(string.Empty);\r
+                                                                       //break;\r
+                                                       }\r
+                                                       \r
+                                               } catch (System.Runtime.InteropServices.COMException ex) {\r
+                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING,\r
+                                                                         string.Format("{0} (E{1})", ex.Message, ex.ErrorCode));\r
+                                               } catch (System.IO.FileNotFoundException ex) {\r
+                                                       if (ex.InnerException is System.Runtime.InteropServices.COMException) {\r
+                                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING,\r
+                                                                                 string.Format("{0} (E{1})", ex.InnerException.Message, ((System.Runtime.InteropServices.COMException) ex.InnerException).ErrorCode));\r
+                                                       }\r
+                                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, "インストーラーファイルがウイルススキャナーによって削除されました。");\r
+                                                       done = true;\r
+                                                       return;\r
+                                               }\r
+                                       }\r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
+                                       currentTaskSetIndex ++;\r
+                                       \r
+                                       if (cancelCalled) {\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.CANCELED, "パッケージのインストール処理がキャンセルされました");\r
                                                done = true;\r
                                                return;\r
                                        }\r
                                }\r
-                               currentTaskSetIndex ++;\r
-                               \r
-                               if (inst.Downloaded) { // \90³\8fí\8fI\97¹\r
-                                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, inst.ToString());\r
-                               } else { // \83C\83\93\83X\83g\81[\83\8b\82ª\8a®\97¹\82¹\82¸\82É\8fI\82í\82Á\82½=\8e¸\94s=\83G\83\89\81[\r
-                                       RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, string.Format("{0}\82Ì\83C\83\93\83X\83g\81[\83\89\82ð\90³\8fí\82É\83_\83E\83\93\83\8d\81[\83h\82Å\82«\82Ü\82¹\82ñ\82Å\82µ\82½", inst.ToString()));\r
-                               }\r
                        }\r
                }\r
                \r
                /// <summary>\r
-               /// \83_\83E\83\93\83\8d\81[\83h\82µ\82½\83p\83b\83P\81[\83W\82ª\90®\8d\87\82µ\82½\82©\94Û\82©\83n\83b\83V\83\85\82Å\83`\83F\83b\83N\r
+               /// ダウンロードしたパッケージが整合したか否かハッシュでチェック\r
                /// </summary>\r
-               /// <returns>\90®\8d\87\82µ\82È\82©\82Á\82½\83C\83\93\83X\83g\81[\83\89\82Ì\83\8a\83X\83g</returns>\r
-               private System.Collections.Generic.List<Installation> runCheckHashForInstaller()\r
+               /// <returns>整合しなかったインストーラーのリスト</returns>\r
+               private List<Installation> runCheckHashForInstaller()\r
                {\r
-                       System.Collections.Generic.List<Installation> invalidInstallers = new System.Collections.Generic.List<Installation>();\r
+                       List<Installation> invalidInstallers = new List<Installation>();\r
                        \r
                        int i = 0;\r
                        foreach (Installation inst in Installations) {\r
                                float percent = (CurrentTaskSetIndex+((float)i / Installations.Length))*100f/TaskSetNames.Length;\r
                                \r
                                if (inst.GetRegisteredHashCount() > 0) {\r
-                                       RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "\8c\9f\8fØ: "+inst.ToString(), percent);\r
+                                       RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "検証: "+inst.ToString(), percent);\r
                                        \r
                                        if (inst.IsInstallablePackage() && inst.VerifyHashValues() == false) {\r
                                                invalidInstallers.Add(inst);\r
-                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, "\8c\9f\8fØ: "+inst.ToString() + " \94ñ\90®\8d\87", percent);\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.WARNING, "検証: "+inst.ToString() + " 非整合", percent);\r
                                        } else {\r
-                                               RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "\8c\9f\8fØ: "+inst.ToString() + " OK", percent);\r
+                                               RaiseTaskSetEvent(NaGetTaskSetEventType.INFO, "検証: "+inst.ToString() + " OK", percent);\r
                                        }\r
                                }\r
                                i++;\r
@@ -232,19 +324,19 @@ namespace NaGet.SubCommands
                \r
                private void runLocalUpdate()\r
                {\r
-                       // \83C\83\93\83X\83g\81[\83\8b\83g\83\8a\83X\83g\82Ì\8dX\90V\r
+                       // インストールトリストの更新\r
                        RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
                        pkgListMan.DetectInstalledPkgs();\r
                        pkgListMan.SaveInstalledPackageList();\r
+                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
                        currentTaskSetIndex++;\r
-                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex-1]);\r
                \r
-                       // \83V\83X\83e\83\80\82É\83C\83\93\83X\83g\81[\83\8b\82³\82ê\82Ä\82¢\82é\83\8a\83X\83g\82Ì\8dX\90V\r
+                       // システムにインストールされているリストの更新\r
                        RaiseTaskSetEvent(NaGetTaskSetEventType.STARTED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
                        pkgListMan.DetectSystemInstalledPkgs();\r
                        pkgListMan.SaveSystemInstalledPackageList();\r
+                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex]);\r
                        currentTaskSetIndex++;\r
-                       RaiseTaskSetEvent(NaGetTaskSetEventType.COMPLETED_TASKSET, TaskSetNames[currentTaskSetIndex-1]);\r
                }\r
                \r
                public override bool Done {\r