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