flet icon indicating copy to clipboard operation
flet copied to clipboard

Feature: show app icon, name instead of 'Flet' with packaged app

Open hololeo opened this issue 3 years ago • 2 comments

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.

hololeo avatar Jul 28 '22 02:07 hololeo

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

FeodorFitsner avatar Jul 28 '22 21:07 FeodorFitsner

It's, actually, more than just icon. It's application name, description, author, copyright and other metadata as well.

FeodorFitsner avatar Jul 28 '22 22:07 FeodorFitsner

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.

FeodorFitsner avatar Nov 22 '22 17:11 FeodorFitsner