diff --git a/MediaBrowser.Common.Implementations/Updates/ApplicationUpdater.cs b/MediaBrowser.Common.Implementations/Updates/ApplicationUpdater.cs index 6c2aa2f5c7..c01430026d 100644 --- a/MediaBrowser.Common.Implementations/Updates/ApplicationUpdater.cs +++ b/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 } diff --git a/MediaBrowser.Common.Implementations/Updates/PackageManager.cs b/MediaBrowser.Common.Implementations/Updates/PackageManager.cs index 02a7a524f9..778a793a94 100644 --- a/MediaBrowser.Common.Implementations/Updates/PackageManager.cs +++ b/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) { diff --git a/MediaBrowser.sln b/MediaBrowser.sln index ce16b4d2e7..a5612a287a 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -189,7 +189,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal