summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiwoong Im <jiwoong.im@samsung.com>2014-03-17 14:41:37 +0900
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-03-18 01:36:25 -0700
commit5f1787bb00aeec0926b50780d7aeae081895c7cb (patch)
treeec125268a44a300fecd5a62076410ba43387b6f3
parente5c06d1aa6bcb42993fcf05bd8fe7c1c30247bd4 (diff)
downloadapp-core-5f1787bb00aeec0926b50780d7aeae081895c7cb.tar.gz
app-core-5f1787bb00aeec0926b50780d7aeae081895c7cb.tar.bz2
app-core-5f1787bb00aeec0926b50780d7aeae081895c7cb.zip
Bug-Tizen: PTREL-322 Change-Id: I0832b33c74da0ee572fab3ef868a47fe2ebb3bcb Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
-rw-r--r--CMakeLists.txt2
-rw-r--r--packaging/app-core.spec1
-rw-r--r--src/appcore.c11
3 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4dba81..ed8271a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@ ENDIF (with_wayland)
SET(HEADERS_common appcore-common.h)
INCLUDE(FindPkgConfig)
-SET(APPCORE_PKG_CHECK_MODULES "vconf sensor aul dlog")
+SET(APPCORE_PKG_CHECK_MODULES "vconf sensor aul dlog libtzplatform-config")
IF (with_wayland)
pkg_check_modules(pkg_common REQUIRED ${APPCORE_PKG_CHECK_MODULES} ecore)
diff --git a/packaging/app-core.spec b/packaging/app-core.spec
index 666cfb6..8a2403f 100644
--- a/packaging/app-core.spec
+++ b/packaging/app-core.spec
@@ -25,6 +25,7 @@ BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: cmake
diff --git a/src/appcore.c b/src/appcore.c
index 5d46048..c5dc1e1 100644
--- a/src/appcore.c
+++ b/src/appcore.c
@@ -35,13 +35,14 @@
#include <dlfcn.h>
#include <vconf.h>
#include <aul.h>
+#include <tzplatform_config.h>
#include "appcore-internal.h"
#define SQLITE_FLUSH_MAX (1024*1024)
#define PKGNAME_MAX 256
-#define PATH_APP_ROOT "/opt/usr/apps"
-#define PATH_RO_APP_ROOT "/usr/apps"
+#define PATH_APP_ROOT tzplatform_getenv(TZ_USER_APP)
+#define PATH_RO_APP_ROOT tzplatform_getenv(TZ_SYS_RO_APP)
#define PATH_RES "/res"
#define PATH_LOCALE "/locale"
@@ -146,11 +147,13 @@ static int __get_dir_name(char *dirname)
if (aul_app_get_pkgname_bypid(pid, pkg_name, PKGNAME_MAX) != AUL_R_OK)
return -1;
- r = snprintf(dirname, PATH_MAX, PATH_APP_ROOT "/%s" PATH_RES PATH_LOCALE,pkg_name);
+ r = snprintf(dirname, PATH_MAX, "%s/%s" PATH_RES PATH_LOCALE,
+ PATH_APP_ROOT, pkg_name);
if (r < 0)
return -1;
if (access(dirname, R_OK) == 0) return 0;
- r = snprintf(dirname, PATH_MAX, PATH_RO_APP_ROOT "/%s" PATH_RES PATH_LOCALE,pkg_name);
+ r = snprintf(dirname, PATH_MAX, "%s/%s" PATH_RES PATH_LOCALE,
+ PATH_RO_APP_ROOT, pkg_name);
if (r < 0)
return -1;