diff --git a/README.md b/README.md index 4ccde98f..d759ef6b 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,10 @@ This app supports open repository in external tools listed in the table below. | Visual Studio Code | YES | YES | YES | VSCODE_PATH | | Visual Studio Code - Insiders | YES | YES | YES | VSCODE_INSIDERS_PATH | | JetBrains Fleet | YES | YES | YES | FLEET_PATH | +| JetBrains Rider | YES | YES | YES | RIDER_PATH | | Sublime Text | YES | YES | YES | SUBLIME_TEXT_PATH | -You can set the given environment variable for special tool if it can NOT be found by this app automatically. +> You can set the given environment variable for special tool if it can NOT be found by this app automatically. ## Screenshots diff --git a/src/Models/ExternalTool.cs b/src/Models/ExternalTool.cs index cb50df58..bca67fc1 100644 --- a/src/Models/ExternalTool.cs +++ b/src/Models/ExternalTool.cs @@ -59,6 +59,11 @@ namespace SourceGit.Models TryAdd("JetBrains Fleet", "fleet", "\"{0}\"", "FLEET_PATH", platform_finder); } + public void Rider(Func platform_finder) + { + TryAdd("JetBrains Rider", "rider", "\"{0}\"", "RIDER_PATH", platform_finder); + } + public void SublimeText(Func platform_finder) { TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT_PATH", platform_finder); diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 176941cc..1d3f750b 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -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; } diff --git a/src/Native/MacOS.cs b/src/Native/MacOS.cs index f4ddc2ea..6d6e8759 100644 --- a/src/Native/MacOS.cs +++ b/src/Native/MacOS.cs @@ -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; } diff --git a/src/Native/Windows.cs b/src/Native/Windows.cs index 2d22ac42..9325cea7 100644 --- a/src/Native/Windows.cs +++ b/src/Native/Windows.cs @@ -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( diff --git a/src/Resources/ExternalToolIcons/rider.png b/src/Resources/ExternalToolIcons/rider.png new file mode 100644 index 00000000..6ab3b8cb Binary files /dev/null and b/src/Resources/ExternalToolIcons/rider.png differ