Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add application icon to new GUI #124

Closed
eeintech opened this issue Feb 23, 2023 · 2 comments · Fixed by #256
Closed

Add application icon to new GUI #124

eeintech opened this issue Feb 23, 2023 · 2 comments · Fixed by #256
Assignees
Labels
enhancement New feature or request

Comments

@eeintech
Copy link
Contributor

eeintech commented Feb 23, 2023

Unfortunately Flet does not support it at the moment during run-time:

Therefore building using Poetry and distributing Ki-nTree via PyPI will show the default application icon, examples:
image
image

The only way to add an icon is to require the user to build the app locally and package it with the flet pack command and --icon option: https://flet.dev/docs/guides/python/packaging-desktop-app#customizing-package-icon
It might be added to Poetry's pyproject.toml file with something like:

[tool.poetry.scripts]
kintree_build = flet pack --icon ...

This still feels very like a lot of work for just getting the proper icon!

@eeintech
Copy link
Contributor Author

eeintech commented Feb 23, 2023

I've tried it and unfortunately PyInstaller does not support icons on Linux:

WARNING: Ignoring icon; supported only on Windows and macOS!

What a disappointment 😞

Reproduce

  1. Add PyInstaller to Poetry (version ^5.8.0) dependencies list
  2. Add script entry: kintree_build = 'kintree.build_app:build'
  3. Create new file named build_app.py in kintree folder with the following content:
import os

def build():
    os.system('flet pack kintree_gui.py --icon logo.png')

if __name__ == '__main__':
    build()

@eeintech eeintech mentioned this issue Feb 23, 2023
5 tasks
@eeintech eeintech removed this from the 1.0.0 milestone Mar 29, 2023
@eeintech
Copy link
Contributor Author

Won't make it into 1.0.0 as there is no support for this feature in Flet yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant