|
|
@ -156,7 +156,7 @@ public class TryIt {
|
|
|
|
if (!new File(localPath).delete()) {
|
|
|
|
if (!new File(localPath).delete()) {
|
|
|
|
System.out.println("Delete " + localPath + " and try again");
|
|
|
|
System.out.println("Delete " + localPath + " and try again");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handleException("Download failed for file : " + localPath , e);
|
|
|
|
handleException("Download failed for file : " + localPath, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
if (in != null)
|
|
|
|
if (in != null)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -505,7 +505,7 @@ public class TryIt {
|
|
|
|
String response = read.nextLine().toLowerCase();
|
|
|
|
String response = read.nextLine().toLowerCase();
|
|
|
|
if (response.matches("y")) {
|
|
|
|
if (response.matches("y")) {
|
|
|
|
setSDKPath();
|
|
|
|
setSDKPath();
|
|
|
|
} else if (response.matches("n") ) {
|
|
|
|
} else if (response.matches("n")) {
|
|
|
|
getAndroidSDK();
|
|
|
|
getAndroidSDK();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (count < 5) {
|
|
|
|
if (count < 5) {
|
|
|
@ -734,26 +734,20 @@ public class TryIt {
|
|
|
|
if (!new File(haxmLocation).mkdirs()) {
|
|
|
|
if (!new File(haxmLocation).mkdirs()) {
|
|
|
|
makeDirectoryError(haxmLocation, androidSdkHome);
|
|
|
|
makeDirectoryError(haxmLocation, androidSdkHome);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String haxmInstaller ;
|
|
|
|
String haxmInstaller;
|
|
|
|
String folderName = "extras" + File.separator + "intel" + File.separator
|
|
|
|
String folderName = "extras" + File.separator + "intel" + File.separator
|
|
|
|
+ "Hardware_Accelerated_Execution_Manager" + File.separator + "_haxm.zip";
|
|
|
|
+ "Hardware_Accelerated_Execution_Manager" + File.separator + "_haxm.zip";
|
|
|
|
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);
|
|
|
|