ffigen not tested on iOS yet

This commit is contained in:
rustdesk 2022-05-20 15:30:54 +08:00
parent 03e3795800
commit d2a2890e03
3 changed files with 17 additions and 2 deletions

View File

@ -17,11 +17,18 @@ tar xzf dep.tar.gz
# https://stackoverflow.com/questions/68873570/how-do-i-fix-ld-error-unable-to-find-library-lgcc-when-cross-compiling-rust
wget https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip
unzip android-ndk-r22b-linux-x86_64.zip
# install ffigen and llvm
dart pub global activate ffigen
sudo apt-get install libclang-dev
git clone https://github.com/rustdesk/rustdesk
cd rustdesk
rustup target add aarch64-linux-android
cargo install cargo-ndk
OPENSSL_DIR=$HOME/openssl AARCH64_LINUX_ANDROID_OPENSSL_LIB_DIR=$HOME/openssl VCPKG_ROOT=$HOME/vcpkg ANDROID_NDK_HOME=$HOME/android-ndk-r22b flutter/ndk_arm64.sh
VCPKG_ROOT=$HOME/vcpkg ANDROID_NDK_HOME=$HOME/android-ndk-r22b flutter/ndk_arm64.sh
```
## 构建 Flutter

View File

@ -17,11 +17,18 @@ tar xzf dep.tar.gz
# https://stackoverflow.com/questions/68873570/how-do-i-fix-ld-error-unable-to-find-library-lgcc-when-cross-compiling-rust
wget https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip
unzip android-ndk-r22b-linux-x86_64.zip
# install ffigen and llvm
dart pub global activate ffigen
sudo apt-get install libclang-dev
git clone https://github.com/rustdesk/rustdesk
cd rustdesk
rustup target add aarch64-linux-android
cargo install cargo-ndk
OPENSSL_DIR=$HOME/openssl AARCH64_LINUX_ANDROID_OPENSSL_LIB_DIR=$HOME/openssl VCPKG_ROOT=$HOME/vcpkg ANDROID_NDK_HOME=$HOME/android-ndk-r22b flutter/ndk_arm64.sh
VCPKG_ROOT=$HOME/vcpkg ANDROID_NDK_HOME=$HOME/android-ndk-r22b flutter/ndk_arm64.sh
```
## 構建 Flutter

View File

@ -13,6 +13,7 @@ cd rustdesk
# For simulator: VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_x64.sh
VCPKG_ROOT=$HOME/vcpkg ./flutter/ios_arm64.sh
cd flutter
dart pub global activate ffigen
# Good Luck!
# For simulator: sed 's/aarch64/x86_64/g' ios/Runner.xcodeproj/project.pbxproj
# Forget if need: cd ios; pod install; cd -;