flet
flet copied to clipboard
Feature: show app icon, name instead of 'Flet' with packaged app
Apps packaged for desktop by pyinstaller show 'Flet' name and icon in doc. Instead it should only show developer's app icon and app title.
Some implementation ideas:
For Windows it could be possible to just call PyInstaller internals to update an icon of any executable: https://github.com/pyinstaller/pyinstaller/blob/d31927bcbae9a9d17b3ad2a7b705bd884fb89be3/PyInstaller/utils/win32/icon.py#L161
dstpath is the path to .exe and srcpath - path to an icon file
C++ implementation: https://stackoverflow.com/questions/67691200/programmatically-change-exes-icon-in-c
It's, actually, more than just icon. It's application name, description, author, copyright and other metadata as well.
I've spent some time investigating the possibility to update Flet executable icon and version information without re-building it. I focused on Windows OS for now. Good news it's possible to do and PyInstaller project contains all required utils to patch exe's version (product name, description, copyright, etc.) , icon, manifest and other resources (all these are embedded resources).
I'm going to extend Flet CLI with flet build command and wrap PyInstaller API and do some Flet exe patching stuff during packaging.
Right now Flet CLI is just for running the app with hot reload. I'm planning to move that into a separate flet run command. I'm not sure yet if it's going to be a breaking change into CLI or we can make flet run a default command.
flet build will have command line options to provide path to icon, version, product name, description, company name, copyright, etc.