Merge pull request #28 from Lacoi/source

latest asm and csm fixes and changes
This commit is contained in:
Brett Hewitson 2023-06-26 14:13:03 +10:00 committed by GitHub
commit 3a6bd0789e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 290 additions and 48 deletions

View file

@ -907,11 +907,14 @@
<value />
</setting>
<setting name="AutoBackup_ParallelBackup" serializeAs="String">
<value>False</value>
<value>True</value>
</setting>
<setting name="AutoBackup_SequencialDelayPeriod" serializeAs="String">
<value>10</value>
</setting>
<setting name="SteamCmdIgnoreExitStatusCodes" serializeAs="String">
<value />
</setting>
</ServerManagerTool.Config>
</userSettings>
</configuration>

View file

@ -808,7 +808,20 @@ namespace ServerManagerTool {
this["SteamCmdRedirectOutput"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SteamCmdIgnoreExitStatusCodes
{
get {
return ((string)(this["SteamCmdIgnoreExitStatusCodes"]));
}
set {
this["SteamCmdIgnoreExitStatusCodes"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]

View file

@ -798,6 +798,8 @@
<sys:String x:Key="GlobalSettings_LoggingMaxArchiveFilesTooltip">The maximum number of log files that will be kept.</sys:String>
<sys:String x:Key="GlobalSettings_RCON_ModeLabel">RCON Broadcast Mode:</sys:String>
<sys:String x:Key="GlobalSettings_RCON_ModeTooltip">Select the method used by the server manager to send auto process messages to the game clients via RCON.</sys:String>
<sys:String x:Key="GlobalSettings_SteamCmdIgnoreExitStatusCodesLabel">Ignore following SteamCmd ExitStatus</sys:String>
<sys:String x:Key="GlobalSettings_SteamCmdIgnoreExitStatusCodesTooltip">A comma-separated list of exit staus ids, which are considered correct.</sys:String>
<sys:String x:Key="GlobalSettings_TaskPriority_InformationLabel">Any changes to these priorities will take effect after the task has been created or saved.</sys:String>
<sys:String x:Key="GlobalSettings_TaskPriority_Tooltip">Select the priority used by the windows task manager when running this task.</sys:String>

View file

@ -837,7 +837,9 @@ namespace ServerManagerTool.Lib
SteamCMDProcessWindowStyle = ProcessWindowStyle.Normal;
}
success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, _profile.InstallDirectory, Config.Default.SteamCmdRedirectOutput ? (DataReceivedEventHandler)serverOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, _profile.InstallDirectory, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? (DataReceivedEventHandler)serverOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
if (success && downloadSuccessful)
{
LogProfileMessage("Finished server update.");
@ -1019,7 +1021,9 @@ namespace ServerManagerTool.Lib
else
steamCmdArgs = SteamUtils.BuildSteamCmdArguments(steamCmdRemoveQuit, Config.Default.SteamCmdInstallModArgsFormat, Config.Default.SteamCmd_Username, _profile.SotFEnabled ? Config.Default.AppId_SotF : Config.Default.AppId, modId);
modSuccess = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
modSuccess = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
if (modSuccess && downloadSuccessful)
{
LogProfileMessage("Finished mod download.");
@ -1734,7 +1738,9 @@ namespace ServerManagerTool.Lib
steamCmdArgs = SteamUtils.BuildSteamCmdArguments(false, Config.Default.SteamCmdInstallModArgsFormat, Config.Default.SteamCmd_Username, appMod.AppId, modId);
var workingDirectory = Config.Default.DataDir;
var success = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
var success = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
if (success && downloadSuccessful)
// download was successful, exit loop and continue.
break;
@ -1857,7 +1863,9 @@ namespace ServerManagerTool.Lib
var steamCmdArgs = SteamUtils.BuildSteamCmdArguments(false, Config.Default.SteamCmdInstallServerArgsFormat, Config.Default.SteamCmd_AnonymousUsername, cacheFolder, appIdServer, steamCmdInstallServerBetaArgs.ToString(), validate ? "validate" : string.Empty);
var workingDirectory = Config.Default.DataDir;
var success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, cacheFolder, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
var success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, cacheFolder, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
if (success && downloadSuccessful)
// download was successful, exit loop and continue.
break;
@ -1979,6 +1987,10 @@ namespace ServerManagerTool.Lib
var profileFile = GetProfileFile(_profile);
var gameIniFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerConfigDir(_profile), Config.Default.ServerGameConfigFile));
var gusIniFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerConfigDir(_profile), Config.Default.ServerGameUserSettingsConfigFile));
var adminFile = IOUtils.NormalizePath(Path.Combine(GetProfileSavedDir(_profile), Config.Default.ServerAdminFile));
var exlusiveFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerBinaryDir(_profile), Config.Default.ServerExclusiveFile));
var whitelistFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerBinaryDir(_profile), Config.Default.ServerWhitelistFile));
var launcherFile = GetLauncherFile();
if (!Directory.Exists(backupFolder))
@ -2000,6 +2012,15 @@ namespace ServerManagerTool.Lib
if (File.Exists(launcherFile))
files.Add(launcherFile);
if (File.Exists(adminFile))
files.Add(adminFile);
if (File.Exists(exlusiveFile))
files.Add(exlusiveFile);
if (File.Exists(whitelistFile))
files.Add(whitelistFile);
var comment = new StringBuilder();
comment.AppendLine($"Windows Platform: {Environment.OSVersion.Platform}");
comment.AppendLine($"Windows Version: {Environment.OSVersion.VersionString}");
@ -2502,6 +2523,10 @@ namespace ServerManagerTool.Lib
public static string GetProfileServerConfigDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.ServerConfigRelativePath);
public static string GetProfileSavedDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.SavedRelativePath);
public static string GetProfileServerBinaryDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.ServerBinaryRelativePath);
private static string GetRconMessageCommand(string commandValue)
{
switch (commandValue.ToLower())

View file

@ -6108,7 +6108,7 @@ namespace ServerManagerTool.Lib
private void SyncAdministrationSection(ServerProfile sourceProfile)
{
this.SetValue(ServerModIdsProperty, sourceProfile.ServerModIds);
//this.SetValue(ServerModIdsProperty, sourceProfile.ServerModIds);
this.SetValue(AutoSavePeriodMinutesProperty, sourceProfile.AutoSavePeriodMinutes);

View file

@ -723,7 +723,9 @@ namespace ServerManagerTool.Lib
var steamCmdArgs = SteamUtils.BuildSteamCmdArguments(steamCmdRemoveQuit, Config.Default.SteamCmdInstallServerArgsFormat, Config.Default.SteamCmd_AnonymousUsername, this.ProfileSnapshot.InstallDirectory, this.ProfileSnapshot.AppIdServer, steamCmdInstallServerBetaArgs.ToString(), validate ? "validate" : string.Empty);
var workingDirectory = Config.Default.DataDir;
success = await ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, this.ProfileSnapshot.InstallDirectory, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
success = await ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, this.ProfileSnapshot.InstallDirectory, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
if (success && downloadSuccessful)
{
progressCallback?.Invoke(0, $"{SteamCmdUpdater.OUTPUT_PREFIX} Finished server update.");
@ -912,7 +914,9 @@ namespace ServerManagerTool.Lib
steamCmdArgs = SteamUtils.BuildSteamCmdArguments(steamCmdRemoveQuit, Config.Default.SteamCmdInstallModArgsFormat, Config.Default.SteamCmd_Username, this.ProfileSnapshot.AppId, modId);
var workingDirectory = Config.Default.DataDir;
modSuccess = await ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
modSuccess = await ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
if (modSuccess && downloadSuccessful)
{
progressCallback?.Invoke(0, $"{SteamCmdUpdater.OUTPUT_PREFIX} Finished mod download.");

View file

@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cctl="clr-namespace:ServerManagerTool.Common.Controls;assembly=ServerManager.Common"
xmlns:cc="clr-namespace:ServerManagerTool.Common.Converters;assembly=ServerManager.Common"
xmlns:cvr="clr-namespace:ServerManagerTool.Common.ValidationRules;assembly=ServerManager.Common"
xmlns:globcntrls="clr-namespace:WPFSharp.Globalizer.Controls;assembly=WPFSharp.Globalizer"
mc:Ignorable="d"
d:DesignWidth="800"
@ -837,8 +838,29 @@
<CheckBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_SteamCmdRemoveQuitLabel}" IsChecked="{Binding CommonConfig.SteamCmdRemoveQuit, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_SteamCmdRemoveQuitTooltip}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_UpdateDirectoryPermissionsLabel}" IsChecked="{Binding Config.UpdateDirectoryPermissions, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_UpdateDirectoryPermissionsTooltip}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_SteamCmdRedirectOutputLabel}" IsChecked="{Binding Config.SteamCmdRedirectOutput, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_SteamCmdRedirectOutputTooltip}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_SteamCmdRemoveQuitLabel}" IsChecked="{Binding CommonConfig.SteamCmdRemoveQuit, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_SteamCmdRemoveQuitTooltip}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_UpdateDirectoryPermissionsLabel}" IsChecked="{Binding Config.UpdateDirectoryPermissions, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_UpdateDirectoryPermissionsTooltip}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_SteamCmdRedirectOutputLabel}" IsChecked="{Binding Config.SteamCmdRedirectOutput, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_SteamCmdRedirectOutputTooltip}" HorizontalAlignment="Left"/>
<Label Grid.Row="4" Grid.Column="2" Content="{DynamicResource GlobalSettings_SteamCmdIgnoreExitStatusCodesLabel}" Grid.ColumnSpan="2" ToolTip="{DynamicResource GlobalSettings_SteamCmdIgnoreExitStatusCodesTooltip}" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="6" Margin="1" ToolTip="{DynamicResource Config.SteamCmdIgnoreExitStatusCodes}">
<Validation.ErrorTemplate>
<ControlTemplate>
<StackPanel>
<AdornedElementPlaceholder x:Name="textBox"/>
<TextBlock Text="{Binding [0].ErrorContent}" Background="Red" Foreground="White"/>
</StackPanel>
</ControlTemplate>
</Validation.ErrorTemplate>
<TextBox.Text>
<Binding Path="Config.SteamCmdIgnoreExitStatusCodes">
<Binding.ValidationRules>
<cvr:IdListValidationRule ValidatesOnTargetUpdated="true" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<CheckBox Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_EnableLoggingLabel}" IsChecked="{Binding Config.LoggingEnabled, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_EnableLoggingTooltip}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<cctl:AnnotatedSlider Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" Margin="1" Label="{DynamicResource GlobalSettings_WorldSaveDelayLabel}" Value="{Binding Config.ServerShutdown_WorldSaveDelay, Converter={cc:IntRangeValueConverter 10, 300}}" Minimum="10" Maximum="300" SmallChange="10" LargeChange="50" TickFrequency="1" LabelRelativeWidth="Auto" SliderRelativeWidth="15*" SuffixRelativeWidth="Auto" Suffix="{DynamicResource SliderUnits_Seconds}" ToolTip="{DynamicResource GlobalSettings_WorldSaveDelayTooltip}"/>

View file

@ -359,7 +359,9 @@ namespace ServerManagerTool
var steamCmdArgs = string.Format(Config.Default.SteamCmdAuthenticateArgs, Config.Default.SteamCmd_Username, Config.Default.SteamCmd_Password);
var workingDirectory = Config.Default.DataDir;
var result = await ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, null, null, null, CancellationToken.None);
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
var result = await ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, null, CancellationToken.None);
if (result)
MessageBox.Show("The authentication was completed.", "SteamCMD Authentication", MessageBoxButton.OK, MessageBoxImage.Information);
else

View file

@ -810,7 +810,7 @@
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Find.ico,Size=32}"/>
</Button>
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource ServerSettings_ModIdsLabel}" Grid.ColumnSpan="2" ToolTip="{DynamicResource ServerSettings_ModIdsTooltip}" VerticalAlignment="Center"/>
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource ServerSettings_ModIdsLabel}" Grid.ColumnSpan="2" ToolTip="{DynamicResource ServerSettings_ModIdsTooltip}" VerticalAlignment="Center" Foreground="{DynamicResource UnSyncedSetting}"/>
<TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="6" Margin="1" ToolTip="{DynamicResource ServerSettings_ModIdsTooltip}">
<Validation.ErrorTemplate>
<ControlTemplate>
@ -1364,13 +1364,13 @@
<TextBox Grid.Row="0" Grid.Column="3" Margin="1" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" MinWidth="100" Width="Auto" Text="{Binding ProcessAffinity, Converter={StaticResource ProcessorAffinityConverter}}" ToolTip="{DynamicResource ServerSettings_ProcessorAffinityTooltip}" IsEnabled="False"/>
<Button Grid.Row="0" Grid.Column="4" Margin="1" Width="22" HorizontalAlignment="Left" Click="OpenAffinity_Click" Content="{DynamicResource ServerSettings_ProcessorAffinityButtonLabel}" ToolTip="{DynamicResource ServerSettings_ProcessorAffinityButtonTooltip}"/>
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource ServerSettings_LauncherArgsLabel}" VerticalAlignment="Center" ToolTip="{DynamicResource ServerSettings_LauncherArgsTooltip}"/>
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource ServerSettings_LauncherArgsLabel}" VerticalAlignment="Center" ToolTip="{DynamicResource ServerSettings_LauncherArgsTooltip}" Foreground="{DynamicResource UnSyncedSetting}"/>
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Margin="1" Text="{Binding LauncherArgs}" VerticalContentAlignment="Center" ToolTip="{DynamicResource ServerSettings_LauncherArgsTooltip}"/>
<cctl:CheckBoxAndTextBlock Grid.Row="2" Grid.Column="1" Margin="1" IsChecked="{Binding LauncherArgsOverride, Mode=TwoWay}" Text="{DynamicResource ServerSettings_LauncherArgsOverrideLabel}" ToolTip="{DynamicResource ServerSettings_LauncherArgsOverrideTooltip}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<cctl:CheckBoxAndTextBlock Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Margin="1" IsChecked="{Binding LauncherArgsPrefix, Mode=TwoWay}" IsEnabled="{Binding LauncherArgsOverride, Converter={StaticResource InvertBooleanConverter}}" Text="{DynamicResource ServerSettings_LauncherArgsPrefixLabel}" ToolTip="{DynamicResource ServerSettings_LauncherArgsPrefixTooltip}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource ServerSettings_ServerArgsLabel}" VerticalAlignment="Center" ToolTip="{DynamicResource ServerSettings_ServerArgsTooltip}"/>
<Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource ServerSettings_ServerArgsLabel}" VerticalAlignment="Center" ToolTip="{DynamicResource ServerSettings_ServerArgsTooltip}" Foreground="{DynamicResource UnSyncedSetting}"/>
<TextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Margin="1" Text="{Binding AdditionalArgs}" VerticalContentAlignment="Center" ToolTip="{DynamicResource ServerSettings_ServerArgsTooltip}"/>
<Button Grid.Row="3" Grid.Column="4" Margin="1" Content="{StaticResource ShowCmdButtonContent}" ToolTip="{DynamicResource ServerSettings_ShowCommandButtonTooltip}" Click="ShowCmd_Click"/>
</Grid>

View file

@ -926,6 +926,7 @@ namespace ServerManagerTool
comment.AppendLine($"SteamCmd_Username Set: {!string.IsNullOrWhiteSpace(Config.Default.SteamCmd_Username)}");
comment.AppendLine($"SteamCmd_Password Set: {!string.IsNullOrWhiteSpace(Config.Default.SteamCmd_Password)}");
comment.AppendLine($"SteamAPIKey: {!string.IsNullOrWhiteSpace(CommonConfig.Default.SteamAPIKey)}");
comment.AppendLine($"SteamCmdIgnoreExitStatusCodes: {!string.IsNullOrWhiteSpace(Config.Default.SteamCmdIgnoreExitStatusCodes)}");
comment.AppendLine($"SectionCraftingOverridesEnabled: {Config.Default.SectionCraftingOverridesEnabled}");
comment.AppendLine($"SectionStackSizeOverridesEnabled: {Config.Default.SectionStackSizeOverridesEnabled}");

View file

@ -5,7 +5,38 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
<link href="https://arkservermanager.freeforums.net/" />
<updated>2023-06-09T00:00:00Z</updated>
<updated>2023-06-22T00:00:00Z</updated>
<entry>
<id>urn:uuid:6D7413E7-3C96-41A6-B51F-C1B507FC7D7B</id>
<title>1.1.443 (1.1.443.1)</title>
<summary>1.1.443.1</summary>
<link href="" />
<updated>2023-06-22T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">BUGFIX</u>
<br/>
<ul>
<li>Administration - fix blue text for server / launcher args.</li>
<li>Global Settings - default auto backup should be sequential.</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Backup - add AllowedCheaterSteamIDs.txt, PlayersExclusiveJoinList.txt, PlayersJoinNoCheckList.txt to profile backup.</li>
<li>Global Settings - add option to add additional steamcmd exit status codes as "successful" (use on your own risk).</li>
<li>Administration - remove ModID list from profile sync.</li>
</ul>
</p>
</div>
</content>
<author>
<name>Lacoi</name>
<email></email>
</author>
</entry>
<entry>
<id>urn:uuid:FACD905A-551E-4D7A-ADCB-D0023FF7BBE7</id>

View file

@ -5,27 +5,28 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
<link href="https://arkservermanager.freeforums.net/" />
<updated>2023-06-11T00:00:00Z</updated>
<updated>2023-06-22T00:00:00Z</updated>
<entry>
<id>urn:uuid:FACD905A-551E-4D7A-ADCB-D0023FF7BBE7</id>
<title>1.1.442 (1.1.442.1)</title>
<summary>1.1.442.1</summary>
<id>urn:uuid:6D7413E7-3C96-41A6-B51F-C1B507FC7D7B</id>
<title>1.1.443 (1.1.443.1)</title>
<summary>1.1.443.1</summary>
<link href="" />
<updated>2023-06-11T00:00:00Z</updated>
<updated>2023-06-22T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">BUGFIX</u>
<br/>
<ul>
<li>Dino Settings - fixed max imprint limit.</li>
<li>Administration - fix blue text for server / launcher args.</li>
<li>Global Settings - default auto backup should be sequential.</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>pt-BR Translation file updated.</li>
<li>zh-CN Translation file updated.</li>
<li>Global Settings - add option to add additional steamcmd exit status codes as "successful" (use on your own risk).</li>
<li>Administration - remove ModID list from profile sync.</li>
</ul>
</p>
</div>

View file

@ -42,7 +42,7 @@
<value>ConanSandbox\Saved\Config\WindowsServer</value>
</setting>
<setting name="ServerExeFile" serializeAs="String">
<value>ConanSandboxServer-Win64-Test.exe</value>
<value>ConanSandboxServer-Win64-Shipping.exe</value>
</setting>
<setting name="ProfilesRelativePath" serializeAs="String">
<value>profiles</value>
@ -51,7 +51,7 @@
<value>.profile</value>
</setting>
<setting name="ServerProcessName" serializeAs="String">
<value>ConanSandboxServer-Win64-Test</value>
<value>ConanSandboxServer-Win64-Shipping</value>
</setting>
<setting name="LoadProfileExtensionList" serializeAs="String">
<value>*.profile,*.ini</value>
@ -113,6 +113,9 @@
<setting name="ServerAppIdFile" serializeAs="String">
<value>steam_appid.txt</value>
</setting>
<setting name="ServerUidFile" serializeAs="String">
<value>serveruid.txt</value>
</setting>
<setting name="LatestServerManagerBetaVersionUrl" serializeAs="String">
<value>https://raw.githubusercontent.com/Bletch1971/ServerManagers/master/CSM/beta/latest.txt</value>
</setting>
@ -711,6 +714,9 @@
<setting name="TaskSchedulerPassword" serializeAs="String">
<value />
</setting>
<setting name="SteamCmdIgnoreExitStatusCodes" serializeAs="String">
<value />
</setting>
</ServerManagerTool.Config>
</userSettings>
</configuration>

View file

@ -496,7 +496,22 @@ namespace ServerManagerTool {
this["SteamCmdRedirectOutput"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SteamCmdIgnoreExitStatusCodes
{
get
{
return ((string)(this["SteamCmdIgnoreExitStatusCodes"]));
}
set
{
this["SteamCmdIgnoreExitStatusCodes"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
@ -763,7 +778,18 @@ namespace ServerManagerTool {
return ((string)(this["ServerAppIdFile"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("serveruid.txt")]
public string ServerUidFile
{
get
{
return ((string)(this["ServerUidFile"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("https://raw.githubusercontent.com/Bletch1971/ServerManagers/master/CSM/beta/lates" +

View file

@ -949,6 +949,8 @@
<sys:String x:Key="GlobalSettings_LoggingMaxArchiveFilesTooltip">The maximum number of log files that will be kept.</sys:String>
<sys:String x:Key="GlobalSettings_RCON_ModeLabel">RCON Broadcast Mode:</sys:String>
<sys:String x:Key="GlobalSettings_RCON_ModeTooltip">Select the method used by the server manager to send auto process messages to the game clients via RCON.</sys:String>
<sys:String x:Key="GlobalSettings_SteamCmdIgnoreExitStatusCodesLabel">Ignore following SteamCmd ExitStatus</sys:String>
<sys:String x:Key="GlobalSettings_SteamCmdIgnoreExitStatusCodesTooltip">A comma-separated list of exit staus ids, which are considered correct.</sys:String>
<sys:String x:Key="GlobalSettings_TaskPriority_InformationLabel">Any changes to these priorities will take effect after the task has been created or saved.</sys:String>
<sys:String x:Key="GlobalSettings_TaskPriority_Tooltip">Select the priority used by the windows task manager when running this task.</sys:String>

View file

@ -794,7 +794,9 @@ namespace ServerManagerTool.Lib
SteamCMDProcessWindowStyle = ProcessWindowStyle.Normal;
}
success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, _profile.InstallDirectory, Config.Default.SteamCmdRedirectOutput ? (DataReceivedEventHandler)serverOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, _profile.InstallDirectory, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? (DataReceivedEventHandler)serverOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
if (success && downloadSuccessful)
{
LogProfileMessage("Finished server update.");
@ -968,7 +970,9 @@ namespace ServerManagerTool.Lib
else
steamCmdArgs = SteamUtils.BuildSteamCmdArguments(steamCmdRemoveQuit, Config.Default.SteamCmdInstallModArgsFormat, Config.Default.SteamCmd_Username, _profile.AppId, modId);
modSuccess = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
modSuccess = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, SteamCMDProcessWindowStyle).Result;
if (modSuccess && downloadSuccessful)
{
LogProfileMessage("Finished mod download.");
@ -1684,7 +1688,9 @@ namespace ServerManagerTool.Lib
steamCmdArgs = SteamUtils.BuildSteamCmdArguments(false, Config.Default.SteamCmdInstallModArgsFormat, Config.Default.SteamCmd_Username, appMod.AppId, modId);
var workingDirectory = Config.Default.DataPath;
var success = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
var success = ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
if (success && downloadSuccessful)
// download was successful, exit loop and continue.
break;
@ -1807,7 +1813,9 @@ namespace ServerManagerTool.Lib
var steamCmdArgs = SteamUtils.BuildSteamCmdArguments(false, Config.Default.SteamCmdInstallServerArgsFormat, Config.Default.SteamCmd_AnonymousUsername, cacheFolder, appIdServer, steamCmdInstallServerBetaArgs.ToString(), validate ? "validate" : string.Empty);
var workingDirectory = Config.Default.DataPath;
var success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, cacheFolder, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
var success = ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, cacheFolder, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, CancellationToken.None, SteamCMDProcessWindowStyle).Result;
if (success && downloadSuccessful)
// download was successful, exit loop and continue.
break;
@ -1890,6 +1898,9 @@ namespace ServerManagerTool.Lib
var engineIniFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerConfigDir(_profile), Config.Default.ServerEngineConfigFile));
var gameIniFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerConfigDir(_profile), Config.Default.ServerGameConfigFile));
var settingsIniFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerConfigDir(_profile), Config.Default.ServerSettingsConfigFile));
var blacklistFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerSaveFolder(_profile), Config.Default.ServerBlacklistFile));
var whitelistFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerSaveFolder(_profile), Config.Default.ServerWhitelistFile));
var serverUidFile = IOUtils.NormalizePath(Path.Combine(GetProfileServerSaveFolder(_profile), Config.Default.ServerUidFile));
var launcherFile = GetLauncherFile();
if (!Directory.Exists(backupFolder))
@ -1914,6 +1925,15 @@ namespace ServerManagerTool.Lib
if (File.Exists(launcherFile))
files.Add(launcherFile);
if (File.Exists(blacklistFile))
files.Add(blacklistFile);
if (File.Exists(whitelistFile))
files.Add(whitelistFile);
if (File.Exists(serverUidFile))
files.Add(serverUidFile);
var comment = new StringBuilder();
comment.AppendLine($"Windows Platform: {Environment.OSVersion.Platform}");
comment.AppendLine($"Windows Version: {Environment.OSVersion.VersionString}");
@ -2376,6 +2396,8 @@ namespace ServerManagerTool.Lib
public static string GetProfileServerConfigDir(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.ServerConfigRelativePath);
public static string GetProfileServerSaveFolder(ServerProfileSnapshot profile) => Path.Combine(profile.InstallDirectory, Config.Default.SavedFilesRelativePath);
private static string GetRconMessageCommand(string commandValue)
{
return commandValue.ToLower();

View file

@ -722,7 +722,9 @@ namespace ServerManagerTool.Lib
var steamCmdArgs = SteamUtils.BuildSteamCmdArguments(steamCmdRemoveQuit, Config.Default.SteamCmdInstallServerArgsFormat, Config.Default.SteamCmd_AnonymousUsername, this.ProfileSnapshot.InstallDirectory, this.ProfileSnapshot.AppIdServer, steamCmdInstallServerBetaArgs.ToString(), validate ? "validate" : string.Empty);
var workingDirectory = Config.Default.DataPath;
success = await ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, this.ProfileSnapshot.InstallDirectory, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
success = await ServerUpdater.UpgradeServerAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, this.ProfileSnapshot.InstallDirectory, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? serverOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
if (success && downloadSuccessful)
{
progressCallback?.Invoke(0, $"{SteamCmdUpdater.OUTPUT_PREFIX} Finished server update.");
@ -910,7 +912,9 @@ namespace ServerManagerTool.Lib
steamCmdArgs = SteamUtils.BuildSteamCmdArguments(steamCmdRemoveQuit, Config.Default.SteamCmdInstallModArgsFormat, Config.Default.SteamCmd_Username, this.ProfileSnapshot.AppId, modId);
var workingDirectory = Config.Default.DataPath;
modSuccess = await ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
modSuccess = await ServerUpdater.UpgradeModsAsync(steamCmdFile, steamCmdArgs, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, Config.Default.SteamCmdRedirectOutput ? modOutputHandler : null, cancellationToken, steamCmdRemoveQuit ? ProcessWindowStyle.Normal : ProcessWindowStyle.Minimized);
if (modSuccess && downloadSuccessful)
{
progressCallback?.Invoke(0, $"{SteamCmdUpdater.OUTPUT_PREFIX} Finished mod download.");

View file

@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cctl="clr-namespace:ServerManagerTool.Common.Controls;assembly=ServerManager.Common"
xmlns:cc="clr-namespace:ServerManagerTool.Common.Converters;assembly=ServerManager.Common"
xmlns:cvr="clr-namespace:ServerManagerTool.Common.ValidationRules;assembly=ServerManager.Common"
xmlns:gctl="clr-namespace:WPFSharp.Globalizer.Controls;assembly=WPFSharp.Globalizer"
mc:Ignorable="d"
d:DesignWidth="800"
@ -780,6 +781,24 @@
<CheckBox Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_UpdateDirectoryPermissionsLabel}" IsChecked="{Binding Config.UpdateDirectoryPermissions, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_UpdateDirectoryPermissionsTooltip}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_SteamCmdRedirectOutputLabel}" IsChecked="{Binding Config.SteamCmdRedirectOutput, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_SteamCmdRedirectOutputTooltip}" HorizontalAlignment="Left" />
<Label Grid.Row="4" Grid.Column="2" Content="{DynamicResource GlobalSettings_SteamCmdIgnoreExitStatusCodesLabel}" Grid.ColumnSpan="2" ToolTip="{DynamicResource GlobalSettings_SteamCmdIgnoreExitStatusCodesTooltip}" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="6" Margin="1" ToolTip="{DynamicResource Config.SteamCmdIgnoreExitStatusCodes}">
<Validation.ErrorTemplate>
<ControlTemplate>
<StackPanel>
<AdornedElementPlaceholder x:Name="textBox"/>
<TextBlock Text="{Binding [0].ErrorContent}" Background="Red" Foreground="White"/>
</StackPanel>
</ControlTemplate>
</Validation.ErrorTemplate>
<TextBox.Text>
<Binding Path="Config.SteamCmdIgnoreExitStatusCodes">
<Binding.ValidationRules>
<cvr:IdListValidationRule ValidatesOnTargetUpdated="true" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<CheckBox Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,5,5" Content="{DynamicResource GlobalSettings_EnableLoggingLabel}" IsChecked="{Binding Config.LoggingEnabled, Mode=TwoWay}" ToolTip="{DynamicResource GlobalSettings_EnableLoggingTooltip}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<cctl:AnnotatedSlider Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="2" Margin="1" Label="{DynamicResource GlobalSettings_WorldSaveDelayLabel}" Value="{Binding Config.ServerShutdown_WorldSaveDelay, Converter={cc:IntRangeValueConverter 10, 300}}" Minimum="10" Maximum="300" SmallChange="10" LargeChange="50" TickFrequency="1" LabelRelativeWidth="Auto" SliderRelativeWidth="15*" SuffixRelativeWidth="Auto" Suffix="{DynamicResource SliderUnits_Seconds}" ToolTip="{DynamicResource GlobalSettings_WorldSaveDelayTooltip}"/>

View file

@ -372,7 +372,9 @@ namespace ServerManagerTool
var steamCmdArgs = SteamUtils.BuildSteamCmdArguments(CommonConfig.Default.SteamCmdRemoveQuit, CommonConfig.Default.SteamCmdAuthenticateArgs, Config.Default.SteamCmd_Username, Config.Default.SteamCmd_Password);
var workingDirectory = Config.Default.DataPath;
var result = await ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, null, null, null, CancellationToken.None);
var SteamCmdIgnoreExitStatusCodes = SteamUtils.GetExitStatusList(Config.Default.SteamCmdIgnoreExitStatusCodes);
var result = await ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, null, null, SteamCmdIgnoreExitStatusCodes, null, CancellationToken.None);
if (result)
MessageBox.Show("The authentication was completed.", "SteamCMD Authentication", MessageBoxButton.OK, MessageBoxImage.Information);
else

View file

@ -5,7 +5,36 @@
<title>Conan Server Manager Version Feed</title>
<subtitle>This is the Conan Server Manager release version feed.</subtitle>
<link href="https://servermanagers.freeforums.net/" />
<updated>2022-11-07T00:00:00Z</updated>
<updated>2023-06-22T00:00:00Z</updated>
<entry>
<id>urn:uuid:252C96CE-3D3C-4210-8863-F62238787733</id>
<title>1.1.83 (1.1.83.1)</title>
<summary>1.1.83.1</summary>
<link href="" />
<updated>2023-06-22T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">BUGFIX</u>
<br/>
<ul>
<li>ConanExiles - Change to new exe file.</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Backup - add blacklist.txt, serveruid.txt, whitelist.txt to profile backup.</li>
<li>Global Settings - add option to add additional steamcmd exit status codes as "successful" (use on your own risk).</li>
</ul>
</p>
</div>
</content>
<author>
<name>Lacoi</name>
<email></email>
</author>
</entry>
<entry>
<id>urn:uuid:5E67390A-B4A5-442D-AC94-9E1A79423B86</id>

View file

@ -5,28 +5,34 @@
<title>Conan Server Manager Version Feed</title>
<subtitle>This is the Conan Server Manager beta version feed.</subtitle>
<link href="https://servermanagers.freeforums.net/" />
<updated>2022-11-07T00:00:00Z</updated>
<updated>2023-06-22T00:00:00Z</updated>
<entry>
<id>urn:uuid:5E67390A-B4A5-442D-AC94-9E1A79423B86</id>
<title>1.1.82 (1.1.82.1)</title>
<summary>1.1.82.1</summary>
<id>urn:uuid:252C96CE-3D3C-4210-8863-F62238787733</id>
<title>1.1.83 (1.1.83.1)</title>
<summary>1.1.83.1</summary>
<link href="" />
<updated>2022-11-07T00:00:00Z</updated>
<updated>2023-06-22T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">BUGFIX</u>
<br/>
<ul>
<li>ConanExiles - Change to new exe file.</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>zh-CN Translation file added.</li>
<li>Backup - add blacklist.txt, serveruid.txt, whitelist.txt to profile backup.</li>
<li>Global Settings - add option to add additional steamcmd exit status codes as "successful" (use on your own risk).</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
<name>Lacoi</name>
<email></email>
</author>
</entry>

View file

@ -1,4 +1,5 @@
using ServerManagerTool.Common.Utils;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Security;
@ -9,16 +10,16 @@ namespace ServerManagerTool.Common.Lib
{
public static class ServerUpdater
{
public static Task<bool> UpgradeServerAsync(string steamCmdFile, string steamCmdArgs, string workingDirectory, string username, SecureString password, string serverInstallDirectory, DataReceivedEventHandler outputHandler, CancellationToken cancellationToken, ProcessWindowStyle windowStyle = ProcessWindowStyle.Normal)
public static Task<bool> UpgradeServerAsync(string steamCmdFile, string steamCmdArgs, string workingDirectory, string username, SecureString password, string serverInstallDirectory, List<int> SteamCmdIgnoreExitStatusCodes, DataReceivedEventHandler outputHandler, CancellationToken cancellationToken, ProcessWindowStyle windowStyle = ProcessWindowStyle.Normal)
{
Directory.CreateDirectory(serverInstallDirectory);
return ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, username, password, outputHandler, cancellationToken, windowStyle);
return ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, username, password, SteamCmdIgnoreExitStatusCodes, outputHandler, cancellationToken, windowStyle);
}
public static Task<bool> UpgradeModsAsync(string steamCmdFile, string steamCmdArgs, string workingDirectory, string username, SecureString password, DataReceivedEventHandler outputHandler, CancellationToken cancellationToken, ProcessWindowStyle windowStyle = ProcessWindowStyle.Normal)
public static Task<bool> UpgradeModsAsync(string steamCmdFile, string steamCmdArgs, string workingDirectory, string username, SecureString password, List<int> SteamCmdIgnoreExitStatusCodes, DataReceivedEventHandler outputHandler, CancellationToken cancellationToken, ProcessWindowStyle windowStyle = ProcessWindowStyle.Normal)
{
return ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, username, password, outputHandler, cancellationToken, windowStyle);
return ProcessUtils.RunProcessAsync(steamCmdFile, steamCmdArgs, string.Empty, workingDirectory, username, password, SteamCmdIgnoreExitStatusCodes, outputHandler, cancellationToken, windowStyle);
}
}
}

View file

@ -162,7 +162,7 @@ namespace ServerManagerTool.Common.Utils
}
}
public static Task<bool> RunProcessAsync(string file, string arguments, string verb, string workingDirectory, string username, SecureString password, DataReceivedEventHandler outputHandler, CancellationToken cancellationToken, ProcessWindowStyle windowStyle = ProcessWindowStyle.Normal)
public static Task<bool> RunProcessAsync(string file, string arguments, string verb, string workingDirectory, string username, SecureString password, List<int> SteamCmdIgnoreExitStatusCodes, DataReceivedEventHandler outputHandler, CancellationToken cancellationToken, ProcessWindowStyle windowStyle = ProcessWindowStyle.Normal)
{
try
{
@ -211,6 +211,17 @@ namespace ServerManagerTool.Common.Utils
var exitCode = process.ExitCode;
_logger.Debug($"{nameof(RunProcessAsync)}: filename {fileName}; exitcode = {exitCode}");
if (exitCode != 0)
{
_logger.Error($"{nameof(RunProcessAsync)}: filename {fileName}; exitcode = {exitCode}");
if (SteamCmdIgnoreExitStatusCodes.Contains(exitCode))
{
exitCode = 0;
}
}
tcs.TrySetResult(exitCode == 0);
process.Close();
};

View file

@ -303,5 +303,15 @@ namespace ServerManagerTool.Common.Utils
var argumentString = string.Format(argumentFormatString, argumentValues);
return BuildSteamCmdArguments(removeQuit, argumentString);
}
public static List<int> GetExitStatusList(string value)
{
if (string.IsNullOrWhiteSpace(value))
{
return new List<int>();
}
return new List<int>(Array.ConvertAll(value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries), int.Parse));
}
}
}