sdb: change sdb path
authorMunkyu Im <munkyu.im@samsung.com>
Thu, 7 May 2015 07:34:09 +0000 (16:34 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Fri, 21 Aug 2015 04:42:48 +0000 (13:42 +0900)
because of restructuring directories, relative path of sdb changed.

Change-Id: Ib5150ccd9909e02e5c300e5e9a72cb5292820c05
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
tizen/src/scripts/sdbscript
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinUtil.java

index 1f5b0b470a0dfc60c649cc42e01383fccb5d92a2..9f8116fc194ec649663487d27aec53e9e65636ca 100755 (executable)
@@ -1,15 +1,15 @@
 #!/bin/sh
-if [ "$1" == "" ];
+if [ "$#" -ne 2 ];
 then
-        echo "There is no emulator name for an argument. \nusage: sdbscript emulator-261xx"
-        exit -1
-else
-    TITLE=$1
-    osascript > /dev/null << END
-    tell application "Terminal"
-        activate
-        do script "`pwd`/../../sdb -s $TITLE shell"
-        set custom title of first window to "$TITLE"
-    end tell
-END
+        echo "usage: sdbscript \${SDB_PATH} emulator-261xx"
+        exit 1
 fi
+
+TITLE=$2
+osascript > /dev/null << END
+tell application "Terminal"
+activate
+do script "$1 -s $TITLE shell"
+set custom title of first window to "$TITLE"
+end tell
+END
index cb245dfa6b15c7b0706519a7d4c1ddec2fa0b14d..25201d7e72a43a4a947ff1f07a7264375605db73 100644 (file)
@@ -1877,7 +1877,7 @@ public class EmulatorSkin {
                                        procSdb.command("cmd.exe", "/c", "start", sdbPath, "sdb",
                                                        "-s", "emulator-" + portSdb, "shell");
                                } else if (SwtUtil.isMacPlatform()) {
-                                       procSdb.command("./sdbscript", "emulator-" + portSdb);
+                                       procSdb.command("./sdbscript", sdbPath, "emulator-" + portSdb);
                                        /*
                                         * procSdb.command( "/usr/X11/bin/uxterm", "-T", "emulator-"
                                         * + portSdb, "-e", sdbPath, "shell");
index 99f2e120bdd322cb64298adbb4ed423ac089de4f..472ab2891b0e7863070f040318f138f426ccd0d6 100644 (file)
@@ -170,15 +170,17 @@ public class SkinUtil {
        }
 
        public static String getSdbPath() {
-               String sdbPath = null;
-
+               StringBuilder sdbPath = new StringBuilder(".." + File.separator + ".."
+                               + File.separator + ".." + File.separator + ".."
+                               + File.separator + ".." + File.separator + "tools"
+                               + File.separator);
                if (SwtUtil.isWindowsPlatform()) {
-                       sdbPath = "..\\..\\ansicon.exe";
+                       sdbPath.append("ansicon.exe");
                } else {
-                       sdbPath = "../../sdb";
+                       sdbPath.append("sdb");
                }
 
-               return (binaryPath + sdbPath);
+               return (binaryPath + sdbPath.toString());
        }
 
        public static String getEcpPath() {