From f9b3ed9e67569f7e6e71ec521d548f40e7264958 Mon Sep 17 00:00:00 2001 From: Ednunp <29843396+Ednunp@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:24:20 +0100 Subject: [PATCH] Add Install Scripts (winget .NET 10 install) for the no-runtime case (held for next release) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Install Scripts/Install .NET for RemSound.cmd | 41 +++++++++++++++++++ Install Scripts/Install .NET for RemSound.ps1 | 33 +++++++++++++++ MANUAL.md | 2 + readme.html | 4 ++ src/RemSound.App/RemSound.App.csproj | 20 +++++++++ 5 files changed, 100 insertions(+) create mode 100644 Install Scripts/Install .NET for RemSound.cmd create mode 100644 Install Scripts/Install .NET for RemSound.ps1 diff --git a/Install Scripts/Install .NET for RemSound.cmd b/Install Scripts/Install .NET for RemSound.cmd new file mode 100644 index 0000000..ed31a54 --- /dev/null +++ b/Install Scripts/Install .NET for RemSound.cmd @@ -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 diff --git a/Install Scripts/Install .NET for RemSound.ps1 b/Install Scripts/Install .NET for RemSound.ps1 new file mode 100644 index 0000000..9919b09 --- /dev/null +++ b/Install Scripts/Install .NET for RemSound.ps1 @@ -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' diff --git a/MANUAL.md b/MANUAL.md index abf3bdf..4e78d31 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -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. diff --git a/readme.html b/readme.html index 2f05030..1b94742 100644 --- a/readme.html +++ b/readme.html @@ -74,6 +74,10 @@ ul, ol { padding-left: 1.4em; }

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).

    diff --git a/src/RemSound.App/RemSound.App.csproj b/src/RemSound.App/RemSound.App.csproj index 6358e6c..e06d288 100644 --- a/src/RemSound.App/RemSound.App.csproj +++ b/src/RemSound.App/RemSound.App.csproj @@ -90,6 +90,17 @@ PreserveNewest PreserveNewest + + + Install Scripts\%(Filename)%(Extension) + PreserveNewest + PreserveNewest + + + + <_InstallScripts Include="..\..\Install Scripts\*.cmd;..\..\Install Scripts\*.ps1" /> + + +