mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Finished BackupServer and UpdateServer
This commit is contained in:
parent
824daed0d1
commit
0f3c6e6be9
28 changed files with 618 additions and 216 deletions
|
|
@ -3,6 +3,7 @@ using ServerManagerTool.Common;
|
|||
using ServerManagerTool.Common.Lib;
|
||||
using ServerManagerTool.Common.Model;
|
||||
using ServerManagerTool.Common.Utils;
|
||||
using ServerManagerTool.Delegates;
|
||||
using ServerManagerTool.Enums;
|
||||
using ServerManagerTool.Plugin.Common;
|
||||
using ServerManagerTool.Utils;
|
||||
|
|
@ -108,6 +109,7 @@ namespace ServerManagerTool.Lib
|
|||
public int ShutdownInterval = Config.Default.ServerShutdown_GracePeriod;
|
||||
public ProgressDelegate ProgressCallback = null;
|
||||
public ProcessWindowStyle SteamCMDProcessWindowStyle = ProcessWindowStyle.Minimized;
|
||||
public ServerStatusChangeDelegate ServerStatusChangeCallback = null;
|
||||
|
||||
public ServerApp(bool resetStartTime = false)
|
||||
{
|
||||
|
|
@ -261,7 +263,15 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
if (updateServer)
|
||||
{
|
||||
UpgradeLocal(true, steamCmdRemoveQuit, cancellationToken, true);
|
||||
try
|
||||
{
|
||||
ServerStatusChangeCallback?.Invoke(ServerStatus.Updating);
|
||||
UpgradeLocal(true, steamCmdRemoveQuit, cancellationToken, true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ServerStatusChangeCallback?.Invoke(ServerStatus.Stopped);
|
||||
}
|
||||
}
|
||||
|
||||
if (ExitCode != EXITCODE_NORMALEXIT)
|
||||
|
|
@ -3060,7 +3070,7 @@ namespace ServerManagerTool.Lib
|
|||
|
||||
if (exitCode == EXITCODE_NORMALEXIT)
|
||||
{
|
||||
var branches = _profiles.Keys.Where(p => p.EnableAutoUpdate).Select(p => new BranchSnapshot() { BranchName = p.BranchName, BranchPassword = p.BranchPassword }).Distinct(new BranchSnapshotComparer()).ToArray();
|
||||
var branches = _profiles.Keys.Where(p => p.EnableAutoUpdate).Select(p => BranchSnapshot.Create(p)).Distinct(new BranchSnapshotComparer()).ToArray();
|
||||
var exitCodes = new ConcurrentDictionary<BranchSnapshot, int>();
|
||||
|
||||
// update the server cache for each branch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue