[Title]add workspace option to emulator-manager
authormunkyu.im <munkyu.im@samsung.com>
Wed, 28 Mar 2012 07:36:17 +0000 (16:36 +0900)
committermunkyu.im <munkyu.im@samsung.com>
Wed, 28 Mar 2012 07:36:17 +0000 (16:36 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

dist/linux/emulator-manager.sh
package/pkginfo.manifest
src/org/tizen/emulator/manager/EmulatorManager.java

index 8444f4c..e41f858 100755 (executable)
@@ -12,4 +12,4 @@ em_path="."
 fi
 #echo $em_path
 
-java -jar $em_path"/emulator-manager.jar"
+java -jar $em_path"/emulator-manager.jar" $*
index ee9c8a7..8c73ed2 100644 (file)
@@ -1,5 +1,5 @@
 Package: emulator-manager
-Version: 1.0.19
+Version: 1.0.20
 OS: linux
 Build-host-os: linux
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
@@ -7,7 +7,7 @@ Source: emulator-manager
 Description: Tizen Emulator Manager
 
 Package: emulator-manager
-Version: 1.0.19
+Version: 1.0.20
 OS: windows
 Build-host-os: windows
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
index 45eb04f..c9f7fae 100644 (file)
@@ -1,5 +1,6 @@
 package org.tizen.emulator.manager;
 
+import javax.swing.JOptionPane;
 import org.eclipse.swt.widgets.Display;
 import org.tizen.emulator.manager.tool.FileIO;
 import org.tizen.emulator.manager.ui.MainDialog;
@@ -41,7 +42,17 @@ public class EmulatorManager {
 
        public static void main(String[] args) {
                if(args.length > 0) {
-                       EmulatorVMs.getInstance().setVMsBaseDirectory(args[0]);
+                       for(int i = 0; i < args.length; i++) {
+                               if(args[i].equals("--workspace") || args[i].equals("-w")) {
+                                       if(args.length == i + 1) {
+                                               JOptionPane.showMessageDialog(null, "You didn't input workspace path after command line option --workspace or -w\n"
+                                                                                                                                       + "Emulator Manager sets in default workspace.");
+                                               break;
+                                       }
+                                       EmulatorVMs.getInstance().setVMsBaseDirectory(args[i+1]);
+                                       break;
+                               }
+                       }
                }
                else {
                        EmulatorVMs.getInstance().setVMsBaseDirectory(FileIO.getInstance().getTizenVmsPath());