d3ro-voice/apps/desktop/electron-builder.yml

180 lines
9.2 KiB
YAML

# appId는 Windows AUMID로 바로가기에 기록된다 — src/main/app-identity.ts APP_USER_MODEL_ID와 반드시 같아야 한다
# (tests/main/app-identity.test.ts가 검사).
appId: com.d3ro.voice
productName: D3RO Voice
copyright: Copyright © 2026 D3RO
# monorepo(npm workspaces)에서 electron이 루트 node_modules로 호이스팅되어
# 자동 감지가 실패하는 문제를 피하려고 명시적으로 버전 고정.
electronVersion: "43.8.10"
# 설치 크기 절감 — 지원 로케일만 포함한다
# Windows full-only 패키지는 차분용 1MiB 사전/비-solid 제약 없이 최대 압축을 사용한다
compression: maximum
electronLanguages:
- ko
- en-US
directories:
# buildResources를 build/로 지정 — resources/icons/가 비어있어 아이콘 자동 스캔이 실패하는 것을 우회.
# 아이콘 준비되면 build/icon.png(또는 .ico)를 두고 win.icon을 명시.
buildResources: build
output: release/${version}
files:
- out/**/*
- "!out/**/*.map"
# ffmpeg 정적 바이너리(61MB)는 설치본에 넣지 않는다 — 필요할 때 런타임으로 내려받는다
- "!node_modules/@ffmpeg-installer/**"
# better-sqlite3 13 은 모든 플랫폼의 Node-API 프리빌드를 싣는다 — 내지 않는 플랫폼(linux)은 뺀다
- "!node_modules/better-sqlite3/prebuilds/linux*"
# 런타임에 쓰지 않는 SQLite 소스(amalgamation) · C++ 소스
- "!node_modules/better-sqlite3/{deps,src}/**"
# shared packages는 main/preload/renderer에 번들됐고 main locale도 out/main/locales에 복사됐다
- "!node_modules/@d3ro/**"
# 렌더러 전용 패키지 — Vite 가 out/renderer 번들에 이미 넣었다. 메인/프리로드는 require 하지 않는다
# (out/main · out/preload 의 require 목록으로 확인). Electron 43 으로 실행 파일이 47MB 커져
# 설치본이 Cloudflare 업로드 한도(100MiB)를 넘었기 때문에 중복 사본을 뺀다.
- "!node_modules/{lucide-react,react,react-dom,react-is,react-markdown,react-transition-group,hoist-non-react-statics}/**"
- "!node_modules/{@mui,@emotion,@popperjs,@babel,@rollup}/**"
- "!node_modules/{babel-plugin-macros,overlayscrollbars,overlayscrollbars-react,unified,vfile,vfile-message}/**"
- "!node_modules/{micromark,micromark-*,mdast-util-*,hast-util-*,remark-*,unist-util-*}/**"
# ────────────────────────────────────────────────────────────────────
# 자동 업데이트 feed — 이 설정이 있어야 electron-builder가
# latest.yml / latest-mac.yml (update info)를 생성한다.
# generic provider는 파일 생성만 트리거하고 직접 업로드는 하지 않음
# (업로드는 scripts/ci/publish-forgejo-release.mjs 담당).
# canonical 호스트 = Forgejo (git.chanpaca.net/yunchan/d3ro-voice).
# src/main/update-feed.ts의 UPDATE_FEED_URL과 반드시 동일 값 유지.
# ────────────────────────────────────────────────────────────────────
publish:
provider: generic
url: "https://git.chanpaca.net/api/packages/yunchan/generic/d3ro-voice/latest"
# prerelease 버전(0.1.1-alpha)에서 채널을 "alpha"로 감지해 alpha.yml을 만드는 동작 차단 —
# electron-updater(기본 채널 latest)가 latest.yml을 찾으므로 항상 latest 채널로 고정.
detectUpdateChannel: false
# native 모듈은 asar 외부에 배치 (Windows 는 koffi SendInput 으로 단일화되어 @nut-tree-fork 불필요)
asarUnpack:
- "node_modules/better-sqlite3/**"
- "node_modules/uiohook-napi/**"
# koffi — 포그라운드 창 제목/프로세스 조회 및 SendInput(User32 FFI). prebuilt 바이너리 포함.
- "node_modules/koffi/**"
- "node_modules/@koromix/**"
# ────────────────────────────────────────────────────────────────────
# Windows
# 주: icon 지정 시 resources/icons/icon.ico 필요. 초기 배포에선 생략하여
# electron 기본 아이콘 사용(아이콘 준비되면 win.icon 라인 추가).
# ────────────────────────────────────────────────────────────────────
win:
icon: build/icon.ico
files:
# Windows는 koffi SendInput을 사용하므로 nut-js/Jimp의 macOS·Linux 입력 경로는 제외한다
- "!node_modules/@nut-tree-fork/**"
- "!node_modules/better-sqlite3/prebuilds/{darwin*,win32-arm64.node}"
# Stable artifacts must never silently fall back to an unsigned build.
forceCodeSigning: true
target:
- target: nsis
arch:
- x64
# ────────────────────────────────────────────────────────────────────
# macOS
# ────────────────────────────────────────────────────────────────────
mac:
# macOS 키 입력 시뮬레이션(⌘+V / ⌘+C)은 @nut-tree-fork 네이티브 어댑터를 사용한다.
asarUnpack:
- "node_modules/@nut-tree-fork/**"
# icns는 electron-builder가 build/icon.png(1024)에서 자동 생성
icon: build/icon.png
category: public.app-category.productivity
# 파일명 공백 금지 — GitLab Generic Package Registry가 공백을 불허해
# latest-mac.yml의 url과 레지스트리 업로드명이 어긋나면 업데이트 다운로드 404.
artifactName: "D3RO-Voice-${version}-${arch}.${ext}"
# x64 제외 — 사이드카(PyInstaller)가 arm64 전용이라 x64 산출물은 깨진 빌드가 됨.
# Intel Mac 수요 발생 시 x64 runner에서 별도 빌드.
target:
- target: dmg
arch:
- arm64
- target: zip
arch:
- arm64
hardenedRuntime: true
gatekeeperAssess: false
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
notarize: false
extendInfo:
NSMicrophoneUsageDescription: "D3RO Voice는 음성 인식을 위해 마이크 접근이 필요합니다."
NSCameraUsageDescription: "D3RO Voice는 스크린 컨텍스트 캡처를 위해 화면 녹화 권한이 필요합니다."
NSAppleEventsUsageDescription: "D3RO Voice는 활성 앱 정보를 가져오기 위해 다른 앱 제어 권한이 필요합니다."
NSSystemAdministrationUsageDescription: "D3RO Voice는 전역 핫키 등록을 위해 접근성 권한이 필요합니다."
dmg:
writeUpdateInfo: false
contents:
- x: 130
y: 220
- x: 410
y: 220
type: link
path: /Applications
# ────────────────────────────────────────────────────────────────────
# 공통 리소스 번들
# ────────────────────────────────────────────────────────────────────
extraResources:
# 앱 아이콘 (트레이/런타임용 — paths.ts getAppIconPath)
- from: build/icon.ico
to: icons/icon.ico
- from: build/icon.png
to: icons/icon.png
# 효과음 (플랫폼 공통)
- from: resources/sounds/
to: sounds/
filter:
- "*.wav"
# SoX 바이너리 (평면 파일만 허용 — wget.exe/PDF/문서 등 불필요 파일 유입 차단.
# 주의: "**/*" 패턴은 하위 디렉토리 누락 버그가 있으므로 평면 글롭만 사용한다)
- from: resources/sox/
to: sox/
filter:
- "sox.exe"
- "zlib1.dll"
- "LICENSE.GPL.txt"
- "sox"
- "*.dylib"
- "*.so*"
# 주의: 로컬 AI 런타임(사이드카 엔진, ffmpeg)은 여기에 넣지 않는다.
# 포함하면 설치본이 Cloudflare 업로드 한도(100MiB)를 넘어 자동 업데이트 메타데이터를
# 게시할 수 없다(실측: 엔진 포함 189MB vs 엔진 제외 90.5MiB). 런타임은 처음 필요할 때
# RuntimeProvisioner가 feed에서 내려받아 검증한 뒤 해제해 설치한다.
# Ollama 바이너리 (포터블 zip을 사전 배치)
- from: resources/ollama/
to: ollama/
nsis:
# Cloudflare 100MiB 한도 안에서 최대 solid 압축을 쓴다. Windows는 .blockmap 없이 전체 설치본을 받는다.
differentialPackage: false
# 파일명 공백 금지 — mac.artifactName 주석과 동일한 이유 (latest.yml url 정합)
artifactName: "D3RO-Voice-Setup-${version}-${arch}.${ext}"
# oneClick=false + perMachine=false 조합이 System.dll 0xc0000005 크래시 사례(#7921).
# 사내 테스트 단계에선 oneClick=true로 전환하여 크래시 경로 회피.
oneClick: true
perMachine: false
allowToChangeInstallationDirectory: false
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: D3RO Voice
deleteAppDataOnUninstall: false
# installer.nsh 비활성화 유지 (System.dll 크래시 방지)
npmRebuild: true