-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Windows installer assigns non-existent icons to Python file types #69299
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
Comments
Whenever the Python launcher is selected, the installer sets the icon for common Python file extensions, i.e. .py, .pyc, .pyo, .pyw, .pyz and .pyzw. Formerly (under Python 3.4) the icons were located in DLLs in the Python installation directory. The new installer assigns either py.exe,1 or py.exe,2 as the icon. Because py.exe contains just a single icon, the only valid icon index is 0. As a result of the invalid icon, all Python files show up with either blank or generic icons. Probably those icons have not been included as they should have. Tested on Windows 7 SP1, both X86 and AMD64, both fresh a fresh install and one with quite a bit of history. It occurs with all appropriate Python 3.5 installers (pick any of X86/AMD64 and web/non-web). Make sure the Python launcher is selected; the default settings will do. |
That is indeed what happened. The resource file for the launcher was not updated (or the update got lost... I was fairly sure I did it) Attached patch fixes it. |
Thanks for the update. I'm not sure why the proper assignment of icons now depends on the installation of the Python launcher (py.exe). The icons are installed in the DLLs directory just like before. Perhaps I'm not familiar enough with the purpose of the launcher, but it seems to me that python.exe and pythonw.exe are enough to do something with Python files. Therefore, in my opinion, Python files should always be associated with Python and get the proper icons, regardless of the presence of the Python launcher. You may consider this a secondary issue, in which case I'd gladly open another ticket. |
On the other hand, if the launcher is somehow strictly necessary, then why is it optional? |
+1 I just wasted at least an hour on this. :( should have checked bugs first. Google says nothing, so I thought I was going crazy. I saw that py.exe had only one icon and that Python.File had c:\windows\py.exe, 1 while Python.CompiledFile had C:\windows\py.exe, 2, so I thought that might be it, but I just wasn't sure. Are the Py2 and Py3 icons exactly the same? if so, then IMO just use the py.ico and pyc.ico icons in the DLLs folder as suggested |
The file associations are actually part of the launcher, which *technically* is independent of the Python install it is bundled with. So it doesn't have any references to the Python install directory, and double-clicking Python files with shebang lines will work properly. For 3.5.1 I'm considering making the launcher an independent uninstall item (in response to another issue), so if you install 3.5.1 and then remove it, you can keep the launcher. For this to work, it has to be independent of the main install, so it can't refer to the DLLs directory. |
New changeset 4d0d987bf6a8 by Steve Dower in branch '3.5': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: