Skip to content

Commit a57078e

Browse files
committed
installer: Support Sublime Text 4 and (probably) newer
Sublime Text has recently been released as version 4. Along with this new version the install directory has been changed to no longer include the version number in the directory name. Change the installer to detect newer versions of Sublime Text and prefer them over version 3. This fixes git-for-windows/git#3248 Signed-off-by: Matthias Aßhauer <[email protected]>
1 parent abfa6c1 commit a57078e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

installer/install.iss

+7-3
Original file line numberDiff line numberDiff line change
@@ -1810,11 +1810,15 @@ begin
18101810
EditorAvailable[GE_VisualStudioCodeInsiders]:=RegQueryStringValue(HKEY_CURRENT_USER,'Software\Classes\Applications\Code - Insiders.exe\shell\open\command','',VisualStudioCodeInsidersPath);
18111811
VisualStudioCodeInsidersUserInstallation:=True;
18121812
end;
1813-
SublimeTextPath:=ExpandConstant('{pf}\Sublime Text 3\subl.exe');
1813+
SublimeTextPath:=ExpandConstant('{pf}\Sublime Text\subl.exe');
18141814
EditorAvailable[GE_SublimeText]:=PathIsValidExecutable(SublimeTextPath);
18151815
if (not EditorAvailable[GE_SublimeText]) then begin
1816-
EditorAvailable[GE_SublimeText]:=RegQueryStringValue(HKEY_CURRENT_USER,'Software\Classes\Applications\sublime_text.exe\shell\open\command','',SublimeTextPath);
1817-
SublimeTextUserInstallation:=True;
1816+
SublimeTextPath:=ExpandConstant('{pf}\Sublime Text 3\subl.exe');
1817+
EditorAvailable[GE_SublimeText]:=PathIsValidExecutable(SublimeTextPath);
1818+
if (not EditorAvailable[GE_SublimeText]) then begin
1819+
EditorAvailable[GE_SublimeText]:=RegQueryStringValue(HKEY_CURRENT_USER,'Software\Classes\Applications\sublime_text.exe\shell\open\command','',SublimeTextPath);
1820+
SublimeTextUserInstallation:=True;
1821+
end;
18181822
end;
18191823
EditorAvailable[GE_Atom]:=RegQueryStringValue(HKEY_CURRENT_USER,'Software\Classes\Applications\atom.exe\shell\open\command','',AtomPath);
18201824
EditorAvailable[GE_CustomEditor]:=True;

0 commit comments

Comments
 (0)