Hmm...
This commit is contained in:
@ -144,8 +144,10 @@ namespace RageCoop.Server
|
||||
Logger?.Info("Installing update");
|
||||
Directory.CreateDirectory("Update");
|
||||
new FastZip().ExtractZip("Update.zip", "Update", FastZip.Overwrite.Always, null, null, null, true);
|
||||
MainNetServer.Shutdown("Server updating");
|
||||
Logger.Info("Server shutting down!");
|
||||
Logger.Flush();
|
||||
Process.Start(Path.Combine("Update", RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "RageCoop.Server.exe": "RageCoop.Server"), "update \"" + AppDomain.CurrentDomain.BaseDirectory + "\"");
|
||||
Stop();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
@ -21,18 +21,21 @@ namespace RageCoop.Server
|
||||
int i =0;
|
||||
while (i < 10)
|
||||
{
|
||||
i++;
|
||||
try
|
||||
{
|
||||
Console.WriteLine("Applying update to "+target);
|
||||
CoreUtils.CopyFilesRecursively(new(AppDomain.CurrentDomain.BaseDirectory), new(target));
|
||||
Process.Start(Path.Combine(target, "RageCoop.Server"));
|
||||
Environment.Exit(0);
|
||||
}
|
||||
catch
|
||||
catch(Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
Thread.Sleep(3000);
|
||||
}
|
||||
}
|
||||
return;
|
||||
Environment.Exit(i);
|
||||
}
|
||||
AppDomain.CurrentDomain.UnhandledException+=UnhandledException;
|
||||
mainLogger = new Logger()
|
||||
|
@ -15,7 +15,7 @@ using System.Resources;
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("1.5.1.62")]
|
||||
[assembly: AssemblyFileVersion("1.5.1.62")]
|
||||
[assembly: AssemblyVersion("0.5.1.69")]
|
||||
[assembly: AssemblyFileVersion("0.5.1.69")]
|
||||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
||||
|
||||
|
Reference in New Issue
Block a user