console: try fix Simulator detect on Windows (#395)

This commit is contained in:
Nathan Schulte 2024-04-17 16:12:27 -05:00 committed by GitHub
parent b25b6d3754
commit b1c72bdbab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ public class SimulatorExecHelper {
private final static NamedThreadFactory THREAD_FACTORY = new NamedThreadFactory("SimulatorExecHelper", true);
private static final String SIMULATOR_BINARY_NAME = "fome_simulator";
private static final String SIMULATOR_BINARY_PATH = "../simulator/build";
private static final String SIMULATOR_BINARY_PATH = "../simulator/build/";
static Process simulatorProcess;
/**
@ -99,10 +99,10 @@ public class SimulatorExecHelper {
}
public static File getSimulatorBinary(String binaryPath) {
File binary = new File(binaryPath + SIMULATOR_BINARY_NAME);
File binary = new File(binaryPath, SIMULATOR_BINARY_NAME);
if (!binary.exists()) { // try also for Windows/PE executable
binary = new File(binaryPath + ".exe");
binary = new File(binaryPath, SIMULATOR_BINARY_NAME + ".exe");
}
if (!binary.exists() || binary.isDirectory() || !binary.canExecute()) {