소스 검색

Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser

Luke Pulverenti 12 년 전
부모
커밋
1ff8df292e

+ 8 - 1
MediaBrowser.Common.Implementations/Updates/ApplicationUpdater.cs

@@ -19,6 +19,13 @@ namespace MediaBrowser.Common.Implementations.Updates
         private const string UpdaterDll = "Mediabrowser.InstallUtil.dll";
         public void UpdateApplication(MBApplication app, IApplicationPaths appPaths, string archive)
         {
+            // First see if there is a version file and read that in
+            var version = "Unknown";
+            if (File.Exists(archive + ".ver"))
+            {
+                version = File.ReadAllText(archive + ".ver");
+            }
+
             // Use our installer passing it the specific archive
             // We need to copy to a temp directory and execute it there
             var source = Path.Combine(appPaths.ProgramSystemPath, UpdaterExe);
@@ -33,7 +40,7 @@ namespace MediaBrowser.Common.Implementations.Updates
             File.Copy(source, Path.Combine(Path.GetTempPath(), "ServiceStack.Text.dll"), true);
             source = Path.Combine(appPaths.ProgramSystemPath, "Ionic.Zip.dll");
             File.Copy(source, Path.Combine(Path.GetTempPath(), "Ionic.Zip.dll"), true);
-            Process.Start(tempUpdater, string.Format("product={0} archive=\"{1}\" caller={2} pismo=false", product, archive, Process.GetCurrentProcess().Id));
+            Process.Start(tempUpdater, string.Format("product={0} archive=\"{1}\" caller={2} pismo=false version={3}", product, archive, Process.GetCurrentProcess().Id, version));
 
             // That's it.  The installer will do the work once we exit
         }

+ 5 - 0
MediaBrowser.Common.Implementations/Updates/PackageManager.cs

@@ -101,6 +101,11 @@ namespace MediaBrowser.Common.Implementations.Updates
             try
             {
                 File.Copy(tempFile, target, true);
+                //If it is an archive - write out a version file so we know what it is
+                if (isArchive)
+                {
+                    File.WriteAllText(target+".ver", package.versionStr);
+                }
             }
             catch (IOException e)
             {

+ 0 - 3
MediaBrowser.sln

@@ -189,7 +189,4 @@ Global
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
-	GlobalSection(Performance) = preSolution
-		HasPerformanceSessions = true
-	EndGlobalSection
 EndGlobal