Add Install Scripts (winget .NET 10 install) for the no-runtime case (held for next release)

RemSound is a .NET 10 app, so it can't install its own runtime — it can't start without it. A
plain .cmd/.ps1 (which run on what's already in Windows) sidesteps that: double-click
"Install Scripts\Install .NET for RemSound.cmd" and it winget-installs the .NET 10 Desktop Runtime
(Microsoft.DotNet.DesktopRuntime.10), falling back to opening Microsoft's download page if winget
is absent. Modelled on Andre Louis's accessible-sensor-readout Install_Scripts (his install .NET
Framework 4.8 because SR is Framework; ours installs the .NET 10 Desktop Runtime RemSound needs).

Bundled into the build + release zip via csproj Content + EnsureInstallScriptsPublished target.
Manual Quick-start note points users here if RemSound won't start. Held for the next release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ednunp
2026-06-24 14:24:20 +01:00
co-authored by Claude Opus 4.8
parent e710834458
commit f9b3ed9e67
5 changed files with 100 additions and 0 deletions
+20
View File
@@ -90,6 +90,17 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<!-- Install Scripts (vendored). A .cmd / .ps1 that install the .NET 10 Desktop Runtime RemSound
needs, via winget, for the rare machine that doesn't have it yet. RemSound is a .NET 10 app, so
it can't install its own runtime — it can't start without it — hence a plain script (cmd/ps1
run on what's already in Windows). Shipped next to the exe in an "Install Scripts" folder; the
manual points users here if RemSound won't start. EnsureInstallScriptsPublished below makes the
publish copy marker-independent (same belt-and-braces as the cue WAVs / Tolk DLLs). -->
<Content Include="..\..\Install Scripts\*.cmd;..\..\Install Scripts\*.ps1">
<Link>Install Scripts\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<!-- Guarantee the cue WAVs land in a PUBLISHED build. The Content items above use
@@ -118,4 +129,13 @@
</ItemGroup>
<Copy SourceFiles="@(_TolkFiles)" DestinationFolder="$(PublishDir)" SkipUnchangedFiles="false" />
</Target>
<!-- Same marker-independent guarantee for the install scripts: always land them in a PUBLISHED build
so a release zip can never ship without the "Install Scripts" folder the manual points to. -->
<Target Name="EnsureInstallScriptsPublished" AfterTargets="Publish">
<ItemGroup>
<_InstallScripts Include="..\..\Install Scripts\*.cmd;..\..\Install Scripts\*.ps1" />
</ItemGroup>
<Copy SourceFiles="@(_InstallScripts)" DestinationFolder="$(PublishDir)Install Scripts" SkipUnchangedFiles="false" />
</Target>
</Project>