[Title] modify to start console mode for windows
authorjihye kim <jihye1128.kim@samsung.com>
Fri, 17 Aug 2012 02:52:53 +0000 (11:52 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Fri, 17 Aug 2012 02:59:53 +0000 (11:59 +0900)
[Type] bug fix
[Module] emulator manager
[Priority] major
[Jira#] T_SDK-105
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

package/pkginfo.manifest
src/org/tizen/emulator/manager/EmulatorManager.java [changed mode: 0644->0755]

index 266e9ea..047c586 100644 (file)
@@ -1,5 +1,5 @@
 Source: emulator-manager
-Version: 1.3.18
+Version: 1.3.19
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
 
 Package: emulator-manager
old mode 100644 (file)
new mode 100755 (executable)
index 2ba3b9e..b48ad7a
@@ -61,6 +61,7 @@ public class EmulatorManager {
 
        private static CommandLineParser processor = null;
        private static boolean isConsoleMode = true;
+       private static boolean isVMSPath = false;
        // for multi touch
        private static boolean isInhoseMode  = true;
        // for windows
@@ -117,18 +118,23 @@ public class EmulatorManager {
                                // workspace
                                if (s.startsWith("--w") || s.startsWith("-w")) {
                                        isConsoleMode = false;
+                                       ++i;
                                        break;
                                }
                                // inhouse
-                               if (s.startsWith("--i") || s.startsWith("-i")) {
+                               else if (s.startsWith("--i") || s.startsWith("-i")) {
                                        isConsoleMode = false;
                                        break;
                                }
                                // vms path for windows
-                               if (s.startsWith("--vms")) {
+                               else if (s.startsWith("--vms")) {
                                        isConsoleMode = false;
+                                       isVMSPath = true;
                                        emulatorVMsPath = args[++i];
                                }
+                               else {
+                                       isConsoleMode = true;
+                               }
                        }
                } else {
                        isConsoleMode = false;
@@ -163,6 +169,10 @@ public class EmulatorManager {
                                        }
                                } else if (args[i].equals("--inhouse")) {
                                        isInhoseMode = true;
+                               } else if (args[i].equals("--vms")) {
+                                       ++i;
+                               } else {
+                                       isArgsError = true;
                                }
                        }
                }
@@ -190,6 +200,15 @@ public class EmulatorManager {
                checkConsoleMode(args);
 
                if (isConsoleMode) {
+                       String[] args2 = null;
+                       if (isVMSPath) {
+                args2 = new String[args.length-2];
+                               int j = 0;
+                               for (int i = 2; i < args.length; i++) {
+                                       args2[j++] = args[i];
+                               }
+                               args = args2;
+                       }
 
                        EMLogger.getInstance().initConsoleLogger();
                        try {