diff options
author | Munkyu Im <munkyu.im@samsung.com> | 2017-01-02 16:55:16 +0900 |
---|---|---|
committer | Munkyu Im <munkyu.im@samsung.com> | 2017-01-02 18:44:17 +0900 |
commit | cb71fc6c504f702062ebd55e58dc7f7cf81f8844 (patch) | |
tree | 52045b5a6b56566f2c19ca4df4060fb16767b0ed /tizen | |
parent | 2c287e32dc138ff512db2a6fd10d5ac9173eeb30 (diff) | |
download | qemu-cb71fc6c504f702062ebd55e58dc7f7cf81f8844.tar.gz qemu-cb71fc6c504f702062ebd55e58dc7f7cf81f8844.tar.bz2 qemu-cb71fc6c504f702062ebd55e58dc7f7cf81f8844.zip |
ecs: separate package file path by platform version
The old path does not work on tizen 3.0.
So, change the path to push package file.
For tizen 2.XX: /opt/usr/apps/tmp/sdk_tools/
For the others(including tizen 3.XX): /tmp/.emulator/apps/
Change-Id: Ide6d328ff024c286c1820a13c3720f8f1362a2b7
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
Diffstat (limited to 'tizen')
-rw-r--r-- | tizen/src/ecs/ecs_msg_injector.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tizen/src/ecs/ecs_msg_injector.c b/tizen/src/ecs/ecs_msg_injector.c index 0c5c3d5e04..f85b1c335b 100644 --- a/tizen/src/ecs/ecs_msg_injector.c +++ b/tizen/src/ecs/ecs_msg_injector.c @@ -313,18 +313,28 @@ static bool push_package(const char *data) const char *addon_path = "\\emulator-images\\add-ons\\"; #endif const char *bin_dir = get_bin_path(); + const char *dst_dir; + if (g_str_has_prefix(get_platform_version(), "tizen-2.")) { + dst_dir = "/opt/usr/apps/tmp/sdk_tools/"; + } else { + /* + * Also, if get_platform_version() is empty, + * set as the following path. + */ + dst_dir = "/tmp/.emulator/apps/"; + } memset(cmd, 0, sizeof(cmd)); char *addon = strtok((char *)data, token); #ifndef CONFIG_WIN32 - ret = sprintf(cmd, "\"%s%s\" -s emulator-%d push \"%s%s%s%s%s\" /tmp/.emulator/apps/%s 2>&1", + ret = sprintf(cmd, "\"%s%s\" -s emulator-%d push \"%s%s%s%s%s\" %s%s 2>&1", #else - ret = sprintf(cmd, "cmd /S /C \"\"%s%s\" -s emulator-%d push \"%s%s%s%s%s\" /tmp/.emulator/apps/%s 2>&1\"", + ret = sprintf(cmd, "cmd /S /C \"\"%s%s\" -s emulator-%d push \"%s%s%s%s%s\" %s%s 2>&1\"", #endif bin_dir, sdb_path, get_vm_device_serial_number(), bin_dir, platform_path, get_profile_name(), addon_path, addon, - addon); + dst_dir, addon); if (ret < 0) { LOG_SEVERE("SDB push command is wrong: %s\n", cmd); return false; |