Skip to content
This repository has been archived by the owner. It is now read-only.

Git Bash shortcut causes side-effects for other program's icons #71

Closed
pointoforder opened this issue Nov 12, 2012 · 4 comments

Comments

@pointoforder
Copy link
Contributor

pointoforder commented Nov 12, 2012

On Windows 8 x64, the shortcut target that Setup creates to Git Bash is as follows:

C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"

This shortcut is also set to have its icon point to git.ico.

Having a shortcut whose executable is cmd.exe and whose icon is git.ico as side-effects of making this icon appear in some other circumstances when cmd.exe runs. For example, doing Start without Debugging (Ctrl+F5) in Visual Studio 2012 internally uses cmd.exe to run MyProgram.exe & pause; such windows show up with git.ico.

If instead the Git Bash shortcut uses this target, other cmd.exe windows are not affected:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -I

(Creating issue from mailing list discussion at https://groups.google.com/forum/#!topic/msysgit/raMI2zbKkq0)

@pointoforder

This comment has been minimized.

Copy link
Contributor Author

pointoforder commented Nov 12, 2012

I've confirmed that changing the line in share/WinGit/install.iss under [Icons] from:

Name: {group}\Git Bash; Filename: {syswow64}\cmd.exe; Parameters: "/c """"{app}\bin\sh.exe"" --login -i"""; WorkingDir: %HOMEDRIVE%%HOMEPATH%; IconFilename: {app}\etc\git.ico

to

Name: {group}\Git Bash; Filename: {app}\bin\sh.exe; Parameters: "--login -i"; WorkingDir: %HOMEDRIVE%%HOMEPATH%; IconFilename: {app}\etc\git.ico;MinVersion: 6.0
Name: {group}\Git Bash; Filename: {syswow64}\cmd.exe; Parameters: "/c """"{app}\bin\sh.exe"" --login -i"""; WorkingDir: %HOMEDRIVE%%HOMEPATH%; IconFilename: {app}\etc\git.ico; OnlyBelowVersion: 6.0

works on Windows 8.

Now I'll see if I can figure out how to submit a pull request...

@sschuberth

This comment has been minimized.

Copy link
Member

sschuberth commented Nov 22, 2012

I wasn't able to reproduce your issue exactly. On my Win 7 x64 machine I do not see that a VS "start without debugging" window has the same icon as a Git Bash window. However, they get grouped into the same taskbar group, probably because they were started by the same process. But if I expand the taskbar group, I see that the two windows have different icons. Is it that what you see, too?

@pointoforder

This comment has been minimized.

Copy link
Contributor Author

pointoforder commented Nov 22, 2012

I think that’s slightly different from the Win 8 behavior I recall seeing. I’ll have to double-check once I get back to a machine With VS installed, but I believe what I saw on Windows 8 was a cmd window showing up with the Git Bash icon. (I wasn’t running Git Bash at all at the time.)

It sounds like it’s a slightly different (though related) side-effect on Windows 7. If you change the shortcut to Git Bash in the start menu to remove the cmd.exe wrapper, does that prevent the windows from getting put together in the same taskbar group?

@sschuberth

This comment has been minimized.

Copy link
Member

sschuberth commented Nov 23, 2012

Yes, if I change the shortcut to not use cmd.exe, the taskbar icons are not grouped together. So even if it was just this effect your patch is of some value :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.