feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동

- npm workspaces 루트 (apps/*, packages/*) 세팅
- V1 전체를 apps/desktop/으로 git mv (src, resources, tests, sidecar,
  scripts, electron.vite.config.ts, electron-builder.yml, vitest.config.ts,
  tsconfig.node.json, tsconfig.web.json)
- apps/desktop/package.json 신규 (name=@d3ro/desktop)
- productName: 'd3ro-voice' 명시 — app.getName()을 고정하여 userData 경로
  %APPDATA%\d3ro-voice\ 그대로 유지 (기존 DB/설정 연속성 보장)
- 루트 package.json을 workspace 루트로 재구성, 공통 devDep만 유지
  (typescript, eslint, prettier)
- turbo.json, tsconfig.base.json 추가 (Turborepo 자체 설치는 별도 sub-phase)
- memory/project_status.md 생성 (규칙 13)

검증:
- npm run typecheck 통과
- npm run build 통과 (electron-vite main+preload+renderer)
- npm run dev 실제 실행 → DB/핫키/Ollama 자동 실행 모두 정상
This commit is contained in:
yunchan8804 2026-04-08 14:04:41 +09:00
parent 3a160b9032
commit 45a580878a
178 changed files with 214 additions and 0 deletions

View file

@ -1,111 +0,0 @@
# 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
}