ENGINE: Cutover Pains and Fixes

This commit is contained in:
2025-11-01 04:44:23 -06:00
parent b815592639
commit 02eae72c0d
7 changed files with 1866 additions and 29 deletions

View File

@@ -233,31 +233,31 @@ function Ensure-EngineWebInterface {
[string]$ProjectRoot
)
$engineSource = Join-Path $ProjectRoot 'Engine\web-interface'
$legacySource = Join-Path $ProjectRoot 'Data\Server\WebUI'
$engineDestination = Join-Path $ProjectRoot 'Engine\web-interface'
$engineStageSource = Join-Path $ProjectRoot 'Data\Engine\web-interface'
if (-not (Test-Path $legacySource)) {
return
if (-not (Test-Path $engineStageSource)) {
throw "Engine web interface source missing at '$engineStageSource'."
}
$enginePackage = Join-Path $engineSource 'package.json'
$engineSrcDir = Join-Path $engineSource 'src'
$enginePackage = Join-Path $engineDestination 'package.json'
$engineSrcDir = Join-Path $engineDestination 'src'
if ((Test-Path $enginePackage) -and (Test-Path $engineSrcDir)) {
return
}
if (-not (Test-Path $engineSource)) {
New-Item -Path $engineSource -ItemType Directory -Force | Out-Null
if (-not (Test-Path $engineDestination)) {
New-Item -Path $engineDestination -ItemType Directory -Force | Out-Null
}
$preserve = @('.gitignore','README.md')
Get-ChildItem -Path $engineSource -Force | Where-Object { $preserve -notcontains $_.Name } |
Get-ChildItem -Path $engineDestination -Force | Where-Object { $preserve -notcontains $_.Name } |
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item (Join-Path $legacySource '*') $engineSource -Recurse -Force
Copy-Item (Join-Path $engineStageSource '*') $engineDestination -Recurse -Force
if (-not (Test-Path $enginePackage)) {
throw "Failed to stage Engine web interface into '$engineSource'."
throw "Failed to stage Engine web interface into '$engineDestination' from '$engineStageSource'."
}
}
@@ -1415,7 +1415,7 @@ switch ($choice) {
$dataSource = "Data"
$engineSource = "$dataSource\Engine"
$engineDataDestination = "$venvFolder\Data\Engine"
$webUIFallbackSource = "$dataSource\Server\web-interface"
$webUIFallbackSource = "$dataSource\Engine\web-interface"
$webUIDestination = "$venvFolder\web-interface"
$venvPython = Join-Path $venvFolder 'Scripts\python.exe'
$engineSourceAbsolute = Join-Path $scriptDir $engineSource