Repository navigation
Conversation
get_started_windows.ps1 now does what the Linux installer does: on an install whose config sets no output, it asks for the name a server shows and for what to play through, or takes -Name and -Output. The output is a short menu: 0 follows Windows' default, and each real device is offered once, by its DirectSound entry, and written as portaudio:directsound:<name>. The config is written as UTF-8 without a BOM, which the player would otherwise refuse. "Next" now gives the full path to the binary: the PATH change only reaches terminals opened afterwards, which is not the one the script ran in, nor VS Code's until it restarts. uninstall_windows.ps1 removes the task, the running player, the install folder, the PATH entry and the firewall rule, and tidies the control-socket files players leave behind. Config and remembered state are kept unless -Purge, as uninstall_linux.sh keeps them.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved Windows script defects can prevent uninstallation, misconfigure audio-device selection, or abort installation on out-of-range numeric input.
4 open issues
What changed in this PR
Improves Windows setup and removal for sendspin-cli, using #103’s host-API-qualified device names for output selection.
Changes:
- Adds name and output prompts and flags, BOM-free UTF-8 config writing, and clearer post-install commands.
- Adds a Windows uninstaller that preserves config and remembered state unless removal is requested.
- Updates Windows setup and uninstall documentation.
| File | Description |
|---|---|
scripts/uninstall_windows.ps1 |
Adds confirmed removal of the player, scheduled task, installed files, PATH entry, and firewall rule. |
scripts/get_started_windows.ps1 |
Adds player configuration choices and clearer instructions for immediate use. |
README.md |
Adds Windows uninstall commands and purge guidance. |
docs/wiki/Getting-Started-on-Windows.md |
Documents setup prompts, flags, PATH behavior, and the uninstaller. |
Review effort: Balanced
|
|
||
| # One entry per output device, from -l's DirectSound rows: full names, and Windows resamples. | ||
| function Get-OutputChoices { | ||
| $listing = @(Invoke-Native { & $Binary -l }) |
| if (-not $answer) { | ||
| $answer = '0' | ||
| } | ||
| if ($answer -match '^\d+$' -and [int]$answer -le $choices.Count) { |
| Say " '$answer' is not on the list" | ||
| } | ||
| $Output = if ($answer -eq '0') { 'portaudio' } else { | ||
| "portaudio:directsound:$($choices[[int]$answer - 1].Name)" |
| # Disabled first, so its once-a-minute check cannot start the player again. | ||
| Disable-ScheduledTask -TaskName $TaskName | Out-Null | ||
| } | ||
| foreach ($process in $Running) { |
- Read -l as UTF-8, so a device name with an umlaut survives an OEM console code page. - Parse the menu answer with TryParse: 00 is the default, and a number past Int32 is refused rather than aborting setup. - Look for running players again after disabling the task, since it can start one while the plan is on screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stacked on #103. The output choice writes
portaudio:directsound:<name>, which only resolves with #103's host-API prefix. Merge #103 first; this PR then retargets tomain.Why
Running
get_started_windows.ps1end to end on a real PC showed three gaps for someone who knows nothing beyond "run this script":--nameand--output. Windows silently took the defaults.sendspin-cli statusfails right after installing. The PATH change only reaches terminals opened afterwards. That excludes the window the script ran in, and VS Code's terminals until VS Code restarts. The script's "Next" section told you to type the bare command.uninstall_linux.sh. Windows had a block of commands in the wiki to paste.What
get_started_windows.ps1-Nameand-Outputflags. Without them, it asks on an install whose config sets no output, using the same rule as Linux. A key the config already sets is never asked for or replaced, so upgrading asks nothing.-Yestakes only the flags.-l's 40-row dump. 0 follows Windows' default output (portaudio, the previous behaviour, and the menu default). Then each real device is listed once by its DirectSound entry, with the current default marked. DirectSound has full names, unlike MME's 31-character truncation, and Windows resamples for it, unlike WASAPI shared mode, which Let a PortAudio device name carry its host API #103's testing showed narrows the device to its mix rate. Picking a device writesoutput = portaudio:directsound:<name>.key_value_file.cppreads a BOM as part of line 1 and would refuse the file, and Windows PowerShell 5.1'sSet-Content -Encoding utf8adds one.New
uninstall_windows.ps1, matchinguninstall_linux.shtaskkillwithout/F, as the installer does), and removes the install folder, the PATH entry, and the firewall rule (through a UAC prompt, as adding it did).sendspin-cli-<port>.sock*files players leave in LocalAppData, but only when nosendspin-cli.exeis running anywhere.%APPDATA%\sendspin-cli) and remembered state (%LOCALAPPDATA%\sendspin-cli: identity, pairings, log) are kept by default, and it asks whether to remove them.-Purgeremoves them without asking.-Yesasks nothing.Docs: the Getting Started on Windows walkthrough (prompts, flags, steps, uninstall) and the README's Uninstall section.
Testing
.ps1.Set-ConfigKeyreplaced the example's commented lines in place, wrote no BOM, and wroteüasC3 BC.portaudio:directsound:Speakers (7- Schiit Modi+).