aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md148
-rw-r--r--docs/images/debianrunxweb.jpgbin0 -> 39437 bytes
-rw-r--r--docs/images/debianxrun.jpgbin0 -> 65004 bytes
-rw-r--r--docs/images/raspirun.jpgbin0 -> 60306 bytes
-rw-r--r--docs/images/runweb.jpgbin0 -> 72690 bytes
-rw-r--r--docs/images/whatthefuck.jpgbin0 -> 28860 bytes
6 files changed, 144 insertions, 4 deletions
diff --git a/README.md b/README.md
index f84a370..c1a0a39 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# tryfle A look at flet for building cross platform apps
+My team lead got all exited about this thing called flet for whipping out python data at a glance (using it as a web app) I had never heard of it but I have spent years developing multiplatform gui applications using wxpython so I thought I would give it a try.
+
+Most of the stuff that follows is based on the default app that you get when you install flet and 'flet create' an app. it is a box with a number and a button that increments it.
+
## Flet on macos (tahoe)
Installing and trying flet on macos was relatively painless.
@@ -105,15 +109,151 @@ But it looks and feels more like a mac app.
### cross compiling on the mac (FAIL)
-YOU ARE HERE.
+I have a few raspberry pi's which have displays and which I plan to embed in various things throwing up a nice display quickly is very appealing. So my first thought was to cross compile from the mac to linux. (I knew this was a long shot)
+
+```sh
+feurig@pj tryfle % flet build linux --arch=aarch64
+[21:55:36] Build Platform Matrix
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
+ ┃ Command ┃ Platform ┃
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
+ │ flet build windows │ Windows │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build macos │ macOS │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build linux │ Linux │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build web │ macOS, Windows, Linux │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build apk │ macOS, Windows, Linux │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build aab │ macOS, Windows, Linux │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build ipa │ macOS │
+ ├──────────────────────────┼───────────────────────┤
+ │ flet build ios-simulator │ macOS │
+ └──────────────────────────┴───────────────────────┘
+╭───────────────────────────────────────────────────────────────────────────────────────╮
+│ You can't build │
+╰───────────────────────────────────────────────────────────────────────────────────────╯
+```
### cross compiling on debian (FAIL)
-AND HERE
+Ok so I really don't want to build on an underpowered little device when I have a relatively beefy linux box in the basement.
+
+```sh
+feurig@nick:~/Projects/tryfle$ PATH=$PATH:/tank/home/feurig/flutter/3.41.4/bin flet build linux --arch=aarch64
+[21:46:37] Created app shell ✅
+[21:46:38] Packaged Python app ✅
+[21:46:44] Customized app icons ✅
+[21:46:47] Generated app icons ✅
+[21:46:55] Resolving dependencies...
+...blah blah blah
+ Building Linux application...
+
+ ERROR: Target dart_build failed: Error: Failed to find any of in
+ LocalDirectory: '/usr/lib/llvm-19/bin'
+ Build process failed
+... more blah blah ... ╭───────────────────────────────────────────────────────────────────────────────────────╮
+│ Error building Flet app - see the log of failed command above. │
+╰───────────────────────────────────────────────────────────────────────────────────────╯
+feurig@nick:~/Projects/tryfle$ ls -lsa /usr/lib/llvm-19/
+total 48
+ 4 drwxr-xr-x 8 root root 4096 Apr 27 14:58 .
+ 4 drwxr-xr-x 73 root root 4096 Apr 30 16:40 ..
+ 4 drwxr-xr-x 2 root root 4096 Apr 27 14:57 bin
+ 4 drwxr-xr-x 4 root root 4096 Apr 27 14:58 build
+ 0 lrwxrwxrwx 1 root root 14 Jun 14 2025 cmake -> lib/cmake/llvm
+ 4 drwxr-xr-x 2 root root 4096 Apr 27 14:58 include
+20 drwxr-xr-x 6 root root 20480 Apr 27 14:58 lib
+ 4 drwxr-xr-x 2 root root 4096 Apr 27 14:49 libexec
+ 4 drwxr-xr-x 8 root root 4096 Apr 27 14:58 share
+```
+
+flutter bitches about something that is clearly there.
+
+### compiling on debian (FAIL)
+
+Lets see if it even compiles natively
+
+```sh
+feurig@nick:~/Projects/tryfle$ PATH=$PATH:/tank/home/feurig/flutter/3.41.4/bin flet build linux
+[20:51:26] Packaged Python app ✅
+[20:51:33] Building Linux application...
+
+ ERROR: Target dart_build failed: Error: Failed to find any of in
+ LocalDirectory: '/usr/lib/llvm-19/bin'
+ Build process failed
+... blah blah blah ...
+╭───────────────────────────────────────────────────────────────────────────────────────╮
+│ Error building Flet app - see the log of failed command above. │
+╰───────────────────────────────────────────────────────────────────────────────────────╯
+```
+
+NOPE.
+
+### Running on debian
+
+Ok so it wont compile will it run?
-### cross compiling on rasberian (partial FAIL)
+#### running on x (FAIL)
-AND HERE
+The debian machine is a server so we ssh in and X-forward.
+
+![really dark mode](docs/images/debianxrun.jpg)
+
+#### running on x using 'flet run --web' and google chrome
+
+This more or less works so you can still run it on debian
+
+![chrome](docs/images/debianrunxweb.jpg)
+
+#### JUST DONT PUSH THE INSTALL BUTTON!
+
+Pushing the install button puts the app in a really nice window where none of the window controls work except for full screan which blacks out most of the screen and wont go back. Maybe it works on a desktop but YUK!!!
+
+![wtf](docs/images/whatthefuck.jpg)
+
+### Running on raspberry pi
+
+Since running on the raspberri pi is good enough for our use case we will start there.
+
+![long narrow](docs/images/raspirun.jpg)
+
+That works!
+
+### compiling on rasberry pi (FAIL)
+
+In a rasberry pi 5 flet install an intel binary. That is gobsmacking stupid.
+
+```sh
+feurig@five:~/Projects/tryfle $ flet build linux --arch=aarch64
+[21:27:00] 1 Failed to validate Flutter version.
+ Flutter SDK not found or invalid version installed.
+( ●) Initializing linux build...
+Flutter SDK 3.41.4 is required. It will be installed now. Proceed? [y/n] (y): y
+[21:27:03]
+ /home/feurig/flutter/3.41.4/bin/internal/shared.sh: line 273:
+ /home/feurig/flutter/3.41.4/bin/cache/dart-sdk/bin/dart: cannot execute binary
+ file: Exec format error
+ /home/feurig/flutter/3.41.4/bin/internal/shared.sh: line 273:
+ /home/feurig/flutter/3.41.4/bin/cache/dart-sdk/bin/dart: Success
+
+ /home/feurig/flutter/3.41.4/bin/internal/shared.sh: line 273:
+ /home/feurig/flutter/3.41.4/bin/cache/dart-sdk/bin/dart: cannot execute binary
+ file: Exec format error
+ /home/feurig/flutter/3.41.4/bin/internal/shared.sh: line 273:
+ /home/feurig/flutter/3.41.4/bin/cache/dart-sdk/bin/dart: Success
+
+╭───────────────────────────────────────────────────────────────────────────────────────╮
+│ Error building Flet app - see the log of failed command above. │
+╰───────────────────────────────────────────────────────────────────────────────────────╯
+feurig@five:~/Projects/tryfle $ file /home/feurig/flutter/3.41.4/bin/cache/dart-sdk/bin/dart
+/home/feurig/flutter/3.41.4/bin/cache/dart-sdk/bin/dart: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a6c2875adfaa96a24e720daaf5261c03f2e7d05f, stripped
+feurig@five:~/Projects/tryfle $
+```
+So. Mixed bag so far.
## References
diff --git a/docs/images/debianrunxweb.jpg b/docs/images/debianrunxweb.jpg
new file mode 100644
index 0000000..6e38b4e
--- /dev/null
+++ b/docs/images/debianrunxweb.jpg
Binary files differ
diff --git a/docs/images/debianxrun.jpg b/docs/images/debianxrun.jpg
new file mode 100644
index 0000000..4866c00
--- /dev/null
+++ b/docs/images/debianxrun.jpg
Binary files differ
diff --git a/docs/images/raspirun.jpg b/docs/images/raspirun.jpg
new file mode 100644
index 0000000..ef3e4ab
--- /dev/null
+++ b/docs/images/raspirun.jpg
Binary files differ
diff --git a/docs/images/runweb.jpg b/docs/images/runweb.jpg
new file mode 100644
index 0000000..e8f1286
--- /dev/null
+++ b/docs/images/runweb.jpg
Binary files differ
diff --git a/docs/images/whatthefuck.jpg b/docs/images/whatthefuck.jpg
new file mode 100644
index 0000000..4a473e3
--- /dev/null
+++ b/docs/images/whatthefuck.jpg
Binary files differ