Ejemplo n.º 1
0
 public void Install(IPackageInstaller installer)
 {
     updateClient.UpdateStatus("Installing client update...");
     string[] filesToInstall = new string[] { "PMU.exe",
                                              "PMU.Core.dll", "PMU.Sockets.dll", "PMU.Net.dll",
                                              "SdlDotNet.Widgets.dll", "SdlDotNet.dll", "bass.dll", "bassmidi.dll",
                                              "PMU.Compression.dll" };
     for (int i = 0; i < filesToInstall.Length; i++)
     {
         string fullPath = installer.GetFullPath(filesToInstall[i]);
         if (installer.FileExists(fullPath, false))
         {
             System.Diagnostics.Process[] procs  = System.Diagnostics.Process.GetProcesses();
             System.Diagnostics.Process   myProc = System.Diagnostics.Process.GetCurrentProcess();
             for (int n = 0; n < procs.Length; n++)
             {
                 if (procs[n].ProcessName == "PMU")
                 {
                     if (procs[n].Id != myProc.Id)
                     {
                         try {
                             procs[n].Kill();
                         } catch { }
                     }
                 }
             }
             if (installer.FileExists(fullPath + ".ToDelete", false))
             {
                 installer.DeleteFile(fullPath + ".ToDelete", false);
             }
             File.Move(fullPath, fullPath + ".ToDelete");
         }
     }
     installer.ExtractAll();
 }
Ejemplo n.º 2
0
 public void Install(IPackageInstaller installer)
 {
     updateClient.UpdateStatus("Extracting graphic files...");
     installer.ExtractAll();
 }