[Title]fix path
authormunkyu.im <munkyu.im@samsung.com>
Thu, 15 Mar 2012 11:31:57 +0000 (20:31 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Thu, 15 Mar 2012 11:31:57 +0000 (20:31 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

src/org/tizen/emulator/manager/EmulatorManager.java
src/org/tizen/emulator/manager/tool/FileIO.java
src/org/tizen/emulator/manager/tool/Launcher.java

index 4441aa5..b347671 100644 (file)
@@ -27,9 +27,9 @@ public class EmulatorManager {
                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();
        }
index ee6ca0c..d21d533 100644 (file)
@@ -46,8 +46,8 @@ public class FileIO {
        }
 
        public String getBinPath() throws IOException {
-               String temp = dir2.getCanonicalPath();
-               return temp + bin_suffix;
+               String temp = dir1.getCanonicalPath();
+               return temp;
                //return dir1.getCanonicalPath();
        }
        
index d008204..afe8728 100644 (file)
@@ -34,7 +34,7 @@ public class Launcher {
                if(exists) {
                        try {
                                FileReader in = new FileReader(PortPath); 
-                               while((c=in.read()) != '\n') {
+                               while((c=in.read()) != -1) {
                                        StrPortNo = StrPortNo + (char)c;
                                }
                                in.close();
@@ -66,9 +66,9 @@ public class Launcher {
                }
 
                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");
@@ -79,7 +79,7 @@ public class Launcher {
                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,"