-
Notifications
You must be signed in to change notification settings - Fork 22
running flutter-gallery on rpi 3 #33
Comments
Hi gmpbigsun. By default, the flutter-gallery recipe installs the app bundle using the "Sony" layout. Which itself renames app.so to libapp.so and splits the bundle into a data/ and lib/ directory. This makes it compatible with the Sony embedders but unfortunately confuses flutter-pi. To make this work for flutter-pi you can manually move libapp.so from the /lib directory over to the /data directory then rename it to app.so. A more permanent solution is to modify the flutter-gallery recipe (and any subsequent recipes you use for your own flutter apps). Specifically the compile and install steps, I've included the steps from my recipe below but I'll list the specific changes I made first.
With that done. At runtime I can run my app flutter-pi --release /usr/share/castboard-player/flutter_assets Recipe Changesdo_compile() {
export PATH=${STAGING_DIR_NATIVE}/usr/share/flutter/sdk/bin:$PATH
ENGINE_SDK=${S}/engine_sdk/sdk
cd ${S}
flutter build bundle
dart ${ENGINE_SDK}/frontend_server.dart.snapshot --aot --tfa --target=flutter --sdk-root ${ENGINE_SDK} --output-dill app.dill lib/main.dart
${ENGINE_SDK}/clang_x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=app.so --strip app.dill
}
do_install() {
#
# Sony Layout
#
#install -d ${D}${datadir}/${PN}/sony
#
#install -d ${D}${datadir}/${PN}/sony/lib
#install -m 644 ${S}/libapp.so ${D}${datadir}/${PN}/sony/lib
#
#install -d ${D}${datadir}/${PN}/sony/data
#install -m 644 ${STAGING_DATADIR}/flutter/icudtl.dat ${D}${datadir}/${PN}/sony/data/
#
#install -d ${D}${datadir}/${PN}/sony/data/flutter_assets
#cp -rTv ${S}/build/flutter_assets/. ${D}${datadir}/${PN}/sony/data/flutter_assets/
#
# Flutter-Pi Layout
#
install -d ${D}${datadir}/${PN}/
install -d ${D}${datadir}/${PN}/flutter_assets/
install -m 644 ${S}/app.so ${D}${datadir}/${PN}/flutter_assets/
install -m 644 ${STAGING_DATADIR}/flutter/icudtl.dat ${D}${datadir}/${PN}/
cp -r ${S}/build/flutter_assets/* ${D}${datadir}/${PN}/flutter_assets/
} |
Hey @Charlie9830 |
Hey I was wondering if you could tell me how to run the gallery app on the raspberry pi
I followed the readme and setup everything to make the DRM version work.
The flutter-pi command itself is working however I'm not sure how to run the gallery-app
running "flutter-pi /usr/share/flutter-gallery/sony/data/flutter_assets leaves me with an error telling me that there's
no icutl.dat file inside /usr/share/flutter/
and running "flutter-pi /usr/share/flutter-gallery/sony/data/" tells me that there's no kernel.blob file inside "/usr/share/flutter-gallery/sony/data/" for debug mode
trying to run in release mode is telling me that there's no app.so inside the data folder
The text was updated successfully, but these errors were encountered: