From b3c8b3a7019528c989caa6ab9950ff3c8c8e56c1 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 14:34:16 -0400 Subject: [PATCH 1/8] Add settings window preview script tool --- CONTRIBUTING.md | 6 +++ LiveSplit.AutoSplitIntegration.csproj | 10 ++++ scripts/preview-settings.ps1 | 25 +++++++++ tools/PreviewSettings/PreviewSettings.csproj | 39 ++++++++++++++ tools/PreviewSettings/Program.cs | 55 ++++++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 scripts/preview-settings.ps1 create mode 100644 tools/PreviewSettings/PreviewSettings.csproj create mode 100644 tools/PreviewSettings/Program.cs diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27a651f..5c7b298 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,12 @@ Then either: The LiveSplit assemblies needed to compile (`LiveSplit.exe`, `LiveSplit.Core.dll`, `UpdateManager.dll`) are vendored under [`lib/`](lib/). See [`lib/README.md`](lib/README.md) to refresh them. +## Previewing the settings UI + +The component's settings panel is a WinForms `UserControl`. To eyeball visual changes without installing the component into a real LiveSplit, run `scripts/preview-settings.ps1`. It builds [`tools/PreviewSettings`](tools/PreviewSettings/) (a throwaway `net481` WinExe that reads the component's `Settings` control by reflection and feeds it a minimal `LiveSplitState`) and launches it. Buttons are inert since there is no host. + +The tool works on Windows directly and on Linux/macOS via [Mono](https://www.mono-project.com/) (WinForms needs `libgdiplus`). Mono rendering approximates Windows rather than matching it pixel-for-pixel, but layout and anchoring are faithful. [`tools/`](tools/) is excluded from the product build. + ## Changelog If your change is user-facing, add a `` line to the **`version="0.0.0"`** `` block in [`update.LiveSplit.AutoSplitIntegration.xml`](update.LiveSplit.AutoSplitIntegration.xml), in the same PR. Entries there reach users only once promoted into a real version at release. diff --git a/LiveSplit.AutoSplitIntegration.csproj b/LiveSplit.AutoSplitIntegration.csproj index 04bd226..a119588 100644 --- a/LiveSplit.AutoSplitIntegration.csproj +++ b/LiveSplit.AutoSplitIntegration.csproj @@ -56,6 +56,16 @@ 0.0.0-dev + + + + + + diff --git a/scripts/preview-settings.ps1 b/scripts/preview-settings.ps1 new file mode 100644 index 0000000..403f2a3 --- /dev/null +++ b/scripts/preview-settings.ps1 @@ -0,0 +1,25 @@ +#!/usr/bin/env pwsh +# Builds and launches the settings-UI preview (tools/PreviewSettings), so visual changes +# can be checked without a running LiveSplit. On Windows the built exe runs directly; on +# Linux/macOS it runs under Mono (WinForms via libgdiplus). See CONTRIBUTING.md. +$ErrorActionPreference = 'Stop' + +$repoRoot = Split-Path -Parent $PSScriptRoot +$project = Join-Path $repoRoot 'tools/PreviewSettings/PreviewSettings.csproj' +$outDir = Join-Path $repoRoot 'tools/PreviewSettings/bin/Release/net481' +$exe = Join-Path $outDir 'PreviewSettings.exe' + +dotnet build $project --configuration Release + +if ($IsWindows) { + & $exe +} +else { + if (-not (Get-Command mono -ErrorAction SilentlyContinue)) { + throw "mono not found. Install Mono (with libgdiplus) to run the preview on this OS." + } + if (-not $env:DISPLAY) { + throw "No X DISPLAY set. Run from a graphical session (or set DISPLAY)." + } + & mono $exe +} diff --git a/tools/PreviewSettings/PreviewSettings.csproj b/tools/PreviewSettings/PreviewSettings.csproj new file mode 100644 index 0000000..1721efa --- /dev/null +++ b/tools/PreviewSettings/PreviewSettings.csproj @@ -0,0 +1,39 @@ + + + + net481 + true + Exe + enable + latest + + PreviewSettings + LiveSplit.PreviewTool + + + + + + + + + + ..\..\lib\LiveSplit.exe + true + + + ..\..\lib\LiveSplit.Core.dll + true + + + ..\..\lib\UpdateManager.dll + true + + + diff --git a/tools/PreviewSettings/Program.cs b/tools/PreviewSettings/Program.cs new file mode 100644 index 0000000..59bbd6a --- /dev/null +++ b/tools/PreviewSettings/Program.cs @@ -0,0 +1,55 @@ +using System; +using System.Reflection; +using System.Runtime.Serialization; +using System.Windows.Forms; +using LiveSplit.Model; +using LiveSplit.UI.Components; + +namespace LiveSplit.PreviewTool +{ + // Renders AutoSplitIntegrationComponentSettings without a live LiveSplit host. + // The component subscribes to LiveSplitState events in its ctor, so a real state is + // built; the settings ctor only reads state.CurrentPhase (defaults to NotRunning). + internal static class Program + { + [STAThread] + private static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + LiveSplitState state = MakeState(); + var component = new AutoSplitIntegrationComponent(state); + + // Settings is internal; the tool is a separate assembly, so reach it by reflection. + var settings = (Control)typeof(AutoSplitIntegrationComponent) + .GetProperty("Settings", BindingFlags.Instance | BindingFlags.NonPublic)! + .GetValue(component)!; + + using var form = new Form + { + ClientSize = settings.Size, + Text = "AutoSplit Integration Settings (preview)", + StartPosition = FormStartPosition.CenterScreen, + }; + form.Controls.Add(settings); + Application.Run(form); + } + + private static LiveSplitState MakeState() + { + // LiveSplitState(run, form, layout, layoutSettings, settings). Only CurrentPhase is + // read here (enum default NotRunning), so nulls are fine; fall back to an + // uninitialized instance if a future ctor change starts dereferencing them. + try + { + return (LiveSplitState)Activator.CreateInstance( + typeof(LiveSplitState), new object?[] { null, null, null, null, null })!; + } + catch + { + return (LiveSplitState)FormatterServices.GetUninitializedObject(typeof(LiveSplitState)); + } + } + } +} From a3d9d8bddd5a9601813c7e99575518b17746b7f2 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 17:25:05 -0400 Subject: [PATCH 2/8] Add Directory.Build.props --- Directory.Build.props | 41 +++++++++++++++++++ LiveSplit.AutoSplitIntegration.csproj | 37 ----------------- tools/PreviewSettings/LiveSplit.ico | Bin 0 -> 766 bytes tools/PreviewSettings/PreviewSettings.csproj | 6 +-- 4 files changed, 43 insertions(+), 41 deletions(-) create mode 100644 Directory.Build.props create mode 100644 tools/PreviewSettings/LiveSplit.ico diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..12444eb --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,41 @@ + + + + latest + enable + + + true + + + true + + + true + moderate + + $(WarningsAsErrors);NU1903;NU1904 + + all + + + + + + false + + net481 + true + + diff --git a/LiveSplit.AutoSplitIntegration.csproj b/LiveSplit.AutoSplitIntegration.csproj index a119588..228063d 100644 --- a/LiveSplit.AutoSplitIntegration.csproj +++ b/LiveSplit.AutoSplitIntegration.csproj @@ -1,47 +1,10 @@ - - - latest - enable - - - true - - - true - - - true - moderate - - $(WarningsAsErrors);NU1903;NU1904 - - all - - - - net481 - true Library LiveSplit LiveSplit.AutoSplitIntegration true - - false - true diff --git a/tools/PreviewSettings/LiveSplit.ico b/tools/PreviewSettings/LiveSplit.ico new file mode 100644 index 0000000000000000000000000000000000000000..a776b667d8351eb8d1b0dd5d86d9708d73cb859e GIT binary patch literal 766 zcmah{yH3ME5F7`@xx2UkM3u-55kEl+#2-YoDI!-XjD(0gUxDQEM42`PMZUsSz9S{2 zJ6{p8%-R8^Kw_M^^X%;IJz^l@Gae72_#6ONoG0X%oRSgFIRcK}-*7bPIM+`c`ARy} zbxlLMA4K$xq z%ewVHZoM;m5PI___~DcfF`jh5>TUb1}s#MKlQ@~ry0TTLUrx?%gG)pvyr z&$HRJ@0zQGREUa`|I$kEa_r6o9$KVre)3^ptJTqFm2TVax$zn}bNadUi_@% literal 0 HcmV?d00001 diff --git a/tools/PreviewSettings/PreviewSettings.csproj b/tools/PreviewSettings/PreviewSettings.csproj index 1721efa..d64b026 100644 --- a/tools/PreviewSettings/PreviewSettings.csproj +++ b/tools/PreviewSettings/PreviewSettings.csproj @@ -6,14 +6,12 @@ Launch via scripts/preview-settings.ps1. See CONTRIBUTING.md > Previewing the settings UI. --> - net481 - true Exe - enable - latest PreviewSettings LiveSplit.PreviewTool + + LiveSplit.ico From 6488a23ee4c55743d7b992c91bac30608531a294 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 17:27:59 -0400 Subject: [PATCH 3/8] Update docs --- CONTRIBUTING.md | 2 +- scripts/preview-settings.ps1 | 30 +++++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c7b298..fc45c7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ The LiveSplit assemblies needed to compile (`LiveSplit.exe`, `LiveSplit.Core.dll The component's settings panel is a WinForms `UserControl`. To eyeball visual changes without installing the component into a real LiveSplit, run `scripts/preview-settings.ps1`. It builds [`tools/PreviewSettings`](tools/PreviewSettings/) (a throwaway `net481` WinExe that reads the component's `Settings` control by reflection and feeds it a minimal `LiveSplitState`) and launches it. Buttons are inert since there is no host. -The tool works on Windows directly and on Linux/macOS via [Mono](https://www.mono-project.com/) (WinForms needs `libgdiplus`). Mono rendering approximates Windows rather than matching it pixel-for-pixel, but layout and anchoring are faithful. [`tools/`](tools/) is excluded from the product build. +The tool works on Windows directly. On Linux it runs under [wine](https://www.winehq.org/), whose bundled Mono renders WinForms through wine's own graphics stack, so text and layout match Windows and the real LiveSplit host. Native [Mono](https://www.mono-project.com/) is intentionally not used: it renders this UI via `libgdiplus`, which intermittently draws buttons and labels with no text — a [Mono/libgdiplus rendering bug](https://github.com/TASEmulators/BizHawk/issues/4469), not a component bug — which defeats the purpose of a visual preview. [`tools/`](tools/) is excluded from the product build. ## Changelog diff --git a/scripts/preview-settings.ps1 b/scripts/preview-settings.ps1 index 403f2a3..115ba0c 100644 --- a/scripts/preview-settings.ps1 +++ b/scripts/preview-settings.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh -# Builds and launches the settings-UI preview (tools/PreviewSettings), so visual changes -# can be checked without a running LiveSplit. On Windows the built exe runs directly; on -# Linux/macOS it runs under Mono (WinForms via libgdiplus). See CONTRIBUTING.md. +# Builds and launches the settings-UI preview project +# so visual changes can be checked without a running LiveSplit. +# See CONTRIBUTING.md for why Linux native Mono is not used in favor of Wine. $ErrorActionPreference = 'Stop' $repoRoot = Split-Path -Parent $PSScriptRoot @@ -9,17 +9,25 @@ $project = Join-Path $repoRoot 'tools/PreviewSettings/PreviewSettings.csproj' $outDir = Join-Path $repoRoot 'tools/PreviewSettings/bin/Release/net481' $exe = Join-Path $outDir 'PreviewSettings.exe' +# Check run prerequisites before building, so a missing display or wine fails fast. +if (-not $IsWindows) { + if (-not $env:DISPLAY) { + throw 'No X DISPLAY set. Run from a graphical session (or set DISPLAY).' + } + + # wine only: its bundled Mono renders WinForms via wine's graphics stack, matching the real host. + # Native Mono (libgdiplus) drops button/label text (Mono bug, not ours: TASEmulators/BizHawk#4469). + if (-not (Get-Command wine -ErrorAction SilentlyContinue)) { + throw 'wine not found. Install wine to preview this Windows-only UI on Linux.' + } +} + dotnet build $project --configuration Release if ($IsWindows) { - & $exe + & $exe } else { - if (-not (Get-Command mono -ErrorAction SilentlyContinue)) { - throw "mono not found. Install Mono (with libgdiplus) to run the preview on this OS." - } - if (-not $env:DISPLAY) { - throw "No X DISPLAY set. Run from a graphical session (or set DISPLAY)." - } - & mono $exe + $env:WINEDEBUG = '-all' # silence wine's noisy warnings; unset it to debug wine itself + & wine $exe } From 89ab2b65caae4530d00540ce88d2c6cb7c998b6d Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 17:44:14 -0400 Subject: [PATCH 4/8] More slight miprovemetns --- CONTRIBUTING.md | 6 ++--- scripts/preview-settings.ps1 | 10 +++----- tools/PreviewSettings/LiveSplit.ico | Bin 766 -> 0 bytes tools/PreviewSettings/PreviewSettings.csproj | 8 +++---- tools/PreviewSettings/Program.cs | 24 +++++++++++-------- 5 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 tools/PreviewSettings/LiveSplit.ico diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc45c7d..025bd24 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,13 +24,13 @@ Then either: - Run `dotnet build --configuration Release`, or - Open `LiveSplit.AutoSplitIntegration.csproj` in Visual Studio 2022 and build. -The LiveSplit assemblies needed to compile (`LiveSplit.exe`, `LiveSplit.Core.dll`, `UpdateManager.dll`) are vendored under [`lib/`](lib/). See [`lib/README.md`](lib/README.md) to refresh them. +The LiveSplit assemblies needed to compile (`LiveSplit.exe`, and dlls) are vendored under [`lib/`](lib/). See [`lib/README.md`](lib/README.md) to refresh them. ## Previewing the settings UI -The component's settings panel is a WinForms `UserControl`. To eyeball visual changes without installing the component into a real LiveSplit, run `scripts/preview-settings.ps1`. It builds [`tools/PreviewSettings`](tools/PreviewSettings/) (a throwaway `net481` WinExe that reads the component's `Settings` control by reflection and feeds it a minimal `LiveSplitState`) and launches it. Buttons are inert since there is no host. +The component's settings panel is a WinForms `UserControl`. To preview visual changes without installing the component into a real LiveSplit, run `scripts/preview-settings.ps1`. It builds [`tools/PreviewSettings`](tools/PreviewSettings/) (a throwaway .NET WinExe that reads the component's `Settings` control by reflection and feeds it a minimal `LiveSplitState`) and launches it. Buttons are inert since there is no host. -The tool works on Windows directly. On Linux it runs under [wine](https://www.winehq.org/), whose bundled Mono renders WinForms through wine's own graphics stack, so text and layout match Windows and the real LiveSplit host. Native [Mono](https://www.mono-project.com/) is intentionally not used: it renders this UI via `libgdiplus`, which intermittently draws buttons and labels with no text — a [Mono/libgdiplus rendering bug](https://github.com/TASEmulators/BizHawk/issues/4469), not a component bug — which defeats the purpose of a visual preview. [`tools/`](tools/) is excluded from the product build. +The tool works on Windows directly. On Linux it runs under [wine](https://www.winehq.org/), whose bundled Mono renders WinForms through wine's own graphics stack, so text and layout match Windows and the real LiveSplit host. Native [Mono](https://www.mono-project.com/) is intentionally not used: it renders quite differently via `libgdiplus`, on top of having known [rendering bug](https://github.com/TASEmulators/BizHawk/issues/4469), which defeats the purpose of a visual preview. ## Changelog diff --git a/scripts/preview-settings.ps1 b/scripts/preview-settings.ps1 index 115ba0c..0a17ed9 100644 --- a/scripts/preview-settings.ps1 +++ b/scripts/preview-settings.ps1 @@ -20,14 +20,10 @@ if (-not $IsWindows) { if (-not (Get-Command wine -ErrorAction SilentlyContinue)) { throw 'wine not found. Install wine to preview this Windows-only UI on Linux.' } + + $env:WINEDEBUG = '-all' # silence wine's noisy warnings; unset it to debug wine itself } dotnet build $project --configuration Release -if ($IsWindows) { - & $exe -} -else { - $env:WINEDEBUG = '-all' # silence wine's noisy warnings; unset it to debug wine itself - & wine $exe -} +if ($IsWindows) { & $exe } else { & wine $exe } diff --git a/tools/PreviewSettings/LiveSplit.ico b/tools/PreviewSettings/LiveSplit.ico deleted file mode 100644 index a776b667d8351eb8d1b0dd5d86d9708d73cb859e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmah{yH3ME5F7`@xx2UkM3u-55kEl+#2-YoDI!-XjD(0gUxDQEM42`PMZUsSz9S{2 zJ6{p8%-R8^Kw_M^^X%;IJz^l@Gae72_#6ONoG0X%oRSgFIRcK}-*7bPIM+`c`ARy} zbxlLMA4K$xq z%ewVHZoM;m5PI___~DcfF`jh5>TUb1}s#MKlQ@~ry0TTLUrx?%gG)pvyr z&$HRJ@0zQGREUa`|I$kEa_r6o9$KVre)3^ptJTqFm2TVax$zn}bNadUi_@% diff --git a/tools/PreviewSettings/PreviewSettings.csproj b/tools/PreviewSettings/PreviewSettings.csproj index d64b026..0bdefae 100644 --- a/tools/PreviewSettings/PreviewSettings.csproj +++ b/tools/PreviewSettings/PreviewSettings.csproj @@ -10,8 +10,6 @@ PreviewSettings LiveSplit.PreviewTool - - LiveSplit.ico @@ -19,8 +17,10 @@ - + ..\..\lib\LiveSplit.exe true diff --git a/tools/PreviewSettings/Program.cs b/tools/PreviewSettings/Program.cs index 59bbd6a..89b291c 100644 --- a/tools/PreviewSettings/Program.cs +++ b/tools/PreviewSettings/Program.cs @@ -1,6 +1,7 @@ using System; +using System.Drawing; +using System.IO; using System.Reflection; -using System.Runtime.Serialization; using System.Windows.Forms; using LiveSplit.Model; using LiveSplit.UI.Components; @@ -31,25 +32,28 @@ private static void Main() ClientSize = settings.Size, Text = "AutoSplit Integration Settings (preview)", StartPosition = FormStartPosition.CenterScreen, + Icon = TryLoadLiveSplitIcon() ?? SystemIcons.Application, }; form.Controls.Add(settings); Application.Run(form); } + // LiveSplit.exe is copied next to this exe (see the vendored Reference's Private=true), + // so the window icon can be pulled from it at runtime instead of vendoring a separate .ico. + private static Icon? TryLoadLiveSplitIcon() + { + var liveSplitExePath = Path.Combine(AppContext.BaseDirectory, "LiveSplit.exe"); + return Icon.ExtractAssociatedIcon(liveSplitExePath); + } + private static LiveSplitState MakeState() { // LiveSplitState(run, form, layout, layoutSettings, settings). Only CurrentPhase is // read here (enum default NotRunning), so nulls are fine; fall back to an // uninitialized instance if a future ctor change starts dereferencing them. - try - { - return (LiveSplitState)Activator.CreateInstance( - typeof(LiveSplitState), new object?[] { null, null, null, null, null })!; - } - catch - { - return (LiveSplitState)FormatterServices.GetUninitializedObject(typeof(LiveSplitState)); - } + object?[] args = [null, null, null, null, null]; + return (LiveSplitState)Activator.CreateInstance(typeof(LiveSplitState), args); + } } } From e9b29b8ebae6cb911a5df4990dfb733a3033f516 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 17:56:40 -0400 Subject: [PATCH 5/8] Make dynamic icon work on Linux --- tools/PreviewSettings/Program.cs | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tools/PreviewSettings/Program.cs b/tools/PreviewSettings/Program.cs index 89b291c..1646d7f 100644 --- a/tools/PreviewSettings/Program.cs +++ b/tools/PreviewSettings/Program.cs @@ -2,6 +2,7 @@ using System.Drawing; using System.IO; using System.Reflection; +using System.Runtime.InteropServices; using System.Windows.Forms; using LiveSplit.Model; using LiveSplit.UI.Components; @@ -32,20 +33,40 @@ private static void Main() ClientSize = settings.Size, Text = "AutoSplit Integration Settings (preview)", StartPosition = FormStartPosition.CenterScreen, - Icon = TryLoadLiveSplitIcon() ?? SystemIcons.Application, + Icon = TryLoadLiveSplitIcon(), }; form.Controls.Add(settings); Application.Run(form); } - // LiveSplit.exe is copied next to this exe (see the vendored Reference's Private=true), - // so the window icon can be pulled from it at runtime instead of vendoring a separate .ico. + // LiveSplit.exe is copied next to this exe (see the vendored Reference's Private=true), so the + // window icon can be pulled from it at runtime instead of vendoring a separate .ico. Use shell32's + // ExtractIconEx rather than Icon.ExtractAssociatedIcon: the latter returns a generic placeholder + // under wine's Mono, while ExtractIconEx reads the real embedded icon on both Windows and wine. private static Icon? TryLoadLiveSplitIcon() { var liveSplitExePath = Path.Combine(AppContext.BaseDirectory, "LiveSplit.exe"); - return Icon.ExtractAssociatedIcon(liveSplitExePath); + var largeIcons = new IntPtr[1]; + if (ExtractIconEx(liveSplitExePath, 0, largeIcons, null, 1) == 0 || largeIcons[0] == IntPtr.Zero) + return null; + + try + { + // Icon.FromHandle does not own the handle, so clone to a managed icon before freeing it. + return (Icon)Icon.FromHandle(largeIcons[0]).Clone(); + } + finally + { + DestroyIcon(largeIcons[0]); + } } + [DllImport("shell32.dll", CharSet = CharSet.Unicode)] + private static extern uint ExtractIconEx(string fileName, int iconIndex, IntPtr[] largeIcons, IntPtr[]? smallIcons, uint iconCount); + + [DllImport("user32.dll")] + private static extern bool DestroyIcon(IntPtr handle); + private static LiveSplitState MakeState() { // LiveSplitState(run, form, layout, layoutSettings, settings). Only CurrentPhase is From 5689e689019832cb44b68ed6c8efb57f633047f1 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 18:07:52 -0400 Subject: [PATCH 6/8] Mention icon transparency --- tools/PreviewSettings/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/PreviewSettings/Program.cs b/tools/PreviewSettings/Program.cs index 1646d7f..d8b71a5 100644 --- a/tools/PreviewSettings/Program.cs +++ b/tools/PreviewSettings/Program.cs @@ -33,7 +33,7 @@ private static void Main() ClientSize = settings.Size, Text = "AutoSplit Integration Settings (preview)", StartPosition = FormStartPosition.CenterScreen, - Icon = TryLoadLiveSplitIcon(), + Icon = TryLoadLiveSplitIcon() ?? SystemIcons.Application, }; form.Controls.Add(settings); Application.Run(form); @@ -43,6 +43,8 @@ private static void Main() // window icon can be pulled from it at runtime instead of vendoring a separate .ico. Use shell32's // ExtractIconEx rather than Icon.ExtractAssociatedIcon: the latter returns a generic placeholder // under wine's Mono, while ExtractIconEx reads the real embedded icon on both Windows and wine. + // On wine the transparent corners render black (the HICON's 32-bit alpha is dropped); Windows is + // unaffected. Accepted as cosmetic for this preview-only tool. private static Icon? TryLoadLiveSplitIcon() { var liveSplitExePath = Path.Combine(AppContext.BaseDirectory, "LiveSplit.exe"); From 563f72e47fc72d462d6ae0e27384b9a41b66b98e Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 18:11:56 -0400 Subject: [PATCH 7/8] no wine debug flag --- scripts/preview-settings.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/preview-settings.ps1 b/scripts/preview-settings.ps1 index 0a17ed9..e843438 100644 --- a/scripts/preview-settings.ps1 +++ b/scripts/preview-settings.ps1 @@ -20,8 +20,6 @@ if (-not $IsWindows) { if (-not (Get-Command wine -ErrorAction SilentlyContinue)) { throw 'wine not found. Install wine to preview this Windows-only UI on Linux.' } - - $env:WINEDEBUG = '-all' # silence wine's noisy warnings; unset it to debug wine itself } dotnet build $project --configuration Release From 55e5f2eaef347ea50d1a3677e99978b5aa409554 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 15 Jul 2026 18:35:25 -0400 Subject: [PATCH 8/8] Test tool on CI --- .github/workflows/ci.yml | 13 ++++++++----- .github/workflows/release.yml | 7 +++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d571e4..aa5bad5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,15 +29,18 @@ jobs: with: dotnet-version: "10.0.x" - # Debug + implicit restore. -o collects the output in a known, flat path for the upload step. - - run: dotnet build --configuration Debug -o artifacts + - run: dotnet build --configuration Debug - - run: dotnet format --verify-no-changes + - run: dotnet build tools/PreviewSettings/PreviewSettings.csproj --configuration Debug + + - run: dotnet format --verify-no-changes --no-restore + + - run: dotnet format tools/PreviewSettings/PreviewSettings.csproj --verify-no-changes --no-restore - uses: actions/upload-artifact@v4 with: name: LiveSplit.AutoSplitIntegration path: | - artifacts/LiveSplit.AutoSplitIntegration.dll - artifacts/LiveSplit.AutoSplitIntegration.pdb + bin/Debug/*/LiveSplit.AutoSplitIntegration.dll + bin/Debug/*/LiveSplit.AutoSplitIntegration.pdb if-no-files-found: error diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02de93c..5f5529f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,8 +98,7 @@ jobs: with: dotnet-version: "10.0.x" - # Release build with implicit restore. - - run: dotnet build --configuration Release -o artifacts -p:Version=$env:VERSION + - run: dotnet build --configuration Release -p:Version=$env:VERSION if: steps.exists.outputs.already != 'true' - name: Release notes from manifest @@ -122,6 +121,6 @@ jobs: name: v${{ needs.validate.outputs.version }} body_path: release-notes.md files: | - artifacts/LiveSplit.AutoSplitIntegration.dll - artifacts/LiveSplit.AutoSplitIntegration.pdb + bin/Release/*/LiveSplit.AutoSplitIntegration.dll + bin/Release/*/LiveSplit.AutoSplitIntegration.pdb fail_on_unmatched_files: true