Skip to content

Commit 02bcf87

Browse files
committed
init
0 parents  commit 02bcf87

15 files changed

+987
-0
lines changed

.gitignore

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
**/ios/Flutter/.last_build_id
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Web related
35+
lib/generated_plugin_registrant.dart
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json

.metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818
8+
channel: stable
9+
10+
project_type: app

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Flutter Pi, out of memory test.
2+
3+
Host:
4+
1. clone fapp1
5+
2. copy gen_snapshot_linux_x64 to project root
6+
# Build release version
7+
3. ./build_linux.sh && ./build_aot.sh
8+
9+
10+
RaPi:
11+
0. create fapp1 folder and fapp1/images
12+
1. copy flutter-pi, icudtl.dat, libflutter_engine.so.debug, libflutter_engine.so.release to fapp1/
13+
4. copy fapp1/build/flutter_assets to RaPi fapp1/flutter_assets
14+
5. extract images.7z all files to fapp1/images
15+
6. delete images.7z
16+
7. exec ./run.sh or flutter in release mode
17+
8. wait 10min, OOM :)

build_aot.sh

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/sh
2+
FLUTTER_PATH=~/bin/flutter
3+
OUTPUT_KERNEL_DILL=./build/kernel_snapshot.dill
4+
OUTPUT_KERNEL_D=./build/kernel_snapshot.d
5+
OUTPUT_SO=./build/flutter_assets/app.so
6+
APPLICATION_ENTRY_POINT=package:fapp1/main.dart
7+
ENGINE_BINARIES=.
8+
echo "----------- README -----------"
9+
echo "Instruction: https://github.com/ardera/flutter-pi/tree/engine-binaries"
10+
echo "git clone --depth 1 --branch engine-binaries https://github.com/ardera/flutter-pi.git flutter_engine_binaries"
11+
12+
echo "------------------------"
13+
14+
CMD="$FLUTTER_PATH/bin/cache/dart-sdk/bin/dart \
15+
$FLUTTER_PATH/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot \
16+
--sdk-root $FLUTTER_PATH/bin/cache/artifacts/engine/common/flutter_patched_sdk_product \
17+
--target=flutter \
18+
--aot \
19+
--tfa \
20+
-Ddart.vm.product=true \
21+
--packages .packages \
22+
--output-dill $OUTPUT_KERNEL_DILL \
23+
--verbose \
24+
--depfile $OUTPUT_KERNEL_D \
25+
$APPLICATION_ENTRY_POINT"
26+
27+
echo "------------------------"
28+
echo "$CMD"
29+
eval $CMD
30+
31+
CMD="$ENGINE_BINARIES/gen_snapshot_linux_x64 \
32+
--causal_async_stacks \
33+
--deterministic \
34+
--snapshot_kind=app-aot-elf \
35+
--elf=$OUTPUT_SO \
36+
--strip \
37+
--sim_use_hardfp \
38+
--no-use-integer-division \
39+
$OUTPUT_KERNEL_DILL"
40+
41+
echo "$CMD"
42+
eval $CMD
43+
44+
echo "Output: $OUTPUT_SO"

build_linux.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
#flutter config --enable-windows-desktop
3+
#flutter create .
4+
#TODO https://github.com/flutter/flutter/issues/48707
5+
#flutter build bundle --dart-define=linux_embedded=true
6+
7+
#dart ../autover/bin/main.dart -c autover.yaml -v build --apply true
8+
9+
flutter build bundle
10+

images.7z

23.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)