Pyinstaller adding splash screen or visual feedback during file extraction

前端 未结 2 1784
傲寒
傲寒 2021-01-02 06:24

I create a single file python application with Pyinstaller using --onefile parameters. Everything work as expected but the startup time is around 10 seconds on my machine. T

相关标签:
2条回答
  • 2021-01-02 06:34

    I have been battling with this problem myself. Unfortunately, there is no feasible solution to the problem other than using the ugly console (completely agree there).

    The problem stems from the fact that until PyInstaller unpacks all the files into a temp dir, no scripts will be run. From my research, there is no way to alter this functionality using currently available options within PyInstaller. It would be nice if the community behind PyInstaller would make this a standard feature of the module, but until then we may have to explore other installer options.

    Happy programming!

    0 讨论(0)
  • 2021-01-02 06:37

    One simple solution might be to display the console window after launching the application, which will output the status of the PyInstaller Bootloader while it is being opened.

    To display the console, use the --console flag (or edit the .spec file to contain console = True) when bundling your application. These options are documented in the PyInstaller doc file.

    0 讨论(0)
提交回复
热议问题