List<String> cmd = getCommand(property);
- for (String str : LaunchConfig.readLaunchConfig(property.getName())) {
- System.out.println(str);
- }
-
CheckingRunningEmulator.addEmulator(property);
MonitoringEmulator monitor = new MonitoringEmulator(property);
Process process = launch(property.getName(), property.getPropertyValue().version,
}
List<String> cmd = new ArrayList<String>();
+ String emulatorCmd = binaryPath + " --conf " + configPath;
if (EmulatorManager.isWin()) {
cmd.add("cmd");
cmd.add("/c");
cmd.add("/bin/sh");
cmd.add("-c");
}
- cmd.add(binaryPath + " -c " + configPath + " > "
- + VMLogUtil.getEmulatorLogPath(property.getName()) + " 2>&1");
+ System.out.println("Launch command : " + emulatorCmd);
+ EMLogger.getLogger().log(Level.INFO, "Starting Emulator Command : ");
+ EMLogger.getLogger().log(Level.INFO, emulatorCmd);
+ // Add log redirection to command.
+ cmd.add(emulatorCmd + " > " + VMLogUtil.getEmulatorLogPath(property.getName()) + " 2>&1");
return cmd;
// Make backup log.
// LogUtil.makeVMBackupLog(vmName);
- EMLogger.getLogger().info(pb.command().toString());
+ Map<String, String> env = pb.environment();
if (EmulatorManager.isLinux()) {
- Map<String, String> env = pb.environment();
String value = env.get("LD_LIBRARY_PATH");
env.put("LD_LIBRARY_PATH",
((value == null) ? "" : value + ":")
+ File.separator + "lib:");
EMLogger.getLogger().log(Level.INFO,
"LD_LIBRARY_PATH=" + env.get("LD_LIBRARY_PATH"));
+
+ } else if (EmulatorManager.isWin()) {
+ env.put("SDL_STDIO_REDIRECT","0");
+ EMLogger.getLogger().log(Level.INFO,
+ "ENV : SDL_STDIO_REDIRECT=" + env.get("SDL_STDIO_REDIRECT"));
}
if (binPath == null || binPath.isEmpty()) {
}
// Log launch config.
- String temp = LaunchConfig.getLaunchConfigPath(vmName)
- + StringResources.NEW_LINE;
+ String launchConfig = StringResources.NEW_LINE;
for (String str : LaunchConfig.readLaunchConfig(vmName)) {
- temp += (str + StringResources.NEW_LINE);
+ launchConfig += (str + StringResources.NEW_LINE);
}
- EMLogger.getLogger().log(Level.INFO, "Starting Emulator Command : ");
- EMLogger.getLogger().log(Level.INFO, temp);
+ EMLogger.getLogger().log(Level.INFO, "Launch config file : "
+ + LaunchConfig.getLaunchConfigPath(vmName) + launchConfig);
Process process = null;
try {