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

Splash Screen Issue when use onefile #8103

Closed
corle3421 opened this issue Nov 14, 2023 · 3 comments · Fixed by #8106
Closed

Splash Screen Issue when use onefile #8103

corle3421 opened this issue Nov 14, 2023 · 3 comments · Fixed by #8106
Labels

Comments

@corle3421
Copy link

corle3421 commented Nov 14, 2023

Hello,

first for me the Issue looked similar to #7978

I wrote a super simple script, so I can find the package who triggers the error message:
"SPLASH: Cannot fine requirement VCRUNTIME140.dll in the archive".
The message is shown instant after the start. The program of the script itself will be started, only the splash screen is not shown.

I tested this on pyInstaller 6.2.0 and 6.1.0
Python is 3.10.6
All packages install with conda from conda-forge
Platform is Windows 10

My small test script:


import time
import numpy

if __name__ == "__main__"
    try:  
        import pyi_splash
    except:  
        pass

    while True:
        time.sleep(1)

When I build the script with the command:
pyinstaller testSplash.py -w --clean -i test.ico --exclude-module numpy --onefile --splash test.png
the splash screen shows and the program crashs because it can't import numpy. I use numpy version 1.26.0 form conda-forge.

As I write the bugreport I checked on your information "How to report bugs". So I tested also the --onedir option.
pyinstaller testSplash.py -w --clean -i test.ico --onedir --splash test.png
In this case, the splash screen works without any issues. The "vcruntime140.dll" file is in the directory "_internal" present, even with the numpy package is present and not excluded. Not sure why the packing to onefile creates sometimes a missing library.
Right now I'm fine using the onedir option, but would be nice if onefile works too.

@corle3421 corle3421 added the triage Please triage and relabel this issue label Nov 14, 2023
@rokm
Copy link
Member

rokm commented Nov 14, 2023

"SPLASH: Cannot fine requirement VCRUNTIME140.dll in the archive".

In contrast to earlier issues with onefile splash and missing vcruntime140.dll, this time around we seem to be aware that we should extract it in advance, but fail to find it in the archive under the specified name. Which likely means the character-case mismatch in the name.

Can you open the generated onefile executable using the pyi-archive_viewer (e.g., pyi-archive_viewer dist\program.exe) and find the entry for that DLL? I suspect it should be in there, but the name will have different casing...

@rokm rokm added bug and removed triage Please triage and relabel this issue labels Nov 14, 2023
@corle3421
Copy link
Author

Yes, the library is there in small casing, as it is named in the Windows System32 folder.

 266704919, 56219, 109440, 1, 'b', 'vcruntime140.dll'
 266761138, 24409, 49560, 1, 'b', 'vcruntime140_1.dll'

I attached the complete output of the top level in the "content_testSplash.txt"
content_testSplash.txt

@rokm
Copy link
Member

rokm commented Nov 14, 2023

Thanks for confirming.

We need to make pyi_arch_find_by_name case insensitive for file-based resources on Windows.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants