sdb: change sdb path
authorMunkyu Im <munkyu.im@samsung.com>
Thu, 7 May 2015 07:34:09 +0000 (16:34 +0900)
committerMunkyu Im <munkyu.im@samsung.com>
Fri, 8 May 2015 08:01:52 +0000 (17:01 +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
tizen/src/ui/menu/contextmenu.cpp

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 348eaafeabfa90977cb321bdda0502a880c0f8de..31982a5b7068f1972a75f0a9edf0257f95cc84da 100644 (file)
@@ -1873,7 +1873,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 d2a97ecf1f41054edd93849f5bb4db47517e82cd..2fd734b76f7d71d360d018a0b3f99afec1031c71 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() {
index 07343712e82cee7339d02d05b2ccd437fcbc199c..1dc5f7e6ee31b4f86cea0543e85327633c9d33d8 100644 (file)
@@ -510,9 +510,9 @@ void ContextMenu::slotShell()
 
     QString sdbPath = QCoreApplication::applicationDirPath();
 #ifdef CONFIG_WIN32
-    sdbPath += "\\..\\..\\ansicon.exe";
+    sdbPath += "\\..\\..\\..\\..\\..\\tools\\ansicon.exe";
 #else
-    sdbPath += "/../../sdb";
+    sdbPath += "/../../../../../tools/sdb";
 #endif
 
     QFileInfo sdbFileInfo(sdbPath);
@@ -531,7 +531,7 @@ void ContextMenu::slotShell()
     arguments << "/c" << "start" << sdbPath << "sdb" << "-s" << sdbSerialName << "shell";
 #elif defined CONFIG_DARWIN
     command = QCoreApplication::applicationDirPath() + "/sdbscript";
-    arguments << sdbSerialName;
+    arguments << sdbPath << sdbSerialName;
 #else
     command = "/usr/bin/gnome-terminal";
     QString title = "--title=" + vmName;