Move desktop launchers to PowerShell wrappers
This commit is contained in:
parent
0bd1621b47
commit
bf4afe42b3
6 changed files with 54 additions and 6 deletions
28
scripts/start-localcast-desktop.ps1
Normal file
28
scripts/start-localcast-desktop.ps1
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$root = "C:\Meta\LocalCastBridge"
|
||||
$voicemeeter = "C:\Program Files (x86)\VB\Voicemeeter\voicemeeter_x64.exe"
|
||||
$soundVolumeView = "C:\Users\Madman's Lullaby\AppData\Local\Microsoft\WinGet\Links\SoundVolumeView.exe"
|
||||
$ffmpeg = "C:\Users\Madman's Lullaby\AppData\Local\Microsoft\WinGet\Links\ffmpeg.exe"
|
||||
$config = Join-Path $root "config\localcast.json"
|
||||
$senderStart = Join-Path $root "scripts\sender-start.ps1"
|
||||
|
||||
Set-Location $root
|
||||
|
||||
if (Test-Path -LiteralPath $voicemeeter) {
|
||||
Start-Process -FilePath $voicemeeter
|
||||
} else {
|
||||
Write-Warning "Voicemeeter was not found at $voicemeeter"
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath $soundVolumeView) {
|
||||
& $soundVolumeView /SetDefault "VB-Audio Voicemeeter VAIO\Device\Voicemeeter VAIO3 Input\Render" 0
|
||||
& $soundVolumeView /SetDefault "VB-Audio Voicemeeter VAIO\Device\Voicemeeter VAIO3 Input\Render" 1
|
||||
& $soundVolumeView /SetDefault "VB-Audio Voicemeeter VAIO\Device\Voicemeeter Out B3\Capture" 0
|
||||
& $soundVolumeView /SetDefault "VB-Audio Voicemeeter VAIO\Device\Voicemeeter Out B3\Capture" 1
|
||||
} else {
|
||||
Write-Warning "SoundVolumeView was not found at $soundVolumeView"
|
||||
}
|
||||
|
||||
& $senderStart -Config $config -FfmpegPath $ffmpeg
|
||||
|
||||
19
scripts/stop-localcast-desktop.ps1
Normal file
19
scripts/stop-localcast-desktop.ps1
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$root = "C:\Meta\LocalCastBridge"
|
||||
$soundVolumeView = "C:\Users\Madman's Lullaby\AppData\Local\Microsoft\WinGet\Links\SoundVolumeView.exe"
|
||||
$senderStop = Join-Path $root "scripts\sender-stop.ps1"
|
||||
|
||||
Set-Location $root
|
||||
|
||||
& $senderStop
|
||||
|
||||
if (Test-Path -LiteralPath $soundVolumeView) {
|
||||
& $soundVolumeView /SetDefault "Focusrite USB Audio\Device\Speakers\Render" 0
|
||||
& $soundVolumeView /SetDefault "Focusrite USB Audio\Device\Speakers\Render" 1
|
||||
} else {
|
||||
Write-Warning "SoundVolumeView was not found at $soundVolumeView"
|
||||
}
|
||||
|
||||
Get-Process voicemeeter_x64 -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||
|
||||
Loading…
Reference in a new issue