Портативную упаковку — отдельным шагом (build.py python3 = Store-заглушка)
build.py зовёт `python3 generate.py`, на GUSIK-PC это Store-заглушка -> падал, хотя клиент уже собран. Теперь build.py --skip-portable-pack, установщик пакуем реальным python -> dist/rustdesk-<tag>-install.exe. Стоковый flutter 3.24.5 engine собрал Windows без кастомной подмены. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -127,18 +127,30 @@ Push-Location $src
|
||||
if ($LASTEXITCODE) { Pop-Location; throw "vcpkg install упал ($LASTEXITCODE)" }
|
||||
Pop-Location
|
||||
|
||||
# --- сборка ---
|
||||
Write-Host "python build.py --flutter..." -ForegroundColor Cyan
|
||||
# --- сборка клиента (без портативной упаковки: её build.py делает через `python3`,
|
||||
# а на GUSIK-PC python3 = Store-заглушка -> падает; пакуем отдельно реальным python) ---
|
||||
Write-Host "python build.py --flutter --skip-portable-pack..." -ForegroundColor Cyan
|
||||
Push-Location $src
|
||||
python build.py --flutter
|
||||
python build.py --flutter --skip-portable-pack
|
||||
$rc = $LASTEXITCODE
|
||||
Pop-Location
|
||||
if ($rc) { throw "build.py упал ($rc)" }
|
||||
$rel = 'flutter/build/windows/x64/runner/Release'
|
||||
if (-not (Test-Path "$src/$rel/rustdesk.exe")) { throw "клиент не собран: нет $rel/rustdesk.exe" }
|
||||
|
||||
# --- артефакт ---
|
||||
# --- портативный установщик (generate.py реальным python) ---
|
||||
Write-Host "Упаковка портативного установщика (generate.py)..." -ForegroundColor Cyan
|
||||
Push-Location "$src\libs\portable"
|
||||
python -m pip install -q -r requirements.txt
|
||||
python generate.py -f "../../$rel/" -o . -e "../../$rel/rustdesk.exe"
|
||||
$genRc = $LASTEXITCODE
|
||||
Pop-Location
|
||||
if ($genRc) { throw "generate.py упал ($genRc)" }
|
||||
|
||||
# --- артефакт в dist ---
|
||||
New-Item -ItemType Directory -Force $dist | Out-Null
|
||||
$out = Get-ChildItem -Path $src -Filter 'rustdesk-*-install.exe' -EA SilentlyContinue | Select-Object -First 1
|
||||
if (-not $out) { $out = Get-ChildItem -Path $src -Recurse -Filter 'rustdesk*.exe' -EA SilentlyContinue |
|
||||
Where-Object { $_.FullName -match 'Release' } | Select-Object -First 1 }
|
||||
if ($out) { Copy-Item $out.FullName (Join-Path $dist $out.Name) -Force; Write-Host "ГОТОВО: $(Join-Path $dist $out.Name)" -ForegroundColor Green }
|
||||
else { Write-Host "Сборка ок, но .exe не найден — глянь $src (rustdesk-*-install.exe) и $src\flutter\build." -ForegroundColor Yellow }
|
||||
$packer = "$src\target\release\rustdesk-portable-packer.exe"
|
||||
if (-not (Test-Path $packer)) { throw "не найден rustdesk-portable-packer.exe после generate.py" }
|
||||
$outExe = Join-Path $dist "rustdesk-$TAG-install.exe"
|
||||
Copy-Item $packer $outExe -Force
|
||||
Write-Host "ГОТОВО: $outExe ($([math]::Round((Get-Item $outExe).Length/1MB,1)) MB)" -ForegroundColor Green
|
||||
|
||||
Reference in New Issue
Block a user