From ec3ba5be8e5055c73ff76546c6b639df93da13e1 Mon Sep 17 00:00:00 2001 From: Vasyl Gello Date: Wed, 22 Jan 2025 01:26:03 +0000 Subject: [PATCH] Fix issues spotted during 1.3.7 fdroid build (#10570) * bridge.yml: Explicitly install cargo-expand of certain version @linsui spotted this trying to fix the build failure of 1.3.7 on f-droid: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/18766 * flutter-build.yml: drop workarounds for flutter 3.13 @fufesou has removed them from build_fdroid.sh in #10040 but forgot to remove them in main flutter_build.yml. flutter 3.13 is not used anymore, and those who want to build the old version using flutter 3.13 can happily check out the appropriate commit from Git history. * Bump vcpkg baseline to 2025.01.13 @linsui addressed the missing vcpkg-tools.json file inside vcpkg revision (microsoft side, not rustdesk's!) by updating the vcpkg baseline. --- .github/workflows/bridge.yml | 2 ++ .github/workflows/flutter-build.yml | 24 ++---------------------- flutter/build_fdroid.sh | 5 +++++ 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/bridge.yml b/.github/workflows/bridge.yml index 5e38de4a937..2d5affeef52 100644 --- a/.github/workflows/bridge.yml +++ b/.github/workflows/bridge.yml @@ -6,6 +6,7 @@ on: workflow_call: env: + CARGO_EXPAND_VERSION: "1.0.95" FLUTTER_VERSION: "3.22.3" FLUTTER_RUST_BRIDGE_VERSION: "1.80.1" RUST_VERSION: "1.75" # https://github.com/rustdesk/rustdesk/discussions/7503 @@ -75,6 +76,7 @@ jobs: - name: Install flutter rust bridge deps shell: bash run: | + cargo install cargo-expand --version ${{ env.CARGO_EXPAND_VERSION }} --locked cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid" --locked pushd flutter && sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' pubspec.yaml && flutter pub get && popd diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index bf9469c0e57..bb43c39d3ec 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -31,8 +31,8 @@ env: FLUTTER_ELINUX_VERSION: "3.16.9" TAG_NAME: "${{ inputs.upload-tag }}" VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" - # vcpkg version: 2024.11.16 - VCPKG_COMMIT_ID: "b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c" + # vcpkg version: 2025.01.13 + VCPKG_COMMIT_ID: "6f29f12e82a8293156836ad81cc9bf5af41fe836" VERSION: "1.3.7" NDK_VERSION: "r27c" #signing keys env variable checks @@ -1043,16 +1043,6 @@ jobs: prefix-key: rustdesk-lib-cache-android # TODO: drop '-android' part after caches are invalidated key: ${{ matrix.job.target }} - - name: fix android for flutter 3.13 - if: ${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }} - run: | - cd flutter - sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml - sed -i 's/extended_text: .*/extended_text: 11.1.0/' pubspec.yaml - flutter pub get - cd lib - find . | grep dart | xargs sed -i 's/textScaler: TextScaler.linear(\(.*\)),/textScaleFactor: \1,/g' - - name: Build rustdesk lib env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} @@ -1295,16 +1285,6 @@ jobs: name: librustdesk.so.i686-linux-android path: ./flutter/android/app/src/main/jniLibs/x86 - - name: fix android for flutter 3.13 - if: ${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }} - run: | - cd flutter - sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml - sed -i 's/extended_text: .*/extended_text: 11.1.0/' pubspec.yaml - flutter pub get - cd lib - find . | grep dart | xargs sed -i 's/textScaler: TextScaler.linear(\(.*\)),/textScaleFactor: \1,/g' - - name: Build rustdesk shell: bash env: diff --git a/flutter/build_fdroid.sh b/flutter/build_fdroid.sh index 40fe3c3c351..ecfb444efea 100755 --- a/flutter/build_fdroid.sh +++ b/flutter/build_fdroid.sh @@ -150,6 +150,10 @@ prebuild) # Flutter used to compile Flutter<->Rust bridge files + CARGO_EXPAND_VERSION="$(yq -r \ + .env.CARGO_EXPAND_VERSION \ + .github/workflows/bridge.yml)" + FLUTTER_BRIDGE_VERSION="$(yq -r \ .env.FLUTTER_VERSION \ .github/workflows/bridge.yml)" @@ -239,6 +243,7 @@ prebuild) cargo install \ cargo-expand \ + --version "${CARGO_EXPAND_VERSION}" \ --locked cargo install flutter_rust_bridge_codegen \ --version "${FLUTTER_RUST_BRIDGE_VERSION}" \