You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.0 KiB
48 lines
1.0 KiB
#!/bin/bash |
|
|
|
set -e # Exit on error |
|
set -x # Print commands being executed |
|
|
|
cd "$(dirname "$0")" |
|
|
|
# Enable builds |
|
# flutter config --enable-linux-desktop |
|
# flutter config --enable-web |
|
flutter config --enable-android |
|
|
|
if [ ! -f lib/main.dart ]; then |
|
flutter create -t app . |
|
flutter_rust_bridge_codegen integrate |
|
fi |
|
|
|
# Create project structure (this will add platform-specific files) |
|
# flutter create . |
|
|
|
# Get dependencies |
|
# flutter pub get |
|
|
|
# Build Rust project first |
|
# cd rust |
|
# cargo build --release |
|
# cd .. |
|
|
|
# Generate Flutter Rust Bridge bindings using config file |
|
flutter_rust_bridge_codegen generate |
|
|
|
# Build Linux version |
|
# flutter build linux --release |
|
|
|
# cp target/release/libnative.so build/linux/x64/release/bundle/lib/ |
|
|
|
# For web, we need to build the Rust code for wasm target |
|
# cd rust |
|
# rustup target add wasm32-unknown-unknown |
|
# cargo build --release --target wasm32-unknown-unknown |
|
# cd .. |
|
|
|
# Build Web version |
|
# flutter build web --release |
|
# flutter_rust_bridge_codegen build-web |
|
|
|
flutter build apk --verbose |
|
|
|
|