mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-10-01 09:40:35 +13:00
Check for 32bit notepad++ installation
This commit is contained in:
parent
abcf67099b
commit
1d55692d26
2 changed files with 10 additions and 6 deletions
|
@ -43,10 +43,13 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
|||
|
||||
@Override
|
||||
protected Optional<Path> determineInstallation() {
|
||||
Optional<String> launcherDir;
|
||||
launcherDir = WindowsRegistry.readString(WindowsRegistry.HKEY_LOCAL_MACHINE, "SOFTWARE\\Notepad++", null)
|
||||
.map(p -> p + "\\notepad++.exe");
|
||||
return launcherDir.map(Path::of);
|
||||
var found = WindowsRegistry.readString(WindowsRegistry.HKEY_LOCAL_MACHINE, "SOFTWARE\\Notepad++", null);
|
||||
|
||||
// Check 32 bit install
|
||||
if (found.isEmpty()) {
|
||||
found = WindowsRegistry.readString(WindowsRegistry.HKEY_LOCAL_MACHINE, "WOW6432Node\\SOFTWARE\\Notepad++", null);
|
||||
}
|
||||
return found.map(p -> p + "\\notepad++.exe").map(Path::of);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.xpipe.app.util;
|
||||
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.issue.TrackEvent;
|
||||
import io.xpipe.core.impl.LocalStore;
|
||||
import io.xpipe.core.process.ShellControl;
|
||||
|
@ -41,8 +42,8 @@ public class ApplicationHelper {
|
|||
ShellControl processControl, String executable, String displayName, String connectionName)
|
||||
throws Exception {
|
||||
if (!isInPath(processControl, executable)) {
|
||||
throw new IOException(displayName + " executable " + executable + " not found in PATH"
|
||||
+ (connectionName != null ? " on system " + connectionName : ""));
|
||||
throw ErrorEvent.unreportable(new IOException(displayName + " executable " + executable + " not found in PATH"
|
||||
+ (connectionName != null ? " on system " + connectionName : "")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue