From ce00ae592e56cd35c871317fe17896a6c3f60a18 Mon Sep 17 00:00:00 2001 From: Jean-Benoit MARTIN Date: Thu, 12 Dec 2013 15:48:18 +0100 Subject: [PATCH] Remove hardcoded path for multiuser support Bug-Tizen: PTREL-369 Change-Id: I935e1836ec8a725d01099c8769fc7579a5324711 Signed-off-by: Jean-Benoit MARTIN --- packaging/wrt.spec | 2 ++ src/view/common/CMakeLists.txt | 1 + src/view/common/view_logic_apps_support.cpp | 4 +++- src/wrt-client/CMakeLists.txt | 1 + src/wrt-client/wrt-client.cpp | 4 ++-- src/wrt-launcher/wrt-launcher.cpp | 2 -- src/wrt-launchpad-daemon/CMakeLists.txt | 1 + src/wrt-launchpad-daemon/include/launchpad_util.h | 9 +++++---- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/packaging/wrt.spec b/packaging/wrt.spec index 8662de1..a04ead9 100644 --- a/packaging/wrt.spec +++ b/packaging/wrt.spec @@ -55,6 +55,7 @@ BuildRequires: pkgconfig(wrt-popup-ace-runner) BuildRequires: pkgconfig(sysman) BuildRequires: pkgconfig(capi-system-system-settings) BuildRequires: pkgconfig(app2sd) +BuildRequires: pkgconfig(libtzplatform-config) %if %{with mesa} BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glesv2) @@ -70,6 +71,7 @@ BuildRequires: libss-client-devel BuildRequires: gettext BuildRequires: edje-tools Requires: libss-client +Requires: libtzplatform-config ## wrt-launchpad-daemon ####################################################### BuildRequires: pkgconfig(app-checker) diff --git a/src/view/common/CMakeLists.txt b/src/view/common/CMakeLists.txt index 3338fb0..60f9eb2 100644 --- a/src/view/common/CMakeLists.txt +++ b/src/view/common/CMakeLists.txt @@ -37,6 +37,7 @@ PKG_CHECK_MODULES(SYS_VIEW_COMMON_DEP security-client security-core secure-storage + libtzplatform-config REQUIRED ) diff --git a/src/view/common/view_logic_apps_support.cpp b/src/view/common/view_logic_apps_support.cpp index fdf502c..9b1f778 100644 --- a/src/view/common/view_logic_apps_support.cpp +++ b/src/view/common/view_logic_apps_support.cpp @@ -33,6 +33,8 @@ #include #include +#include + namespace ViewModule { namespace { const char* const SCHEME_TYPE_HTML5_VIDEO = "html5video"; @@ -40,7 +42,7 @@ const char* const HTTP_STREAMING_MPEG_MIMETYPE = "application/x-mpegurl"; const char* const HTTP_STREAMING_APPLE_MIMETYPE = "application/vnd.apple.mpegurl"; const char* const SCHEM_FILE = "file"; -const char* const DOWNLOAD_PATH = "/opt/usr/media/Downloads/"; +const char* const DOWNLOAD_PATH = tzplatform_mkpath(TZ_USER_DOWNLOADS,"/"); } //Implementation class diff --git a/src/wrt-client/CMakeLists.txt b/src/wrt-client/CMakeLists.txt index 43877a8..f8631e9 100644 --- a/src/wrt-client/CMakeLists.txt +++ b/src/wrt-client/CMakeLists.txt @@ -37,6 +37,7 @@ PKG_CHECK_MODULES(CLIENT_DEP appsvc efl-assist libsystemd-daemon + libtzplatform-config REQUIRED ) diff --git a/src/wrt-client/wrt-client.cpp b/src/wrt-client/wrt-client.cpp index 10fdda1..c28b405 100644 --- a/src/wrt-client/wrt-client.cpp +++ b/src/wrt-client/wrt-client.cpp @@ -68,8 +68,8 @@ static char** app_argv = NULL; // env const char* const HOME = "HOME"; -const char* const APP_HOME_PATH = "/opt/home/app"; -const char* const ROOT_HOME_PATH = "/opt/home/root"; +const char* const APP_HOME_PATH = tzplatform_getenv(TZ_USER_HOME); +const char* const ROOT_HOME_PATH = tzplatform_getenv(TZ_SYS_ROOT); WrtClient::WrtClient(int argc, char **argv) : Application(argc, argv, "wrt-client", false), diff --git a/src/wrt-launcher/wrt-launcher.cpp b/src/wrt-launcher/wrt-launcher.cpp index 5c9fc0d..e55f373 100644 --- a/src/wrt-launcher/wrt-launcher.cpp +++ b/src/wrt-launcher/wrt-launcher.cpp @@ -38,8 +38,6 @@ #define TIMEOUT_DEFAULT 10 #define ROOT_DEFAULT_UID 0 #define ROOT_DEFAULT_GID 0 -#define WEBAPP_DEFAULT_UID 5000 -#define WEBAPP_DEFAULT_GID 5000 #define LOGGING_DEFAULT_GID 6509 #define RETURN_ERROR -1 diff --git a/src/wrt-launchpad-daemon/CMakeLists.txt b/src/wrt-launchpad-daemon/CMakeLists.txt index 6428e9a..90f9004 100644 --- a/src/wrt-launchpad-daemon/CMakeLists.txt +++ b/src/wrt-launchpad-daemon/CMakeLists.txt @@ -34,6 +34,7 @@ PKG_CHECK_MODULES(WRT_LAUNCH_PAD_DEPS x11 sqlite3 libsystemd-daemon + libtzplatform-config REQUIRED ) diff --git a/src/wrt-launchpad-daemon/include/launchpad_util.h b/src/wrt-launchpad-daemon/include/launchpad_util.h index e46c74b..827a161 100644 --- a/src/wrt-launchpad-daemon/include/launchpad_util.h +++ b/src/wrt-launchpad-daemon/include/launchpad_util.h @@ -28,6 +28,8 @@ #include #include +#include + #include "config.h" #include "gl.h" #include "app_sock.h" @@ -40,8 +42,7 @@ #define PKG_ID_LENGTH 11 #define SDK_CODE_COVERAGE "CODE_COVERAGE" #define SDK_DYNAMIC_ANALYSIS "DYNAMIC_ANALYSIS" -#define PATH_DA_SO "/home/developer/sdk_tools/da/da_probe.so" -#define PATH_APP_ROOT "/opt/usr/apps" +#define PATH_DA_SO tzplatform_mkpath(TZ_SDK_TOOLS,"da/da_probe.so") #define PATH_DATA "/data" // Prototype @@ -80,8 +81,8 @@ _static_ void __set_sdk_env(app_info_from_db* menu_info, char* str) if (strncmp(str, SDK_CODE_COVERAGE, strlen(str)) == 0) { snprintf(buf, MAX_LOCAL_BUFSZ, - PATH_APP_ROOT "/%s" PATH_DATA, - _get_pkgname(menu_info)); + "%s/%s" PATH_DATA, + tzplatform_getenv(TZ_USER_APP),_get_pkgname(menu_info)); ret = setenv("GCOV_PREFIX", buf, 1); _D("GCOV_PREFIX : %d", ret); ret = setenv("GCOV_PREFIX_STRIP", "4096", 1); -- 2.7.4