Skip to content

Commit

Permalink
about build with flutter-snap
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Aug 8, 2024
1 parent 1964774 commit dbc7ecf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,28 @@ jobs:
working-directory: example
strategy:
fail-fast: false
matrix:
target: [linux] #, apk]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- run: |
- uses: actions/setup-java@v4
if: ${{ matrix.target == 'apk' }}
with:
distribution: 'zulu'
java-version: '17'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y cmake clang ninja-build libgtk-3-dev libpulse-dev
sudo snap install flutter --classic
- run: flutter doctor --verbose
- run: flutter pub get
- run: flutter build linux --verbose
- run: flutter build ${{ matrix.target }} --verbose

Android:
runs-on: ${{ matrix.host }}-latest

defaults:
run:
working-directory: example
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ libass is required, and it's added to your app automatically for windows, macOS

If required subtitle font is not found in the system(e.g. android), you can add [assets/subfont.ttf](https://github.com/mpv-android/mpv-android/raw/master/app/src/main/assets/subfont.ttf) in pubspec.yaml as the fallback.

# DO NOT use flutter-snap
Flutter can be installed by snap, but it will add some [enviroment vars(`CPLUS_INCLUDE_PATH` and `LIBRARY_PATH`) which may break C++ compiler](https://github.com/canonical/flutter-snap/blob/main/env.sh#L15-L18). It's not recommended to use snap, althrough building for linux is [fixed](https://github.com/wang-bin/fvp/commit/567c68270ba16b95b1198ae58850707ae4ad7b22), but it's not possible for android.

# Screenshots
![fpv_android](https://user-images.githubusercontent.com/785206/248862591-40f458e5-d7ca-4513-b709-b056deaaf421.jpeg)
![fvp_ios](https://user-images.githubusercontent.com/785206/250348936-e5e1fb14-9c81-4652-8f53-37e8d64195a3.jpg)
Expand Down

0 comments on commit dbc7ecf

Please sign in to comment.