Update ApplicationUpdater

pull/702/head
Eric Reed 12 years ago
parent ef0ed773b8
commit 71223ed1a8

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="product" value="server" />
<add key="class" value="Beta" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

@ -15,15 +15,19 @@ namespace MediaBrowser.Common.Implementations.Updates
/// </summary> /// </summary>
public class ApplicationUpdater public class ApplicationUpdater
{ {
private const string UpdaterExe = "Mediabrowser.Installer.exe"; private const string UpdaterExe = "Mediabrowser.Updater.exe";
private const string UpdaterDll = "Mediabrowser.InstallUtil.dll";
public void UpdateApplication(MBApplication app, IApplicationPaths appPaths, string archive) public void UpdateApplication(MBApplication app, IApplicationPaths appPaths, string archive)
{ {
// Use our installer passing it the specific archive // Use our installer passing it the specific archive
// We need to copy to a temp directory and execute it there // We need to copy to a temp directory and execute it there
var source = Path.Combine(appPaths.ProgramSystemPath, UpdaterExe); var source = Path.Combine(appPaths.ProgramSystemPath, UpdaterExe);
var tempUpdater = Path.Combine(Path.GetTempPath(), UpdaterExe); var tempUpdater = Path.Combine(Path.GetTempPath(), UpdaterExe);
var product = app == MBApplication.MBTheater ? "mbt" : "server";
File.Copy(source, tempUpdater, true); File.Copy(source, tempUpdater, true);
source = Path.Combine(appPaths.ProgramSystemPath, UpdaterDll);
var tempUpdaterDll = Path.Combine(Path.GetTempPath(), UpdaterDll);
File.Copy(source, tempUpdaterDll, true);
var product = app == MBApplication.MBTheater ? "mbt" : "server";
// Our updater needs SS and ionic // Our updater needs SS and ionic
source = Path.Combine(appPaths.ProgramSystemPath, "ServiceStack.Text.dll"); source = Path.Combine(appPaths.ProgramSystemPath, "ServiceStack.Text.dll");
File.Copy(source, Path.Combine(Path.GetTempPath(), "ServiceStack.Text.dll"), true); File.Copy(source, Path.Combine(Path.GetTempPath(), "ServiceStack.Text.dll"), true);

@ -387,11 +387,10 @@ mkdir "$(SolutionDir)..\Deploy\Server\System"
rmdir "$(SolutionDir)..\Deploy\Server\Pismo" /s /q rmdir "$(SolutionDir)..\Deploy\Server\Pismo" /s /q
mkdir "$(SolutionDir)..\Deploy\Server\Pismo" mkdir "$(SolutionDir)..\Deploy\Server\Pismo"
xcopy "$(TargetDir)$(TargetFileName)" "$(SolutionDir)..\Deploy\Server\System\" /y xcopy "$(TargetDir)$(TargetFileName)" "$(SolutionDir)..\Deploy\Server\System\" /y
xcopy "$(SolutionDir)Mediabrowser.Uninstaller\bin\Release\MediaBrowser.Uninstaller.exe.config" "$(SolutionDir)..\Deploy\Server\System\" /y xcopy "$(SolutionDir)Installation\MediaBrowser.Uninstaller.exe.config" "$(SolutionDir)..\Deploy\Server\System\" /y
xcopy "$(SolutionDir)Mediabrowser.Uninstaller.Execute\bin\Release\MediaBrowser.Uninstaller.Execute.exe.config" "$(SolutionDir)..\Deploy\Server\System\" /y xcopy "$(SolutionDir)Installation\MediaBrowser.Uninstaller.exe" "$(SolutionDir)..\Deploy\Server\System\" /y
xcopy "$(SolutionDir)Mediabrowser.Uninstaller\bin\Release\MediaBrowser.Uninstaller.exe" "$(SolutionDir)..\Deploy\Server\System\" /y xcopy "$(SolutionDir)Installation\MediaBrowser.InstallUtil.dll" "$(SolutionDir)..\Deploy\Server\System\" /y
xcopy "$(SolutionDir)Mediabrowser.Uninstaller.Execute\bin\Release\MediaBrowser.Uninstaller.Execute.exe" "$(SolutionDir)..\Deploy\Server\System\" /y xcopy "$(SolutionDir)Installation\MediaBrowser.Updater.exe" "$(SolutionDir)..\Deploy\Server\System\" /y
xcopy "$(SolutionDir)Mediabrowser.Installer\bin\Release\MediaBrowser.Installer.exe" "$(SolutionDir)..\Deploy\Server\System\" /y
//Pismo //Pismo
"$(SolutionDir)ThirdParty\7zip\7za" x "$(SolutionDir)ThirdParty\Pismo-Install\pfm-168-mediabrowser-win.zip" -o"$(SolutionDir)..\Deploy\Server\Pismo\" -y "$(SolutionDir)ThirdParty\7zip\7za" x "$(SolutionDir)ThirdParty\Pismo-Install\pfm-168-mediabrowser-win.zip" -o"$(SolutionDir)..\Deploy\Server\Pismo\" -y

@ -27,14 +27,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget (2)", ".nuget (2)",
.nuget\NuGet.targets = .nuget\NuGet.targets .nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Installer", "MediaBrowser.Installer\MediaBrowser.Installer.csproj", "{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Common.Implementations", "MediaBrowser.Common.Implementations\MediaBrowser.Common.Implementations.csproj", "{C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Common.Implementations", "MediaBrowser.Common.Implementations\MediaBrowser.Common.Implementations.csproj", "{C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Server.Implementations", "MediaBrowser.Server.Implementations\MediaBrowser.Server.Implementations.csproj", "{2E781478-814D-4A48-9D80-BFF206441A65}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Server.Implementations", "MediaBrowser.Server.Implementations\MediaBrowser.Server.Implementations.csproj", "{2E781478-814D-4A48-9D80-BFF206441A65}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Uninstaller", "MediaBrowser.Uninstaller\MediaBrowser.Uninstaller.csproj", "{FACAF749-3E28-46DD-B613-654FCD434959}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -145,20 +141,6 @@ Global
{5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|x64.ActiveCfg = Release|Any CPU {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|x64.ActiveCfg = Release|Any CPU
{5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|x86.ActiveCfg = Release|Any CPU {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|x86.ActiveCfg = Release|Any CPU
{5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|x86.Build.0 = Release|Any CPU {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|x86.Build.0 = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|Win32.ActiveCfg = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|x64.ActiveCfg = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Debug|x86.ActiveCfg = Debug|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|Any CPU.Build.0 = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|Win32.ActiveCfg = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|x64.ActiveCfg = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|x86.ActiveCfg = Release|Any CPU
{C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {C4D2573A-3FD3-441F-81AF-174AC4CD4E1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@ -187,25 +169,8 @@ Global
{2E781478-814D-4A48-9D80-BFF206441A65}.Release|Win32.ActiveCfg = Release|Any CPU {2E781478-814D-4A48-9D80-BFF206441A65}.Release|Win32.ActiveCfg = Release|Any CPU
{2E781478-814D-4A48-9D80-BFF206441A65}.Release|x64.ActiveCfg = Release|Any CPU {2E781478-814D-4A48-9D80-BFF206441A65}.Release|x64.ActiveCfg = Release|Any CPU
{2E781478-814D-4A48-9D80-BFF206441A65}.Release|x86.ActiveCfg = Release|Any CPU {2E781478-814D-4A48-9D80-BFF206441A65}.Release|x86.ActiveCfg = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|Win32.ActiveCfg = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|x64.ActiveCfg = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Debug|x86.ActiveCfg = Debug|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|Any CPU.Build.0 = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|Win32.ActiveCfg = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|x64.ActiveCfg = Release|Any CPU
{FACAF749-3E28-46DD-B613-654FCD434959}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal EndGlobal

Loading…
Cancel
Save