mirror of
https://github.com/eclipse-cdt/cdt
synced 2024-10-28 03:59:40 +01:00
Handle null "DisplayName" in registry
This is a backport of 0dabaa15fb
from PR #331
Fixes #330
This commit is contained in:
parent
78cd4d24e9
commit
fadcb1e75b
4 changed files with 11 additions and 2 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.build.gcc.core;singleton:=true
|
||||
Bundle-Version: 2.1.0.qualifier
|
||||
Bundle-Version: 2.1.1.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.build.gcc.core.internal.Activator
|
||||
Bundle-Vendor: %providerName
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
|
|
|
@ -48,6 +48,9 @@ public class Msys2ToolChainProvider implements IToolChainProvider {
|
|||
for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
|
||||
String compKey = uninstallKey + '\\' + subkey;
|
||||
String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
|
||||
if (displayName == null) {
|
||||
continue;
|
||||
}
|
||||
if (on64bit) {
|
||||
if (MSYS2_64BIT_NAMES.contains(displayName)) {
|
||||
if (addToolChain64(manager, registry, compKey)) {
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
|
||||
Bundle-Version: 8.1.0.qualifier
|
||||
Bundle-Version: 8.1.1.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
|
|
|
@ -95,6 +95,9 @@ public class MinGW {
|
|||
for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
|
||||
String compKey = uninstallKey + '\\' + subkey;
|
||||
String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
|
||||
if (displayName == null) {
|
||||
continue;
|
||||
}
|
||||
if (on64bit) {
|
||||
if (MSYS2_64BIT_NAMES.contains(displayName)) {
|
||||
String installLocation = registry.getCurrentUserValue(compKey, "InstallLocation"); //$NON-NLS-1$
|
||||
|
@ -230,6 +233,9 @@ public class MinGW {
|
|||
for (int i = 0; (subkey = registry.getCurrentUserKeyName(uninstallKey, i)) != null; i++) {
|
||||
String compKey = uninstallKey + '\\' + subkey;
|
||||
String displayName = registry.getCurrentUserValue(compKey, "DisplayName"); //$NON-NLS-1$
|
||||
if (displayName == null) {
|
||||
continue;
|
||||
}
|
||||
if (on64bit) {
|
||||
if (MSYS2_64BIT_NAMES.contains(displayName)) {
|
||||
String home = registry.getCurrentUserValue(compKey, "InstallLocation"); //$NON-NLS-1$
|
||||
|
|
Loading…
Reference in a new issue