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

How to reduce the size of exe packaging #4620

Open
1 task done
tsiens opened this issue Dec 25, 2024 · 0 comments
Open
1 task done

How to reduce the size of exe packaging #4620

tsiens opened this issue Dec 25, 2024 · 0 comments

Comments

@tsiens
Copy link

tsiens commented Dec 25, 2024

Duplicate Check

Describe the bug

I used a conda virtual environment and pyinstaller to package my application, resulting in a size of 53.8MB. Using flet pack resulted in a package size of 77.8MB. When using flet build, the size went over 100MB... For version 2.5.2, installing only flet[desktop] and packaging with pyinstaller yielded a perfect 17MB. However, when running on other computers, it apparently requires downloading flet for Windows. The package created by flet pack automatically downloads and installs flet[cli], ending up being 77.8MB again.

I noticed there is a libmpv-2.dll file, sized 28.3MB, located in Lib\site-packages\flet_desktop\app\flet. It seems to provide MPV player functionality, which I don't use for audio/video features in my application. Can I remove this file?

excess,right click on the application on the Windows taskbar,flet's own name (flet.exe、flet descriptions) came up,I would like to display the application's own name and icon
pyinstall exe:
image
pack exe:
image

Code sample

import flet as ft


def main(page: ft.Page):
    page.window.icon = '../logo.ico'
    page.title = 'main'
    page.add(ft.Row([]))


if __name__ == '__main__':
    ft.app(target=main)

To reproduce

flet pack main.py -y -n pack -i logo.ico
pyinstaller main.py -F -w -y -i logo.ico -n pyinstall --distpath dist --workpath build

Operating System

Windows

Operating system details

windows 11

Flet version

2.5.2

Regression

I'm not sure / I don't know

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

No branches or pull requests

1 participant