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