Launcher: Changed to launch emulator using script.
authorminkee.lee <minkee.lee@samsung.com>
Tue, 26 May 2015 05:30:55 +0000 (14:30 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 26 May 2015 07:55:57 +0000 (16:55 +0900)
- Emulator manager is changed to launch emulator using a script file
  instead of an emulator binary.

Change-Id: I45348eb0fd0aadac37b19c36baf429822da48d15
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
src/org/tizen/emulator/manager/vms/VMLauncher.java

index 65d6a84..bf51bb3 100644 (file)
@@ -102,7 +102,7 @@ public class VMLauncher {
        private static List<String> getCommand(VMProperty property)
                        throws VMLauncherException {
                String binaryPath = FilePathResources.getEmulatorBinPath(property.getPropertyValue().version)
-                               + File.separator + getBinary(property.getArch().toString());
+                               + File.separator + getBinary();
                String configPath = LaunchConfig
                                .getLaunchConfigPath(property.getName());
                if (!new File(configPath).exists()) {
@@ -167,22 +167,13 @@ public class VMLauncher {
                }
        }
 
-       private static String getBinary(String arch) {
-               String binary;
-               if (arch.equals("x86")) {
-                       if (EmulatorManager.isWin()) {
-                               binary = "emulator-x86.exe";
-                       } else {
-                               binary = "emulator-x86";
-                       }
+       private static String getBinary() {
+               if (EmulatorManager.isWin()) {
+                       return "emulator.cmd";
+
                } else {
-                       if (EmulatorManager.isWin()) {
-                               binary = "emulator-arm.exe";
-                       } else {
-                               binary = "emulator-arm";
-                       }
+                       return "emulator.sh";
                }
-               return binary;
        }
 
        public static Process launch(String vmName, String platformVersion,
@@ -192,23 +183,6 @@ public class VMLauncher {
                // Make backup log.
                // LogUtil.makeVMBackupLog(vmName);
 
-               Map<String, String> env = pb.environment();
-               if (EmulatorManager.isLinux()) {
-                       String value = env.get("LD_LIBRARY_PATH");
-                       env.put("LD_LIBRARY_PATH",
-                                       ((value == null) ? "" : value + ":")
-                                                       + FilePathResources.getEmulatorBinPath(platformVersion) + ":"
-                                                       + FilePathResources.getRemotePath()
-                                                       + File.separator + "lib:");
-                       EMLogger.getLogger().log(Level.INFO,
-                                       "LD_LIBRARY_PATH=" + env.get("LD_LIBRARY_PATH"));
-
-               } else if (EmulatorManager.isWin()) {
-                       env.put("SDL_STDIO_REDIRECT","0");
-                       EMLogger.getLogger().log(Level.INFO,
-                                       "ENV : SDL_STDIO_REDIRECT=" + env.get("SDL_STDIO_REDIRECT"));
-               }
-
                if (binPath == null || binPath.isEmpty()) {
                        pb.directory(new File(FilePathResources.getEmulatorBinPath(platformVersion)));
                } else {