Phase 7~8 구현: 테스트 + 빌드 + CI/CD + SoundEffect + AutoLaunch + UI 리디자인
- vitest 41개 단위 테스트 (HistoryService, DictionaryService, CustomInstructionService, VoiceModeService, D3ROError) - electron-builder.yml (NSIS, asarUnpack, extraResources) - .gitlab-ci.yml (lint, typecheck, test, build, release) - SoundEffectService: WAV 프리로드 + PowerShell 재생 + VoiceMode 연동 - AutoLaunchService: app.setLoginItemSettings + ConfigService 동기화 - TextInsertService: 간이 삽입 검증 (EditMonitor 경량) - 번들링 인프라: SoX 다운로드 스크립트, PyInstaller 빌드, 경로 해상도 유틸 - AudioCaptureService/LocalSTTService: 번들 경로 자동 감지 - 08-design-system.md 기반 MUI 테마 (다크+라이트+auto 테마 시스템) - 전체 UI 컴포넌트 리디자인: AppLayout, Dashboard, StatusBar, History, Dictionary, Commands, Settings - 효과음 WAV 생성: recording-start, recording-stop, error - EPIPE 에러 핸들링 추가
This commit is contained in:
parent
ed5541f769
commit
3f4d0c5828
40 changed files with 6034 additions and 580 deletions
111
scripts/download-sox.ps1
Normal file
111
scripts/download-sox.ps1
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
# scripts/download-sox.ps1
|
||||
# SoX Windows 바이너리를 resources/sox/에 다운로드한다.
|
||||
# 실행: powershell -ExecutionPolicy Bypass -File scripts/download-sox.ps1
|
||||
|
||||
$SOX_VERSION = "14.4.1"
|
||||
# SourceForge 직접 다운로드 URL (리다이렉트 따라감)
|
||||
$SOX_URL = "https://downloads.sourceforge.net/project/sox/sox/$SOX_VERSION/sox-${SOX_VERSION}-win32.zip"
|
||||
$DEST_DIR = Join-Path $PSScriptRoot "..\resources\sox"
|
||||
$TEMP_ZIP = Join-Path $env:TEMP "sox-${SOX_VERSION}-win32.zip"
|
||||
$TEMP_DIR = Join-Path $env:TEMP "sox-extract"
|
||||
|
||||
Write-Host "=== SoX $SOX_VERSION Windows 바이너리 다운로드 ===" -ForegroundColor Cyan
|
||||
|
||||
# 이미 존재하면 스킵
|
||||
if (Test-Path (Join-Path $DEST_DIR "sox.exe")) {
|
||||
Write-Host "SoX가 이미 존재합니다: $DEST_DIR\sox.exe" -ForegroundColor Green
|
||||
exit 0
|
||||
}
|
||||
|
||||
# 기존 임시 파일 정리
|
||||
if (Test-Path $TEMP_ZIP) { Remove-Item -Force $TEMP_ZIP }
|
||||
|
||||
# 다운로드 (SourceForge 리다이렉트를 따라감)
|
||||
Write-Host "다운로드 중: $SOX_URL"
|
||||
Write-Host "(SourceForge 리다이렉트를 따라가므로 시간이 걸릴 수 있습니다)"
|
||||
try {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$webClient = New-Object System.Net.WebClient
|
||||
$webClient.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)")
|
||||
$webClient.DownloadFile($SOX_URL, $TEMP_ZIP)
|
||||
} catch {
|
||||
Write-Host "자동 다운로드 실패: $_" -ForegroundColor Red
|
||||
Write-Host ""
|
||||
Write-Host "=== 수동 설치 방법 ===" -ForegroundColor Yellow
|
||||
Write-Host "1. 브라우저에서 다운로드:" -ForegroundColor White
|
||||
Write-Host " https://sourceforge.net/projects/sox/files/sox/14.4.1/sox-14.4.1-win32.zip/download"
|
||||
Write-Host ""
|
||||
Write-Host "2. 다운로드한 zip에서 아래 파일들을 복사:" -ForegroundColor White
|
||||
Write-Host " sox.exe, rec.exe, libmad-0.dll, libmp3lame-0.dll, libsox-3.dll"
|
||||
Write-Host ""
|
||||
Write-Host "3. 복사 위치:" -ForegroundColor White
|
||||
Write-Host " $DEST_DIR"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# zip 파일 검증
|
||||
$fileSize = (Get-Item $TEMP_ZIP).Length
|
||||
if ($fileSize -lt 100000) {
|
||||
Write-Host "다운로드된 파일이 너무 작습니다 (${fileSize} bytes). HTML 페이지가 다운로드된 것 같습니다." -ForegroundColor Red
|
||||
Remove-Item -Force $TEMP_ZIP -ErrorAction SilentlyContinue
|
||||
Write-Host ""
|
||||
Write-Host "=== 수동 설치 방법 ===" -ForegroundColor Yellow
|
||||
Write-Host "1. 브라우저에서 다운로드:" -ForegroundColor White
|
||||
Write-Host " https://sourceforge.net/projects/sox/files/sox/14.4.1/sox-14.4.1-win32.zip/download"
|
||||
Write-Host ""
|
||||
Write-Host "2. 다운로드한 zip 압축 해제 후 아래 파일들을 복사:" -ForegroundColor White
|
||||
Write-Host " sox.exe, rec.exe, libmad-0.dll, libmp3lame-0.dll, libsox-3.dll"
|
||||
Write-Host ""
|
||||
Write-Host "3. 복사 위치:" -ForegroundColor White
|
||||
Write-Host " $DEST_DIR"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "다운로드 완료 (${fileSize} bytes)"
|
||||
|
||||
# 압축 해제
|
||||
Write-Host "압축 해제 중..."
|
||||
if (Test-Path $TEMP_DIR) { Remove-Item -Recurse -Force $TEMP_DIR }
|
||||
|
||||
try {
|
||||
Expand-Archive -Path $TEMP_ZIP -DestinationPath $TEMP_DIR -Force
|
||||
} catch {
|
||||
Write-Host "압축 해제 실패: $_" -ForegroundColor Red
|
||||
Write-Host "수동으로 $TEMP_ZIP 을 압축 해제한 후 sox.exe 등을 $DEST_DIR 에 복사하세요." -ForegroundColor Yellow
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 필요한 파일만 복사
|
||||
$SOX_EXTRACTED = Get-ChildItem $TEMP_DIR -Directory | Select-Object -First 1
|
||||
if (-not $SOX_EXTRACTED) {
|
||||
# 디렉토리 없이 바로 파일이 있는 경우
|
||||
$SOX_EXTRACTED = Get-Item $TEMP_DIR
|
||||
}
|
||||
|
||||
$filesToCopy = @("sox.exe", "rec.exe", "libmad-0.dll", "libmp3lame-0.dll", "libsox-3.dll")
|
||||
New-Item -ItemType Directory -Force -Path $DEST_DIR | Out-Null
|
||||
|
||||
$copied = 0
|
||||
foreach ($file in $filesToCopy) {
|
||||
$src = Get-ChildItem -Path $TEMP_DIR -Recurse -Filter $file | Select-Object -First 1
|
||||
if ($src) {
|
||||
Copy-Item $src.FullName -Destination $DEST_DIR
|
||||
Write-Host " 복사: $file" -ForegroundColor Green
|
||||
$copied++
|
||||
} else {
|
||||
Write-Host " 누락: $file (선택적)" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
# 정리
|
||||
Remove-Item -Recurse -Force $TEMP_DIR -ErrorAction SilentlyContinue
|
||||
Remove-Item -Force $TEMP_ZIP -ErrorAction SilentlyContinue
|
||||
|
||||
if ($copied -ge 1) {
|
||||
Write-Host ""
|
||||
Write-Host "SoX 설치 완료: $DEST_DIR ($copied 파일)" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "파일 복사 실패. 수동으로 설치해주세요." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue