- apo/: VoiceChangerAPO.dll (SFX APO on the real mic, built with mingw). When the app converts, the mic's own stream carries the converted voice; otherwise it passes the real voice through. Shared-memory protocol in vccore.h, Python side app/mic_bridge.py - scripts/mic-apo.ps1: register/unregister on every capture endpoint with admin value rights only (no ACL changes unless FxProperties is missing), originals backed up and restored - app: mic is the conversion target (WASAPI names), no output device, '마이크 다시 연결' button, 44.1k<->48k streaming resample, caches/temp redirected into <install>/cache - installer/VoiceChanger.iss (Inno Setup): choose install folder, register APO, download engine into that folder, uninstall restores mic settings and asks before deleting models - install.ps1: uv python --no-bin --no-registry, temp/caches inside the folder, uv cache clean - tests: C core compiled with gcc against the Python bridge; converter pump 44.1k round trip Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.7 KiB
Bash
Executable File
31 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# 배포 파일을 만든다 (리눅스, mingw).
|
|
# dist/payload/ 설치 프로그램에 들어갈 파일 (VoiceChanger.exe · VoiceChangerAPO.dll · 스크립트 · 앱 코드)
|
|
# dist/voice-changer-win.zip 같은 내용의 zip (설치 프로그램 없이 풀어서 쓸 때)
|
|
# 설치 프로그램(VoiceChangerSetup.exe)은 Windows 의 Inno Setup 으로 만든다: installer/build.ps1
|
|
# 엔진 · torch 는 설치할 때 게임PC 에서 받는다.
|
|
set -euo pipefail
|
|
here="$(cd "$(dirname "$0")/.." && pwd)"
|
|
out="${1:-$here/dist}"
|
|
pkg="$out/payload"
|
|
rm -rf "$pkg"
|
|
mkdir -p "$pkg/scripts" "$pkg/models" "$pkg/launcher" "$pkg/app" "$pkg/apo" "$out"
|
|
x86_64-w64-mingw32-gcc -O2 -municode -mwindows -finput-charset=UTF-8 -o "$pkg/VoiceChanger.exe" "$here/launcher/launcher.c"
|
|
x86_64-w64-mingw32-g++ -O2 -Wall -shared -static -fno-exceptions -fno-rtti -o "$pkg/apo/VoiceChangerAPO.dll" \
|
|
"$here/apo/vcapo.cpp" "$here/apo/vcapo.def" -lole32 -luuid -ladvapi32
|
|
cp "$here"/*.bat "$here/README.md" "$pkg/"
|
|
cp "$here/scripts/install.ps1" "$here/scripts/mic-apo.ps1" "$pkg/scripts/"
|
|
cp "$here/launcher/launcher.c" "$pkg/launcher/"
|
|
cp "$here/apo/vcapo.cpp" "$here/apo/vccore.h" "$here/apo/vcapo.def" "$pkg/apo/"
|
|
cp "$here"/app/*.py "$pkg/app/"
|
|
touch "$pkg/models/.gitkeep"
|
|
# Windows PowerShell 5.1 은 BOM 이 없는 .ps1 의 한글을 ANSI 로 읽어 스크립트가 깨진다. 줄바꿈도 CRLF 로 맞춘다
|
|
for f in "$pkg"/scripts/*.ps1; do
|
|
[ "$(head -c 3 "$f" | xxd -p)" = "efbbbf" ] || { echo "BOM 없음: $f" >&2; exit 1; }
|
|
done
|
|
for f in "$pkg"/scripts/*.ps1 "$pkg"/*.bat; do sed -i 's/\r*$/\r/' "$f"; done
|
|
rm -f "$out/voice-changer-win.zip"
|
|
(cd "$pkg" && zip -qr "$out/voice-changer-win.zip" .)
|
|
echo "$pkg"
|
|
echo "$out/voice-changer-win.zip"
|