From 702141b83e988cfd8ba448b00e53fe755256b1e3 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 19 Jan 2021 20:57:22 -0500 Subject: [PATCH 1/4] Adds a note about uninstalling the service --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ff67c0e852..45d2111cf1 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ Older server versions can be found in the V# branches of this repository. Note t If you wish to install the TGS as a service, run `Tgstation.Server.Host.Service.exe`. It should prompt you to install it. Click `Yes` and accept a potential UAC elevation prompt and the setup wizard should run. +Should you want a clean start, be sure to first uninstall the service by running `Tgstation.Server.Host.Service.exe -u` from the command line. + #### Linux (Native) We recommend using Docker for Linux installations, see below. The content of this parent section may be skipped if you choose to do so. From 24c84d75566aa748a137f98484eb0d7595882634 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 19 Jan 2021 22:03:29 -0500 Subject: [PATCH 2/4] Add missing console logging to service configuring - Let people know they're missing the .NET runtime --- src/Tgstation.Server.Host.Service/Program.cs | 8 +++++--- .../Tgstation.Server.Host.Service.csproj | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host.Service/Program.cs b/src/Tgstation.Server.Host.Service/Program.cs index ac37e65e5a..f86b67243c 100644 --- a/src/Tgstation.Server.Host.Service/Program.cs +++ b/src/Tgstation.Server.Host.Service/Program.cs @@ -1,4 +1,4 @@ -using McMaster.Extensions.CommandLineUtils; +using McMaster.Extensions.CommandLineUtils; using Microsoft.Extensions.Logging; using System; using System.Collections.Specialized; @@ -20,12 +20,10 @@ namespace Tgstation.Server.Host.Service /// sealed class Program { -#pragma warning disable SA1401 // Fields should be private /// /// The for the /// internal static IWatchdogFactory WatchdogFactory = new WatchdogFactory(); -#pragma warning restore SA1401 // Fields should be private /// /// The --uninstall or -u option @@ -151,6 +149,10 @@ namespace Tgstation.Server.Host.Service if (Configure) { +#pragma warning disable CS0618 // Type or member is obsolete + loggerFactory.AddConsole(); +#pragma warning restore CS0618 // Type or member is obsolete + // DCT: None available await WatchdogFactory.CreateWatchdog(loggerFactory).RunAsync(true, Array.Empty(), default).ConfigureAwait(false); } diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index d2bb63a992..d6dbaf8980 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -30,6 +30,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + From 5ebf42fd1ec7f4d1ec403c9d65e80b4f4fe2f80d Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 19 Jan 2021 22:05:35 -0500 Subject: [PATCH 3/4] Bump host watchdog version --- build/Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index 8d1bf5b98a..69cdcdc070 100644 --- a/build/Version.props +++ b/build/Version.props @@ -8,7 +8,7 @@ 8.3.0 9.1.2 5.3.0 - 1.1.0 + 1.1.1 1.2.0 From 8e40b826f667f5e29f6bf68396900ca3cc8bfef6 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Wed, 20 Jan 2021 11:34:26 -0500 Subject: [PATCH 4/4] Fix HostWatchdogVersion handling --- src/Tgstation.Server.Host/Program.cs | 3 ++- .../Properties/MasterVersionsAttribute.cs | 10 +++++++++- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Program.cs b/src/Tgstation.Server.Host/Program.cs index fa83a096a9..ffe02ba262 100644 --- a/src/Tgstation.Server.Host/Program.cs +++ b/src/Tgstation.Server.Host/Program.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tgstation.Server.Host.Core; +using Tgstation.Server.Host.Properties; using Tgstation.Server.Host.System; namespace Tgstation.Server.Host @@ -17,7 +18,7 @@ namespace Tgstation.Server.Host /// /// The expected host watchdog . /// - internal static readonly Version HostWatchdogVersion = new Version(1, 1, 0); + internal static Version HostWatchdogVersion => Version.Parse(MasterVersionsAttribute.Instance.RawHostWatchdogVersion); /// /// The to use. diff --git a/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs b/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs index 20cc04786c..b378207b14 100644 --- a/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs +++ b/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs @@ -31,20 +31,28 @@ namespace Tgstation.Server.Host.Properties /// public string RawControlPanelVersion { get; } + /// + /// The of the control panel version built. + /// + public string RawHostWatchdogVersion { get; } + /// /// Initializes a new instance of the . /// /// The value of . /// The value of . /// The value of . + /// The value of . public MasterVersionsAttribute( string rawConfigurationVersion, string rawDMApiVersion, - string rawControlPanelVersion) + string rawControlPanelVersion, + string rawHostWatchdogVersion) { RawConfigurationVersion = rawConfigurationVersion ?? throw new ArgumentNullException(nameof(rawConfigurationVersion)); RawDMApiVersion = rawDMApiVersion ?? throw new ArgumentNullException(nameof(rawDMApiVersion)); RawControlPanelVersion = rawControlPanelVersion ?? throw new ArgumentNullException(nameof(rawControlPanelVersion)); + RawHostWatchdogVersion = rawHostWatchdogVersion ?? throw new ArgumentNullException(nameof(rawHostWatchdogVersion)); } } } diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 3951c10411..490dc30a94 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -51,6 +51,7 @@ <_Parameter1>$(TgsConfigVersion) <_Parameter2>$(TgsDmapiVersion) <_Parameter3>$(TgsControlPanelVersion) + <_Parameter4>$(TgsHostWatchdogVersion)