This commit is contained in:
rustdesk 2023-06-29 13:25:17 +08:00
parent d95595add4
commit 67e7b54c56
3 changed files with 5 additions and 4 deletions

View File

@ -314,7 +314,7 @@ jobs:
run: |
cargo install flutter_rust_bridge_codegen --version ${{ env.FLUTTER_RUST_BRIDGE_VERSION }} --features "uuid"
pushd flutter && flutter pub get && popd
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart --c-output ./flutter/macos/Runner/bridge_generated.h
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v7

2
Cargo.lock generated
View File

@ -2949,7 +2949,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hwcodec"
version = "0.1.0"
source = "git+https://github.com/21pages/hwcodec#57e539cdf2e385bc3129a2e9eb003816ebaf42b8"
source = "git+https://github.com/21pages/hwcodec#d55f7761ef692fae738259d8c14506d901eb824c"
dependencies = [
"bindgen 0.59.2",
"cc",

View File

@ -1,8 +1,9 @@
#!/usr/bin/env bash
dart pub global activate ffigen --version 5.0.1
cargo install flutter_rust_bridge_codegen --version 1.75.3 --features uuid
flutter pub get
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ../src/flutter_ffi.rs --dart-output ./lib/generated_bridge.dart --c-output ./macos/Runner/bridge_generated.h
# call `flutter clean` if cargo build fails
# export LLVM_HOME=/Library/Developer/CommandLineTools/usr/
RUN_FFIGEN=Y cargo build --features "flutter,flutter_texture_render"
cargo build --features "flutter,flutter_texture_render"
flutter run $@