#1460 #865 working on the auto updater

This commit is contained in:
Jamie.Rees 2017-08-31 10:57:16 +01:00
parent ff242f2531
commit f60d133f41
11 changed files with 77 additions and 39 deletions

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace Ombi.Updater
@ -30,10 +31,16 @@ namespace Ombi.Updater
private void StartOmbi(StartupOptions options)
{
var fileName = "Ombi.exe";
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
fileName = "Ombi";
}
var start = new ProcessStartInfo
{
UseShellExecute = false,
FileName = Path.Combine(options.ApplicationPath,"Ombi.exe"),
FileName = Path.Combine(options.ApplicationPath,fileName),
WorkingDirectory = options.ApplicationPath
};
using (var proc = new Process { StartInfo = start })