mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
feature: supports JetBrains Rider (#77)
This commit is contained in:
@@ -58,6 +58,7 @@ namespace SourceGit.Native
|
||||
finder.VSCode(() => FindExecutable("code"));
|
||||
finder.VSCodeInsiders(() => FindExecutable("code-insiders"));
|
||||
finder.Fleet(FindJetBrainFleet);
|
||||
finder.Rider(() => string.Empty);
|
||||
finder.SublimeText(() => FindExecutable("subl"));
|
||||
return finder.Founded;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace SourceGit.Native
|
||||
finder.VSCode(() => "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code");
|
||||
finder.VSCodeInsiders(() => "/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code");
|
||||
finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Applications/Fleet.app/Contents/MacOS/Fleet");
|
||||
finder.Rider(() => string.Empty);
|
||||
finder.SublimeText(() => "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl");
|
||||
return finder.Founded;
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace SourceGit.Native
|
||||
finder.VSCode(FindVSCode);
|
||||
finder.VSCodeInsiders(FindVSCodeInsiders);
|
||||
finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\Programs\\Fleet\\Fleet.exe");
|
||||
finder.Rider(FindRider);
|
||||
finder.SublimeText(FindSublimeText);
|
||||
return finder.Founded;
|
||||
}
|
||||
@@ -322,6 +323,22 @@ namespace SourceGit.Native
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string FindRider()
|
||||
{
|
||||
var rider = Environment.GetEnvironmentVariable("JetBrains Rider");
|
||||
if (!string.IsNullOrEmpty(rider))
|
||||
{
|
||||
rider = rider.TrimEnd(';', ' ');
|
||||
var path = Path.Combine(rider, "rider64.exe");
|
||||
if (File.Exists(path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string FindSublimeText()
|
||||
{
|
||||
var localMachine = Microsoft.Win32.RegistryKey.OpenBaseKey(
|
||||
|
||||
Reference in New Issue
Block a user