This commit is contained in:
Your Name
2026-09-07 10:07:47 +08:00
parent cf3fbdc5ef
commit d5164b7369
388 changed files with 19863 additions and 18720 deletions
+24 -2
View File
@@ -169,8 +169,30 @@ try {
& $Npm run build --prefix $CompanionRoot
if ($LASTEXITCODE -ne 0) { throw "video companion build failed" }
& $Python -m PyInstaller --noconfirm --clean $Spec
if ($LASTEXITCODE -ne 0) { throw "PyInstaller build failed" }
$BuildPythonBase = (& $Python -c "import sys; print(sys.base_prefix)").Trim()
if ($LASTEXITCODE -ne 0 -or -not $BuildPythonBase) {
throw "Unable to resolve the build Python runtime directory"
}
# Dependency scanning must not collect unrelated ICU/OpenSSL libraries from
# an editor's helper tools (for example Poppler) ahead of Windows libraries.
$PreviousBuildPath = $env:PATH
$BuildRuntimePaths = @(
(Split-Path -Parent $Python),
$BuildPythonBase,
(Join-Path $BuildPythonBase "DLLs"),
(Join-Path $env:SystemRoot "System32"),
$env:SystemRoot,
(Join-Path $env:SystemRoot "System32\WindowsPowerShell\v1.0")
)
try {
$env:PATH = ($BuildRuntimePaths | Select-Object -Unique) -join [System.IO.Path]::PathSeparator
& $Python -m PyInstaller --noconfirm --clean $Spec
$PyInstallerExitCode = $LASTEXITCODE
}
finally {
$env:PATH = $PreviousBuildPath
}
if ($PyInstallerExitCode -ne 0) { throw "PyInstaller build failed" }
$Artifact = Join-Path $ProjectRoot "dist\DoctorWorkstation"
$Helper = Get-ChildItem -LiteralPath $Artifact -Recurse -Filter "QtWebEngineProcess.exe" -File | Select-Object -First 1