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
@@ -0,0 +1,41 @@
@echo off
title Install .NET for RemSound
echo.
echo RemSound needs the Microsoft .NET 10 Desktop Runtime to run.
echo This will install it for you using winget (the Windows package manager).
echo.
where winget >nul 2>nul
if errorlevel 1 goto nowinget
winget install --id Microsoft.DotNet.DesktopRuntime.10 -e --source winget --accept-package-agreements --accept-source-agreements
if errorlevel 1 goto failed
echo.
echo All done. You can now run RemSound.exe.
echo.
echo Press any key to close this window.
pause >nul
exit /b 0
:nowinget
echo winget isn't available on this PC (it comes with Windows 10 version 1809 or newer,
echo and Windows 11). Falling back to the manual download.
goto manual
:failed
echo.
echo The automatic install didn't finish. Falling back to the manual download.
goto manual
:manual
echo.
echo Opening the official Microsoft download page. On it, choose
echo ".NET Desktop Runtime" for "x64", download and run it, then start RemSound.
echo.
echo https://dotnet.microsoft.com/download/dotnet/10.0
echo.
start "" "https://dotnet.microsoft.com/download/dotnet/10.0"
echo Press any key to close this window.
pause >nul
exit /b 1
@@ -0,0 +1,33 @@
# Installs the Microsoft .NET 10 Desktop Runtime that RemSound needs, via winget.
# The .cmd next to this file is the easy one - just double-click it. This .ps1 is here for
# people who prefer PowerShell; if Windows blocks it, run:
# powershell -ExecutionPolicy Bypass -File ".\Install .NET for RemSound.ps1"
$downloadPage = 'https://dotnet.microsoft.com/download/dotnet/10.0'
Write-Host ''
Write-Host 'RemSound needs the Microsoft .NET 10 Desktop Runtime to run.'
Write-Host 'This will install it for you using winget (the Windows package manager).'
Write-Host ''
$winget = Get-Command winget -ErrorAction SilentlyContinue
if ($null -eq $winget) {
Write-Host "winget isn't available on this PC (it comes with Windows 10 version 1809 or newer, and" -ForegroundColor Yellow
Write-Host "Windows 11). Opening the manual download page - choose '.NET Desktop Runtime' for 'x64'." -ForegroundColor Yellow
Start-Process $downloadPage
Read-Host 'Press Enter to close'
exit 1
}
winget install --id Microsoft.DotNet.DesktopRuntime.10 -e --source winget --accept-package-agreements --accept-source-agreements
if ($LASTEXITCODE -ne 0) {
Write-Host ''
Write-Host "The automatic install didn't finish. Opening the manual download page instead." -ForegroundColor Yellow
Start-Process $downloadPage
Read-Host 'Press Enter to close'
exit 1
}
Write-Host ''
Write-Host 'All done. You can now run RemSound.exe.' -ForegroundColor Green
Read-Host 'Press Enter to close'
+2
View File
@@ -53,6 +53,8 @@ There is no central server, no account, and nothing stored online. The sound goe
## 2. Quick start
> **If RemSound won't start** — if Windows says it needs “.NET” — RemSound runs on the **Microsoft .NET 10 Desktop Runtime**. Most up-to-date Windows machines already have it; if yours doesn't, open the **Install Scripts** folder sitting next to `RemSound.exe` and double-click **Install .NET for RemSound.cmd**. It fetches and installs it for you (using winget, the Windows package manager), and then RemSound will start. There's a `.ps1` version in the same folder for PowerShell users. If you'd rather do it by hand, the script opens Microsoft's download page, where you pick “.NET Desktop Runtime” for “x64”.
Let's assume you and a friend both have RemSound running, and that your two computers can reach each other on the network (the same Wi-Fi, the same Tailscale account, and so on).
1. Start RemSound. The first thing you'll see is the **profile picker**. On a brand-new install your only choice is **New profile** — select it and press Enter or click OK. Later, once you've saved a setup or two of your own, this is the dialog where you choose which one to load. See Profiles for the full story.
+4
View File
@@ -74,6 +74,10 @@ ul, ol { padding-left: 1.4em; }
<h2 id="quick-start">2. Quick start</h2>
<div class="note">
<strong>If RemSound won't start</strong> &mdash; if Windows says it needs &ldquo;.NET&rdquo; &mdash; RemSound runs on the <strong>Microsoft .NET 10 Desktop Runtime</strong>. Most up-to-date Windows machines already have it; if yours doesn't, open the <strong>Install Scripts</strong> folder sitting next to <code>RemSound.exe</code> and double-click <strong>Install .NET for RemSound.cmd</strong>. It fetches and installs it for you (using winget, the Windows package manager), and then RemSound will start. There's a <code>.ps1</code> version in the same folder for PowerShell users. If you'd rather do it by hand, the script opens Microsoft's download page, where you pick &ldquo;.NET Desktop Runtime&rdquo; for &ldquo;x64&rdquo;.
</div>
<p>Let's assume you and a friend both have RemSound running, and that your two computers can reach each other on the network (the same Wi-Fi, the same Tailscale account, and so on).</p>
<ol>
+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>