Skip to content

Commit

Permalink
move dll to libs
Browse files Browse the repository at this point in the history
  • Loading branch information
willwade committed Sep 14, 2024
1 parent 810e4d5 commit ca6e81b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@ jobs:
# Move the DLL to VoiceServer directory
- name: Move DLL and other bits to VoiceServer directory
run: |
move engine/build/Release/* VoiceServer/
mkdir -p VoiceServer/_libs
move engine/build/Release/* VoiceServer/_libs/
- name: Set up UV
uses: yezz123/setup-uv@v4
- name: Sync UV dependencies
run: |
cd VoiceServer
uv sync
# Compile VoiceServer.py using Nuitka inside UV virtual environment
- name: Compile VoiceServer.py with Nuitka
- name: Compile RegisterVoice.py with Nuitka inside UV virtual environment
run: |
cd VoiceServer
dir
uv run python -m nuitka --standalone --onefile VoiceServer.py
# uv run python -m nuitka --standalone --onefile VoiceServer.py --include-data-files=pysapittsengine.dll=.
uv run python -m nuitka --standalone RegisterVoice.py --include-data-dir=VoiceServer/_libs=libs
# Compile RegisterVoice.py using Nuitka inside UV virtual environment
- name: Compile RegisterVoice.py with Nuitka
# Compile VoiceServer.py with Nuitka and include _libs
- name: Compile VoiceServer.py with Nuitka inside UV virtual environment
run: |
cd VoiceServer
uv run python -m nuitka --standalone --onefile RegisterVoice.py
uv run python -m nuitka --standalone VoiceServer.py --include-data-dir=VoiceServer/_libs=libs
- name: Build Installer with Inno Setup
run: |
Expand Down
2 changes: 1 addition & 1 deletion VoiceServer/VoiceServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def register_voice(self, tts_engine, engine_name, voice_iso_code):
"""Registers the voice by first registering the engine, then the voice."""
try:
# Step 1: Register the engine (assumed dll file is named pysapittsengine.dll)
engine_dll = "pysapittsengine.dll"
engine_dll = os.path.join(os.getcwd(), "libs", "pysapittsengine.dll")
if not self.is_engine_registered(engine_dll):
logging.info(f"Registering engine: {engine_dll}")
self.run_command(["regsvr32.exe", "/s", engine_dll])
Expand Down

0 comments on commit ca6e81b

Please sign in to comment.