Pasindu 8 years ago
commit 0938a312d7

@ -766,6 +766,22 @@ public class TryIt {
default: default:
qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386"; qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386";
} }
setExecutePermission(qemuSystemFileLocation);
qemuSystemFileLocation = androidSdkHome + File.separator + "emulator" + File.separator
+ "qemu" + File.separator;
switch (osSuffix) {
case Constants.MAC_OS:
qemuSystemFileLocation += Constants.MAC_DARWIN + "-x86_64" + File.separator + "qemu-system-i386";
break;
case Constants.WINDOWS_OS:
qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386.exe";
break;
default:
qemuSystemFileLocation += osSuffix + "-x86_64" + File.separator + "qemu-system-i386";
}
killServer(); killServer();
setExecutePermission(qemuSystemFileLocation); setExecutePermission(qemuSystemFileLocation);
ExecutorService service = Executors.newSingleThreadExecutor(); ExecutorService service = Executors.newSingleThreadExecutor();
@ -814,12 +830,14 @@ public class TryIt {
* @param fileName name of the file to set execution permission. * @param fileName name of the file to set execution permission.
*/ */
private void setExecutePermission(String fileName) { private void setExecutePermission(String fileName) {
if (!new File(fileName).canExecute()) { if (new File((fileName)).exists()) {
if (!new File(fileName).setExecutable(true)) { if (!new File(fileName).canExecute()) {
System.out.println("Unable to set the execute permission of : " + fileName); if (!new File(fileName).setExecutable(true)) {
System.out.println("Please set the executable permission for file " System.out.println("Unable to set the execute permission of : " + fileName);
+ new File(fileName).getAbsolutePath() + " to continue"); System.out.println("Please set the executable permission for file "
System.exit(1); // if can't execute, unable to proceed + new File(fileName).getAbsolutePath() + " to continue");
System.exit(1); // if can't execute, unable to proceed
}
} }
} }
} }

@ -23,7 +23,7 @@
<!-- Font Awesome CSS --> <!-- Font Awesome CSS -->
{{~css "lib/font-awesome_4.3.0/css/font-awesome.min.css" combine=false}} {{~css "lib/font-awesome_4.3.0/css/font-awesome.min.css" combine=false}}
<!-- Font WSO2 CSS --> <!-- Font WSO2 CSS -->
{{~css "lib/font-wso2_1.2/css/font-wso2.css" combine=false}} {{~css "lib/font-wso2-1.3.0/css/font-wso2.css" combine=false}}
<!-- Theme LESS --> <!-- Theme LESS -->
{{~css "less/theme.less" combine=false}} {{~css "less/theme.less" combine=false}}
{{~css "css/theme-wso2.css" combine=false}} {{~css "css/theme-wso2.css" combine=false}}

@ -23,7 +23,7 @@
<!-- Font Awesome CSS --> <!-- Font Awesome CSS -->
{{~css "lib/font-awesome_4.3.0/css/font-awesome.min.css" combine=false}} {{~css "lib/font-awesome_4.3.0/css/font-awesome.min.css" combine=false}}
<!-- Font WSO2 CSS --> <!-- Font WSO2 CSS -->
{{~css "lib/font-wso2_1.2/css/font-wso2.css" combine=false}} {{~css "lib/font-wso2-1.3.0/css/font-wso2.css" combine=false}}
<!-- Theme LESS --> <!-- Theme LESS -->
{{~css "less/theme.less" combine=false}} {{~css "less/theme.less" combine=false}}
{{~css "css/theme-wso2.css" combine=false}} {{~css "css/theme-wso2.css" combine=false}}

Loading…
Cancel
Save