Browse files

Installer: Detect TortoisePLink from TortoiseGit

As TortoiseGit also comes with the improved version of Plink, offer the user to use that version, too.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
  • Loading branch information...
1 parent 8b7eb7e commit 0d984a6296af6d82eaba3908a4cbdeb9ff967271 @csware csware committed Jun 24, 2012
Showing with 12 additions and 6 deletions.
  1. +1 −1 share/WinGit/install.iss
  2. +11 −5 share/WinGit/putty.inc.iss
View
2 share/WinGit/install.iss
@@ -505,7 +505,7 @@ begin
Parent:=PuTTYPage.Surface;
Caption:=
'PuTTY sessions were found in your Registry. You may specify the path' + #13 +
- 'to an existing copy of (Tortoise)Plink.exe from the TortoiseSVN/CVS' + #13 +
+ 'to an existing copy of (Tortoise)Plink.exe from the TortoiseGit/SVN/CVS' + #13 +
'or PuTTY applications. The GIT_SSH and SVN_SSH environment' + #13 +
'variables will be adjusted to point to the following executable:';
Left:=ScaleX(28);
View
16 share/WinGit/putty.inc.iss
@@ -1,20 +1,26 @@
const
+ TortoiseGitInstallKey='SOFTWARE\TortoiseGit';
TortoiseSVNInstallKey='SOFTWARE\TortoiseSVN';
TortoiseCVSUninstallKey='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\TortoiseCVS_is1';
PuTTYUninstallKey='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1';
PuTTYPrivateKeyAssoc='PuTTYPrivateKey\shell\open\command';
// Tries to detect the path to a PuTTY installation / an application that comes
-// with an improved version of Plink. TortoisePlink from TortoiseSVN features a
+// with an improved version of Plink. TortoisePlink from TortoiseGit/SVN features a
// GUI dialog to accept new host keys, for example.
function GetPuTTYLocation:string;
begin
// Prefer TortoisePlink over vanilla Plink for its GUI dialog to accept host keys.
- if (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseSVNInstallKey,'Directory',Result)) or
- RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseSVNInstallKey,'Directory',Result) then begin
- // C:\Program Files\TortoiseSVN\
+ if (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseGitInstallKey,'Directory',Result)) or
+ RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseGitInstallKey,'Directory',Result) then begin
+ // C:\Program Files\TortoiseGit\
Result:=Result+'bin\';
- // C:\Program Files\TortoiseSVN\bin\
+ // C:\Program Files\TortoiseGit\bin\
+ end else if (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseSVNInstallKey,'Directory',Result)) or
+ RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseSVNInstallKey,'Directory',Result) then begin
+ // C:\Program Files\TortoiseSVN\
+ Result:=Result+'bin\';
+ // C:\Program Files\TortoiseSVN\bin\
end else begin
if not (IsWin64 and RegQueryStringValue(HKEY_LOCAL_MACHINE_64,TortoiseCVSUninstallKey,'InstallLocation',Result)) then begin
RegQueryStringValue(HKEY_LOCAL_MACHINE_32,TortoiseCVSUninstallKey,'InstallLocation',Result);

0 comments on commit 0d984a6

Please sign in to comment.