flet
flet copied to clipboard
nuitka - another packager to consider
https://nuitka.net/
This may be another packager for flet. I will test it against multiple projects and report problems and success
Juist tested on Windows 10 with Poetry for venv and package manager. Still cant't work, maybe some file is not property be packaged.
Tested on MacOS, Linux and Windows, it works now, and I think it is much faster on MacOS than flet pack cause it is on onedir mode. On Linux, nuitka can correctly collect the needed libraries and do not have the problem like missing openssl or swrast on pyinstaller.
python3 -m nuitka --standalone --macos-create-app-bundle --macos-app-icon=scripts/icon.png --assume-yes-for-downloads --macos-app-mode="ui-element" main.py
python3 -m nuitka --standalone --linux-icon=scripts/icon.png --assume-yes-for-downloads --onefile main.py
python -m nuitka --standalone --windows-icon-from-ico=scripts/icon.png --assume-yes-for-downloads --onefile "main.py"
While nuitka does not pack the fletd.exe or fletd, it need to be downloaded, so I am trying tweaking the nuitka's parameters to make it work correctly. minimum ref code
C:\Users\Administrator\Desktop\helloft\main.dist>main
INFO:flet:Starting up TCP server on ('localhost', 64201)
DEBUG:flet:Waiting for a client connection
INFO:flet:App URL: tcp://localhost:64201
INFO:flet:Connected to Flet app and handling user sessions...
INFO:flet:Starting Flet View app...
INFO:flet:Downloading Flet v0.5.2 to C:\Users\ADMINI~1\AppData\Local\Temp\2\flet-windows.zip
Great, @ningzichun. Please could you come up with a little guide on this when you are done?
Great, @ningzichun. Please could you come up with a little guide on this when you are done?
Yeah, I am surprised that Nuitka works now. I posted on #1314
flet.exe/flet.app isn't correctly detected and packed by Nuitka, so for someone who don't have Internet connection or fail to download flet cannot use the packed app.
Simply add --include-package-data=flet solved , but it also includes whole data directory.