Skip to content

Commit 85e38aa

Browse files
committed
update natfrp build workflow
1 parent 999b0df commit 85e38aa

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

.github/workflows/natfrp.yml

+30-13
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ on:
1111
description: 'Version string in filename'
1212

1313
env:
14-
WIN_RUST_VERSION: "1.75"
14+
WIN_RUST_VERSION: "1.83"
1515
LLVM_VERSION: "15.0.6"
16-
FLUTTER_VERSION: "3.19.6"
17-
FLUTTER_RUST_BRIDGE_VERSION: "1.80.1"
18-
# vcpkg version: 2024.07.12
19-
VCPKG_COMMIT_ID: "1de2026f28ead93ff1773e6e680387643e914ea1"
16+
FLUTTER_VERSION: "3.24.5"
17+
# vcpkg version: 2024.11.16
18+
VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c"
2019

2120
jobs:
21+
generate-bridge:
22+
uses: ./.github/workflows/bridge.yml
23+
2224
build-RustDeskTempTopMostWindow:
2325
uses: ./.github/workflows/third-party-RustDeskTempTopMostWindow.yml
2426
with:
@@ -30,7 +32,7 @@ jobs:
3032

3133
build-for-windows-flutter:
3234
name: x86_64-pc-windows-msvc (windows-2022)
33-
needs: [build-RustDeskTempTopMostWindow]
35+
needs: [build-RustDeskTempTopMostWindow, generate-bridge]
3436
runs-on: windows-2022
3537
steps:
3638
- name: Export GitHub Actions cache environment variables
@@ -45,6 +47,12 @@ jobs:
4547
with:
4648
ref: ${{ inputs.tag }}
4749

50+
- name: Restore bridge files
51+
uses: actions/download-artifact@master
52+
with:
53+
name: bridge-artifact
54+
path: ./
55+
4856
- name: Cache [Install LLVM and Clang]
4957
id: cache-llvm
5058
uses: actions/cache@v3
@@ -66,6 +74,22 @@ jobs:
6674
flutter-version: ${{ env.FLUTTER_VERSION }}
6775
cache: true
6876

77+
# https://github.com/flutter/flutter/issues/155685
78+
- name: Replace engine with rustdesk custom flutter engine
79+
run: |
80+
flutter doctor -v
81+
flutter precache --windows
82+
Invoke-WebRequest -Uri https://github.com/rustdesk/engine/releases/download/main/windows-x64-release.zip -OutFile windows-x64-release.zip
83+
Expand-Archive -Path windows-x64-release.zip -DestinationPath windows-x64-release
84+
mv -Force windows-x64-release/*  C:/hostedtoolcache/windows/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/bin/cache/artifacts/engine/windows-x64-release/
85+
86+
- name: Patch flutter
87+
shell: bash
88+
run: |
89+
cp .github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff $(dirname $(dirname $(which flutter)))
90+
cd $(dirname $(dirname $(which flutter)))
91+
[[ "3.24.5" == ${{env.FLUTTER_VERSION}} ]] && git apply flutter_3.24.4_dropdown_menu_enableFilter.diff
92+
6993
- name: Install Rust toolchain
7094
uses: dtolnay/rust-toolchain@v1
7195
with:
@@ -77,13 +101,6 @@ jobs:
77101
with:
78102
prefix-key: windows-2022
79103

80-
- name: Install flutter rust bridge deps
81-
run: |
82-
git config --global core.longpaths true
83-
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
84-
Push-Location flutter ; flutter pub get ; Pop-Location
85-
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
86-
87104
- name: Setup vcpkg with Github Actions binary cache
88105
uses: lukka/run-vcpkg@v11
89106
with:

0 commit comments

Comments
 (0)