shell.setText("Emulator Manager");
shell.setLayout(new FillLayout());
}
- public static void env_init() {
- String defaultPath = EmulatorVMs.getInstance().getVMsBaseDirectory();
- File fi = new File(defaultPath);
+ private static void env_init() {
+ String VmsPath = EmulatorVMs.getInstance().getVMsBaseDirectory();
+ File fi = new File(VmsPath);
if(!fi.exists())
fi.mkdirs();
}
}
public String getBinPath() throws IOException {
- String temp = dir2.getCanonicalPath();
- return temp + bin_suffix;
+ String temp = dir1.getCanonicalPath();
+ return temp;
//return dir1.getCanonicalPath();
}
if(exists) {
try {
FileReader in = new FileReader(PortPath);
- while((c=in.read()) != '\n') {
+ while((c=in.read()) != -1) {
StrPortNo = StrPortNo + (char)c;
}
in.close();
}
if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1)
- binary = "/qemu-system-i386.exe";
+ binary = "/emulator-x86.exe";
else
- binary = "/qemu-system-i386";
+ binary = "/emulator-x86";
if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1 && property.getConfiguration().getUsability().isHwVirtualization()) {
File fi = new File("/dev/kvm");
FileIO fio = new FileIO();
// make cmd to run emulator
try {
- String cmd = System.getProperty("user.dir") + binary
+ String cmd = fio.getBinPath() + binary
+ " --skin-args width=" + property.getConfiguration().getDevice().getDisplay().getResolution().getWidth() + " height=" + property.getConfiguration().getDevice().getDisplay().getResolution().getHeight()
+ " --qemu-args -drive file=" + EmulatorVMs.getInstance().getVMsBaseDirectory() + "/" +property.getArch().toString() + "/" + property.getName() + "/emulimg-" + property.getName() + ".x86,if=virtio"
+ " -boot c -append \"console=ttyS0 video=uvesafb:ywrap,"