code clean up

revert-dabc3590
Nirothipan 7 years ago
parent 1b72929598
commit 33dc732bd3

@ -740,20 +740,14 @@ public class TryIt {
getTools(System.getProperty(Constants.HAXM_URL), folderName); getTools(System.getProperty(Constants.HAXM_URL), folderName);
ProcessBuilder processBuilder; ProcessBuilder processBuilder;
if (osSuffix.equals(Constants.MAC_OS)) { if (osSuffix.equals(Constants.MAC_OS)) {
haxmInstaller = haxmLocation + File.separator + "HAXM installation"; haxmInstaller = haxmLocation + File.separator + "silent_install.sh";
setExecutePermission(haxmInstaller);
processBuilder = new ProcessBuilder("sudo", haxmInstaller, "-m", "2048", "-log",
androidSdkHome + File.separator + "haxmSilentRun.log");
} else { } else {
haxmInstaller = haxmLocation + File.separator + "silent_install"; haxmInstaller = haxmLocation + File.separator + "silent_install.bat";
haxmInstaller += Constants.WINDOWS_EXTENSION_BAT; }
setExecutePermission(haxmInstaller); setExecutePermission(haxmInstaller);
processBuilder = new ProcessBuilder(haxmInstaller, "-m", "2048", "-log", processBuilder = new ProcessBuilder("sudo", haxmInstaller, "-m", "2048", "-log",
androidSdkHome + File.separator + "haxmSilentRun.log"); androidSdkHome + File.separator + "haxmSilentRun.log");
} System.out.println("Installing intel HAXM, Please wait . . . ");
System.out.println("Installing intel HAXM...");
processBuilder.directory(new File(haxmLocation)); processBuilder.directory(new File(haxmLocation));
processBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT); processBuilder.redirectInput(ProcessBuilder.Redirect.INHERIT);
processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT);

Loading…
Cancel
Save