From 3208d0008fb709fc4f66399b3426ffea2ddd4779 Mon Sep 17 00:00:00 2001 From: Wrathen Date: Tue, 10 Nov 2026 15:46:42 +0300 Subject: [PATCH 1/2] fix: extract only what the servers read on a split-database checkout The -Servers check in SetupSequence.ExtractsForServers had a literal backspace (0x08) in its pattern where a \b word boundary was meant, so it never matched. Setup, and the Control section's -List, ran the whole 16-entry manifest instead of the two entries the servers read. A Launcher.Checks case now covers the check. The documented `dotnet publish src/Waypoint -o .` also failed on SDK 10.0.403: the output folder reaches Launcher.Core, and the SDK leaves files under it out of the sources, so nothing compiled (CS0246). The README, docs/launcher.md and Waypoint.csproj now publish to publish\, which is git-ignored. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 3 ++- README.md | 4 ++-- docs/launcher.md | 12 ++++++++---- src/Launcher.Core/SetupGuide.cs | 2 +- src/Waypoint/Waypoint.csproj | 4 ++-- tests/Launcher.Checks/SetupChecks.cs | 18 ++++++++++++++++++ 6 files changed, 33 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 118b40a..f42a731 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -# The published launcher (dotnet publish src/Waypoint -o .) +# The published launcher (dotnet publish src/Waypoint -o publish), and one an older -o . left in the root +/publish/ /Waypoint.exe # --- .NET --- diff --git a/README.md b/README.md index 6cf6c4c..8e95f9c 100644 --- a/README.md +++ b/README.md @@ -128,8 +128,8 @@ Waypoint. The servers and the game keep running. **What's new** opens the releas ```powershell git clone Waypoint cd Waypoint -dotnet publish src/Waypoint -o . -.\Waypoint.exe +dotnet publish src/Waypoint -o publish +.\publish\Waypoint.exe ``` A build from source has no version and never offers updates. Everything else, from the sections to the code layout and diff --git a/docs/launcher.md b/docs/launcher.md index 88cf927..5ba260e 100644 --- a/docs/launcher.md +++ b/docs/launcher.md @@ -139,12 +139,16 @@ way back beyond the saves' copy. The next Play extracts whatever game data the n ## Build and run ```powershell -dotnet publish src/Waypoint -o . # one Waypoint.exe in this repository's root (git-ignored) -.\Waypoint.exe # or double-click it -dotnet run --project src/Waypoint # while working on it -dotnet test Waypoint.slnx # the tests +dotnet publish src/Waypoint -o publish # one Waypoint.exe in publish\ (git-ignored) +.\publish\Waypoint.exe # or double-click it +dotnet run --project src/Waypoint # while working on it +dotnet test Waypoint.slnx # the tests ``` +Publish into a folder of its own, never `-o .`: the output folder reaches Launcher.Core too, and the .NET SDK leaves every +file under it out of a project's sources, so with the repository's root nothing of Launcher.Core is compiled and the build +fails with `CS0246: The type or namespace name 'Launcher' could not be found`. + To update it after a pull or a change, close Waypoint first (a running `Waypoint.exe` is locked and the publish fails to replace it; leave the servers and the game running if you want), run the same `dotnet publish`, and start it again. diff --git a/src/Launcher.Core/SetupGuide.cs b/src/Launcher.Core/SetupGuide.cs index 8dd8d58..1701847 100644 --- a/src/Launcher.Core/SetupGuide.cs +++ b/src/Launcher.Core/SetupGuide.cs @@ -201,7 +201,7 @@ static async Task RemovePartialClone(string target) /// the client tables from client.db and live.ps1 extracts only what they still read. public static bool ExtractsForServers(string checkout) { - try { return Regex.IsMatch(File.ReadAllText(Path.Combine(checkout, "scripts", "dev", "extract-data.ps1")), @"\[switch\]\$Servers", RegexOptions.IgnoreCase); } + try { return Regex.IsMatch(File.ReadAllText(Path.Combine(checkout, "scripts", "dev", "extract-data.ps1")), @"\[switch\]\$Servers\b", RegexOptions.IgnoreCase); } catch (Exception e) when (e is IOException or UnauthorizedAccessException) { return false; } } diff --git a/src/Waypoint/Waypoint.csproj b/src/Waypoint/Waypoint.csproj index 67cbfef..98e482a 100644 --- a/src/Waypoint/Waypoint.csproj +++ b/src/Waypoint/Waypoint.csproj @@ -1,7 +1,7 @@ - diff --git a/tests/Launcher.Checks/SetupChecks.cs b/tests/Launcher.Checks/SetupChecks.cs index bb951b5..6324592 100644 --- a/tests/Launcher.Checks/SetupChecks.cs +++ b/tests/Launcher.Checks/SetupChecks.cs @@ -15,6 +15,7 @@ public static async Task RunAsync(string fixture, Action check) await LinksAsync(root, check); await SequenceAsync(check); await CloneAsync(root, check); + ExtractScope(root, check); check(Prerequisites.HasSdk("8.0.427 [C:\\sdk]\n10.0.403 [C:\\sdk]\n") && !Prerequisites.HasSdk("9.0.320 [C:\\sdk]\n"), "only a .NET 10 SDK counts"); check(PythonLookup.VersionOf("Python 3.12.4") == new Version(3, 12, 4) && PythonLookup.VersionOf("Python 3.9.0b1") == new Version(3, 9, 0) && PythonLookup.VersionOf("Python was not found; run without arguments to install from the Microsoft Store") is null, @@ -52,6 +53,23 @@ static string Client(string root, string name, params (string File, int Bytes)[] return folder; } + /// Setup extracts only what the servers read when the checkout's extract-data.ps1 takes -Servers. + static void ExtractScope(string root, Action check) + { + string Checkout(string name, string param) + { + string folder = Path.Combine(root, name); + Directory.CreateDirectory(Path.Combine(folder, "scripts", "dev")); + File.WriteAllText(Path.Combine(folder, "scripts", "dev", "extract-data.ps1"), $"# extracts game data\r\nparam({param})\r\n"); + return folder; + } + check(SetupSequence.ExtractsForServers(Checkout("split", "[switch]$Force, [string[]]$Only = @(), [switch]$List, [string]$ExportManifest, [switch]$Servers")), + "a checkout whose extract-data.ps1 takes -Servers extracts only what the servers read"); + check(!SetupSequence.ExtractsForServers(Checkout("before-split", "[switch]$Force, [string[]]$Only = @(), [switch]$List, [string]$ServersList")), + "a checkout from before the split, or a longer name that starts with Servers, extracts everything"); + check(!SetupSequence.ExtractsForServers(Path.Combine(root, "no-checkout")), "no extract-data.ps1 extracts everything"); + } + static void Classify(string root, Action check) { string standalone = Client(root, "standalone", ("Content.ggpk", 10), ("PathOfExile.exe", 10)); From 2a78e391b228f571a942e695c858e36a84f0300e Mon Sep 17 00:00:00 2001 From: Wrathen Date: Tue, 10 Nov 2026 18:43:58 +0300 Subject: [PATCH 2/2] docs: keep the documented publish command as it was Reverts the README, docs/launcher.md, Waypoint.csproj comment and .gitignore changes that moved `dotnet publish src/Waypoint -o .` to a publish\ folder. This pull request is only the -Servers check fix. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 3 +-- README.md | 4 ++-- docs/launcher.md | 12 ++++-------- src/Waypoint/Waypoint.csproj | 4 ++-- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index f42a731..118b40a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -# The published launcher (dotnet publish src/Waypoint -o publish), and one an older -o . left in the root -/publish/ +# The published launcher (dotnet publish src/Waypoint -o .) /Waypoint.exe # --- .NET --- diff --git a/README.md b/README.md index 8e95f9c..6cf6c4c 100644 --- a/README.md +++ b/README.md @@ -128,8 +128,8 @@ Waypoint. The servers and the game keep running. **What's new** opens the releas ```powershell git clone Waypoint cd Waypoint -dotnet publish src/Waypoint -o publish -.\publish\Waypoint.exe +dotnet publish src/Waypoint -o . +.\Waypoint.exe ``` A build from source has no version and never offers updates. Everything else, from the sections to the code layout and diff --git a/docs/launcher.md b/docs/launcher.md index 5ba260e..88cf927 100644 --- a/docs/launcher.md +++ b/docs/launcher.md @@ -139,16 +139,12 @@ way back beyond the saves' copy. The next Play extracts whatever game data the n ## Build and run ```powershell -dotnet publish src/Waypoint -o publish # one Waypoint.exe in publish\ (git-ignored) -.\publish\Waypoint.exe # or double-click it -dotnet run --project src/Waypoint # while working on it -dotnet test Waypoint.slnx # the tests +dotnet publish src/Waypoint -o . # one Waypoint.exe in this repository's root (git-ignored) +.\Waypoint.exe # or double-click it +dotnet run --project src/Waypoint # while working on it +dotnet test Waypoint.slnx # the tests ``` -Publish into a folder of its own, never `-o .`: the output folder reaches Launcher.Core too, and the .NET SDK leaves every -file under it out of a project's sources, so with the repository's root nothing of Launcher.Core is compiled and the build -fails with `CS0246: The type or namespace name 'Launcher' could not be found`. - To update it after a pull or a change, close Waypoint first (a running `Waypoint.exe` is locked and the publish fails to replace it; leave the servers and the game running if you want), run the same `dotnet publish`, and start it again. diff --git a/src/Waypoint/Waypoint.csproj b/src/Waypoint/Waypoint.csproj index 98e482a..67cbfef 100644 --- a/src/Waypoint/Waypoint.csproj +++ b/src/Waypoint/Waypoint.csproj @@ -1,7 +1,7 @@ -