soundswitch@7.1.0: Fix file naming issue, add arm64 support#17865
Conversation
📝 WalkthroughWalkthroughThis PR updates the SoundSwitch Scoop manifest to restructure how installer assets are handled across architectures. The installer Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
bucket/soundswitch.json (2)
1-37: Testing recommendations for the ARM64 addition.Since this PR adds ARM64 architecture support, please ensure thorough testing on both architectures before merging:
# Test 64-bit installation scoop install bucket/soundswitch.json -a 64bit # Test ARM64 installation (on ARM64 Windows or emulated environment) scoop install bucket/soundswitch.json -a arm64 # Verify autoupdate functionality .\bin\checkver.ps1 -App soundswitch -f # Auto-format the manifest .\bin\formatjson.ps1 -App soundswitchAlso verify that:
- The correct binaries remain after pre_install cleanup
- Shortcuts are created successfully on both architectures
- The renamed files (after stripping
,1or,2markers) match the expectedshortcutsentryFor more details, see the Scoop Contribution Guide.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bucket/soundswitch.json` around lines 1 - 37, Add testing steps and verification for the new arm64 architecture: run installs for both architectures using the package manifest (scoop install ... -a 64bit and -a arm64 or equivalent), run checkver (checkver.ps1 -App soundswitch -f) to verify autoupdate pattern in "checkver" and "autoupdate", run formatjson.ps1 to auto-format the manifest, and on each install confirm the "pre_install" scripts under "architecture" correctly remove the unwanted marker files and rename the other files so the resulting executable matches the "shortcuts" entry ("SoundSwitch.exe"), and ensure shortcuts are created successfully on both architectures before merging.
15-20: 💤 Low valueConsider using more specific regex patterns (same as 64bit block).
The same pattern specificity consideration from the 64bit block applies here. If installer filenames include dots/extensions after the
,2marker, consider using-replace ',2\.', '.'instead of-replace ',2', ''for safer, more targeted renaming.🔧 Suggested more specific pattern
"arm64": { "pre_install": [ "Get-ChildItem $dir -Filter '*,1*' -Recurse | Remove-Item -Force", - "Get-ChildItem $dir -Filter '*,2*' -Recurse | Rename-Item -NewName { $_.Name -replace ',2', '' } -Force" + "Get-ChildItem $dir -Filter '*,2*' -Recurse | Rename-Item -NewName { $_.Name -replace ',2\\.', '.' } -Force" ] }Based on learnings and similar patterns in bulk-rename-utility.json.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bucket/soundswitch.json` around lines 15 - 20, In the arm64 pre_install block update the rename command to use a more specific regex like -replace ',2\.', '.' (and adjust the filter if needed) so only filenames where ",2" precedes an extension are changed; locate the "arm64" object and its "pre_install" entries and replace the Rename-Item call that uses -replace ',2', '' with a targeted pattern (e.g., -replace ',2\.', '.') to avoid accidentally stripping ",2" elsewhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@bucket/soundswitch.json`:
- Around line 1-37: Add testing steps and verification for the new arm64
architecture: run installs for both architectures using the package manifest
(scoop install ... -a 64bit and -a arm64 or equivalent), run checkver
(checkver.ps1 -App soundswitch -f) to verify autoupdate pattern in "checkver"
and "autoupdate", run formatjson.ps1 to auto-format the manifest, and on each
install confirm the "pre_install" scripts under "architecture" correctly remove
the unwanted marker files and rename the other files so the resulting executable
matches the "shortcuts" entry ("SoundSwitch.exe"), and ensure shortcuts are
created successfully on both architectures before merging.
- Around line 15-20: In the arm64 pre_install block update the rename command to
use a more specific regex like -replace ',2\.', '.' (and adjust the filter if
needed) so only filenames where ",2" precedes an extension are changed; locate
the "arm64" object and its "pre_install" entries and replace the Rename-Item
call that uses -replace ',2', '' with a targeted pattern (e.g., -replace ',2\.',
'.') to avoid accidentally stripping ",2" elsewhere.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 71321c4c-4324-4ad0-9b38-ceb6f901a66a
📒 Files selected for processing (1)
bucket/soundswitch.json
|
/verify |
|
All changes look good. Wait for review from human collaborators. soundswitch
|
z-Fng
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
The SoundSwitch v7.1.0 installer uses suffixes for filenames (
,1for x64 and,2for ARM64).This PR optimizes the manifest by:
urlandhashto the root (as both architectures use the same installer).64bitandarm64architecture support.pre_installscripts to clean up incompatible binaries and rename the correct ones by removing architecture suffixes.This ensures proper installation and shortcut creation on both x64 and ARM64 Windows systems.
soundswitch: fix file naming issue and add arm64 support in v7.1.0