From b763412d9bc5bd5cca9fd7fa033da7ddb47cdb49 Mon Sep 17 00:00:00 2001 From: "DESKTOP-KSVGT20\\shkim" Date: Fri, 1 May 2026 23:43:08 +0900 Subject: [PATCH] Make Suno launchers PowerShell 7 safe --- run_process_suno_library.ps1 | 20 +++++++++++++++----- run_suno_companion.ps1 | 15 +++++++++++++-- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/run_process_suno_library.ps1 b/run_process_suno_library.ps1 index 534e243..57c46d5 100644 --- a/run_process_suno_library.ps1 +++ b/run_process_suno_library.ps1 @@ -1,21 +1,31 @@ $ErrorActionPreference = "Stop" +$pwsh = Join-Path $env:ProgramFiles "PowerShell\7\pwsh.exe" +if (($PSVersionTable.PSVersion.Major -lt 7) -and (Test-Path -LiteralPath $pwsh)) { + & $pwsh -NoProfile -ExecutionPolicy Bypass -File $PSCommandPath + exit $LASTEXITCODE +} + $manifest = Join-Path $env:USERPROFILE "Downloads\suno-library-*.manifest.json" $latest = Get-ChildItem -Path $manifest -File -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1 if (-not $latest) { - Write-Host "Downloads 폴더에서 suno-library-*.manifest.json 을 찾지 못했어." - Write-Host "Tampermonkey 패널에서 라이브러리 일괄 다운로드를 먼저 눌러줘." - Read-Host "Enter를 누르면 닫힘" + Write-Host "No suno-library-*.manifest.json found in Downloads." + Write-Host "Use the Tampermonkey panel first." + Read-Host "Press Enter to close" exit 1 } +$music = -join ([char[]](0xc74c, 0xc545)) +$processed = -join ([char[]](0xcc98, 0xb9ac, 0xb428)) +$outputRoot = "\\VaultOfData\AKAMedia\$music\$processed" + & "$PSScriptRoot\process-suno-library.ps1" ` -ManifestPath $latest.FullName ` - -OutputRoot "\\VaultOfData\AKAMedia\음악\처리됨" ` + -OutputRoot $outputRoot ` -ArtistName "SUNO" Write-Host "" -Read-Host "Enter를 누르면 닫힘" +Read-Host "Press Enter to close" diff --git a/run_suno_companion.ps1 b/run_suno_companion.ps1 index 325de8c..6641771 100644 --- a/run_suno_companion.ps1 +++ b/run_suno_companion.ps1 @@ -1,8 +1,19 @@ $ErrorActionPreference = "Stop" +$pwsh = Join-Path $env:ProgramFiles "PowerShell\7\pwsh.exe" +if (($PSVersionTable.PSVersion.Major -lt 7) -and (Test-Path -LiteralPath $pwsh)) { + & $pwsh -NoProfile -ExecutionPolicy Bypass -File $PSCommandPath + exit $LASTEXITCODE +} + +$music = -join ([char[]](0xc74c, 0xc545)) +$processed = -join ([char[]](0xcc98, 0xb9ac, 0xb428)) +$outputRoot = "\\VaultOfData\AKAMedia\$music\$processed" + & "$PSScriptRoot\suno-companion.ps1" ` -Port 17873 ` - -OutputRoot "\\VaultOfData\AKAMedia\음악\처리됨" ` + -OutputRoot $outputRoot ` -ArtistName "SUNO" -Read-Host "Enter를 누르면 닫힘" +Write-Host "" +Read-Host "Press Enter to close"