mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
changing file format for windows
This commit is contained in:
parent
7b15bae9a0
commit
8f04b660cf
@ -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("Downloading " + localPath + " failed.", e);
|
handleException("Download failed for file : " + localPath , e);
|
||||||
} finally {
|
} finally {
|
||||||
if (in != null)
|
if (in != null)
|
||||||
try {
|
try {
|
||||||
@ -193,7 +193,7 @@ public class TryIt {
|
|||||||
String response = new Scanner(System.in, StandardCharsets.UTF_8.toString()).next();
|
String response = new Scanner(System.in, StandardCharsets.UTF_8.toString()).next();
|
||||||
String emulatorLocationPath = response + File.separator + "tools" + File.separator + "emulator";
|
String emulatorLocationPath = response + File.separator + "tools" + File.separator + "emulator";
|
||||||
if (osSuffix.equals(Constants.WINDOWS_OS)) {
|
if (osSuffix.equals(Constants.WINDOWS_OS)) {
|
||||||
emulatorLocationPath += Constants.WINDOWS_EXTENSION_BAT;
|
emulatorLocationPath += Constants.WINDOWS_EXTENSION_EXE;
|
||||||
}
|
}
|
||||||
if (new File(emulatorLocationPath).exists()) {
|
if (new File(emulatorLocationPath).exists()) {
|
||||||
androidSdkHome = response;
|
androidSdkHome = response;
|
||||||
@ -734,19 +734,19 @@ public class TryIt {
|
|||||||
if (!new File(haxmLocation).mkdirs()) {
|
if (!new File(haxmLocation).mkdirs()) {
|
||||||
makeDirectoryError(haxmLocation, androidSdkHome);
|
makeDirectoryError(haxmLocation, androidSdkHome);
|
||||||
}
|
}
|
||||||
String folderName = "_haxm.zip";
|
String folderName = "extras" + File.separator + "intel" + File.separator
|
||||||
getTools(System.getProperty(Constants.HAXM_URL), haxmLocation + File.separator
|
+ "Hardware_Accelerated_Execution_Manager" + File.separator + "_haxm.zip";
|
||||||
+ folderName);
|
getTools(System.getProperty(Constants.HAXM_URL), folderName);
|
||||||
String haxmInstaller = haxmLocation + File.separator + "silent_install";
|
String haxmInstaller = haxmLocation + File.separator + "HAXM installation";
|
||||||
if (osSuffix.equals(Constants.WINDOWS_OS)) {
|
// if (osSuffix.equals(Constants.WINDOWS_OS)) {
|
||||||
haxmInstaller += Constants.WINDOWS_EXTENSION_BAT;
|
// haxmInstaller += Constants.WINDOWS_EXTENSION_BAT;
|
||||||
} else {
|
// } else {
|
||||||
haxmInstaller += Constants.MAC_HAXM_EXTENSION;
|
// haxmInstaller += Constants.MAC_HAXM_EXTENSION;
|
||||||
}
|
// }
|
||||||
setExecutePermission(haxmInstaller);
|
setExecutePermission(haxmInstaller);
|
||||||
|
|
||||||
ProcessBuilder processBuilder = new ProcessBuilder(haxmInstaller, "-m", "2048", "-log",
|
ProcessBuilder processBuilder = new ProcessBuilder(haxmInstaller, "-m", "2048", "-log",
|
||||||
workingDirectory + File.separator + "haxmSilentRun.log");
|
androidSdkHome + File.separator + "haxmSilentRun.log");
|
||||||
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…
Reference in New Issue
Block a user