fix
This commit is contained in:
@@ -205,6 +205,12 @@ jobs:
|
||||
-Force `
|
||||
-ErrorAction SilentlyContinue
|
||||
|
||||
Remove-Item `
|
||||
".\bridge-download" `
|
||||
-Recurse `
|
||||
-Force `
|
||||
-ErrorAction SilentlyContinue
|
||||
|
||||
git -c core.longpaths=true clone `
|
||||
--branch "$env:RUSTDESK_VERSION" `
|
||||
--depth 1 `
|
||||
@@ -226,11 +232,64 @@ jobs:
|
||||
throw "RustDesk submodule checkout failed"
|
||||
}
|
||||
|
||||
Write-Host "`n===== Checking Flutter Windows project ====="
|
||||
|
||||
$windowsCmake = "rustdesk\flutter\windows\CMakeLists.txt"
|
||||
|
||||
if (-not (Test-Path $windowsCmake)) {
|
||||
throw "RustDesk checkout does not contain $windowsCmake"
|
||||
}
|
||||
|
||||
Get-Item $windowsCmake
|
||||
Write-Host "Flutter Windows project exists after clone"
|
||||
|
||||
- name: Restore generated bridge
|
||||
uses: https://github.com/actions/download-artifact@v8
|
||||
with:
|
||||
name: rustdesk-bridge-1.4.9
|
||||
path: rustdesk
|
||||
path: bridge-download
|
||||
|
||||
- name: Copy generated bridge into RustDesk
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$files = @{
|
||||
"bridge-download\src\bridge_generated.rs" =
|
||||
"rustdesk\src\bridge_generated.rs"
|
||||
|
||||
"bridge-download\src\bridge_generated.io.rs" =
|
||||
"rustdesk\src\bridge_generated.io.rs"
|
||||
|
||||
"bridge-download\flutter\lib\generated_bridge.dart" =
|
||||
"rustdesk\flutter\lib\generated_bridge.dart"
|
||||
|
||||
"bridge-download\flutter\lib\generated_bridge.freezed.dart" =
|
||||
"rustdesk\flutter\lib\generated_bridge.freezed.dart"
|
||||
}
|
||||
|
||||
foreach ($source in $files.Keys) {
|
||||
$destination = $files[$source]
|
||||
|
||||
if (-not (Test-Path $source)) {
|
||||
throw "Bridge artifact file missing: $source"
|
||||
}
|
||||
|
||||
Copy-Item `
|
||||
$source `
|
||||
$destination `
|
||||
-Force
|
||||
|
||||
Write-Host "$source -> $destination"
|
||||
}
|
||||
|
||||
Write-Host "`nChecking Windows Flutter project after bridge restore..."
|
||||
|
||||
if (-not (Test-Path "rustdesk\flutter\windows\CMakeLists.txt")) {
|
||||
throw "flutter/windows disappeared after bridge restore"
|
||||
}
|
||||
|
||||
Write-Host "flutter/windows/CMakeLists.txt OK"
|
||||
|
||||
- name: Verify bridge
|
||||
shell: pwsh
|
||||
@@ -381,6 +440,28 @@ jobs:
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (-not (Test-Path "rustdesk\flutter\windows\CMakeLists.txt")) {
|
||||
Write-Host "flutter/windows missing, restoring from Git..."
|
||||
|
||||
git `
|
||||
-C rustdesk `
|
||||
restore `
|
||||
--source=HEAD `
|
||||
-- `
|
||||
flutter/windows
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Unable to restore flutter/windows"
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Test-Path "rustdesk\flutter\windows\CMakeLists.txt")) {
|
||||
throw "flutter/windows/CMakeLists.txt is still missing"
|
||||
}
|
||||
|
||||
Write-Host "Windows Flutter project:"
|
||||
Get-Item "rustdesk\flutter\windows\CMakeLists.txt"
|
||||
|
||||
Set-Location rustdesk
|
||||
|
||||
python `
|
||||
|
||||
Reference in New Issue
Block a user