fix(desktop): ship the VC++ runtime the Windows voice wheels need
onnxruntime (wake word) and ctranslate2 (local speech-to-text) link against msvcp140.dll and msvcp140_1.dll, which the managed CPython does not ship. On Windows without the system VC++ Redistributable both imports failed with "DLL load failed: The specified module could not be found", so "Hey Hermes" and voice chat transcription never worked. - Bundle the Microsoft-signed VC143 CRT set (14.44.35211, matching the managed CPython's vcruntime140) as a Windows extra resource with a SHA-256 manifest. - Before every local backend start, copy missing or mismatching CRT files beside the managed python.exe (the process image directory, searched first), verifying digests; never overwrite the interpreter's own vcruntime and never block boot. Existing installs heal on their next launch. - Report an unloadable native voice wheel as a VC++ runtime problem in the wake-word requirements, local transcription and `hermes doctor`, instead of treating installed package metadata as proof the wheel loads. - Bump AITURK IDE to 1.0.0-beta.12. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9a1d831d4b
commit
233885d3a7
20 files changed
+684
-5
No files matched your search
@@ -33,6 +33,7 @@ import {
|
||||
} from 'electron'
|
||||
|
||||
import { classifyActiveRuntime, needsPackagedRuntimeUpgrade } from './active-runtime-state'
|
||||
import { describeVcRuntimeResult, ensureWindowsVcRuntime } from './windows-vc-runtime'
|
||||
import { destroyKeepaliveAgents, downloadAgentFor, jsonAgentFor, withRetry } from './api-transport'
|
||||
import { appIconCandidates, resolveAppIcon } from './app-icon'
|
||||
import { stopBackendChild as stopBackendChildImpl, stopBackendTreesForUpdate } from './backend-child'
|
||||
@@ -5221,6 +5222,22 @@ async function ensureRuntime(backend) {
|
||||
)
|
||||
}
|
||||
|
||||
// Voice wheels (onnxruntime, ctranslate2) need msvcp140*.dll, which the
|
||||
// managed CPython does not ship. Place the bundled Microsoft CRT beside the
|
||||
// managed python.exe before the backend imports anything. Never blocks boot:
|
||||
// only the voice features depend on it.
|
||||
if (IS_WINDOWS) {
|
||||
const vcRuntime = ensureWindowsVcRuntime({
|
||||
platform: process.platform,
|
||||
venvRoot: VENV_ROOT,
|
||||
sourceDir: IS_PACKAGED
|
||||
? path.join(process.resourcesPath, 'vc-runtime', 'x64')
|
||||
: path.join(APP_ROOT, 'assets', 'windows', 'vc-runtime', 'x64')
|
||||
})
|
||||
|
||||
rememberLog(`[vc-runtime] ${describeVcRuntimeResult(vcRuntime)}`)
|
||||
}
|
||||
|
||||
backend.command = getVenvPython(VENV_ROOT)
|
||||
backend.label = `Hermes at ${ACTIVE_HERMES_ROOT} (venv: ${VENV_ROOT})`
|
||||
updateBootProgress({
|
||||
|
||||
Reference in new issue
Block a user