allow manual configuration of hwi executable path

This commit is contained in:
Craig Raw 2021-04-14 11:25:40 +02:00
parent 3fe5fd89c4
commit a8430c79eb

View file

@ -222,7 +222,9 @@ public class Hwi {
private synchronized File getHwiExecutable(Command command) { private synchronized File getHwiExecutable(Command command) {
File hwiExecutable = Config.get().getHwi(); File hwiExecutable = Config.get().getHwi();
if(hwiExecutable != null && hwiExecutable.exists()) { if(hwiExecutable != null && hwiExecutable.exists()) {
if(command.isTestFirst() && (!hwiExecutable.getAbsolutePath().contains(VERSION_PREFIX) || !testHwi(hwiExecutable))) { String tmpDir = System.getProperty("java.io.tmpdir");
String hwiPath = hwiExecutable.getAbsolutePath();
if(command.isTestFirst() && hwiPath.startsWith(tmpDir) && (!hwiPath.contains(VERSION_PREFIX) || !testHwi(hwiExecutable))) {
if(Platform.getCurrent() == Platform.OSX) { if(Platform.getCurrent() == Platform.OSX) {
deleteDirectory(hwiExecutable.getParentFile()); deleteDirectory(hwiExecutable.getParentFile());
} else { } else {