UE 编辑器内 Source Code IDE 没有 Rider

原因:注册表内没有找到

相关代码:

复制代码
static TArray<FInstallInfo> CollectPathsFromRegistry( const Windows::HKEY RootKey, const FString& RegistryKey)
{
	TArray<FInstallInfo> InstallInfos;
	HKEY Key;
	const LONG Result = RegOpenKeyEx(RootKey, *RegistryKey, 0, KEY_READ, &Key);
	if (Result == ERROR_SUCCESS)
	{
		TArray<FString> Keys;
		if (EnumerateRegistryKeys(Key, Keys))
		{
			for (const FString& key : Keys)
			{
				if (!key.Contains(TEXT("Rider"))) continue;

				HKEY SubKey;
				const LONG SubResult = RegOpenKeyEx(Key, *key, 0, KEY_READ, &SubKey);
				if (SubResult != ERROR_SUCCESS) continue;

				TArray<FString> Values;
				if (!EnumerateRegistryValues(SubKey, Values)) continue;

				for (const auto& Value : Values)
				{
					if (Value != TEXT("InstallLocation")) continue;
					FString InstallLocation;
					if (GetStringRegKey(SubKey, Value, InstallLocation) != ERROR_SUCCESS) continue;
					const FString ExePath = FPaths::Combine(InstallLocation, TEXT("bin"), TEXT("rider64.exe"));
					TOptional<FInstallInfo> InstallInfo = FRiderPathLocator::GetInstallInfoFromRiderPath(ExePath, false);
					if(InstallInfo.IsSet())
						InstallInfos.Add(InstallInfo.GetValue());
				}

			}
		}
	}

	return InstallInfos;
}

添加注册表:(PowerShell 管理员模式),重启编辑器就好了

复制代码
New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JetBrains Rider 2024.1.3' -Force
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JetBrains Rider 2024.1.3' -Name 'InstallLocation' -Value 'D:\Application\Dev\JetBrains Rider 2024.1.3'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JetBrains Rider 2024.1.3' -Name 'DisplayName' -Value 'JetBrains Rider 2024.1.3'
相关推荐
FeelTouch Labs5 小时前
Node.js 中的 spawn 和 exec:子进程执行的不同方式对比
node.js·编辑器·vue·vim
余衫马8 小时前
2026最新版!Android Studio 极速安装与配置指南
android·ide·android studio
你的菊花 倾心恋仙9 小时前
最锋利的Visual Studio Web开发工具扩展:Web Essentials详解
前端·ide·visual studio
MoSTChillax9 小时前
数字人竞品分析(中):核心功能、产品使用与技术能力对比
ide·macos·xcode
林三的日常12 小时前
AI编程IDE卡成PPT?低配电脑的末日来了
ide·电脑·ai编程
2501_9151063213 小时前
SwiftUI项目创建详解:使用Xcode从零开始创建第一个App项目
ide·vscode·ios·swiftui·个人开发·xcode·敏捷流程
PC2005-cloud14 小时前
FinalShell 自定义背景图片教程
ide·python·pycharm
2501_9160074715 小时前
IDE 是什么?集成开发环境详解与 iOS 开发选型指南
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
啦啦啦!2 天前
虚拟机如何接入Codex并配置中转站(vscode插件版)
linux·vscode·ubuntu·编辑器
骇客野人2 天前
IntelliJ IDEA 菜单中英对照
java·ide·intellij-idea