Remove hardcoded path for multiuser support 99/19299/5
authorTaejin Woo <tt.woo@samsung.com>
Fri, 11 Apr 2014 04:37:20 +0000 (13:37 +0900)
committerTaejin Woo <tt.woo@samsung.com>
Tue, 29 Apr 2014 01:46:34 +0000 (10:46 +0900)
We remove bt-share hardcoded path for multiuser support.

Change-Id: I4e90c4a4b40775fa08a9b16c3a1eac0759dbc514
Signed-off-by: Taejin Woo <tt.woo@samsung.com>
bt-share/CMakeLists.txt
bt-share/include/bt-share-main.h
bt-share/include/bt-share-notification.h
bt-share/include/bt-share-resource.h

index 326d182..d7de271 100644 (file)
@@ -32,7 +32,6 @@ ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(BINDIR "/usr/bin")
 SET(EXEC_PREFIX "\${prefix}")
 SET(INCLUDEDIR "/usr/include")
 SET(VERSION 1.0)
@@ -46,6 +45,6 @@ ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -L${CMAKE_CURRENT_SOURCE_DIR}/../lib -lbluetooth-share-api)
 
 
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/bluetooth-share.rule DESTINATION ${TZ_SYS_ETC}/smack/accesses.d)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/org.bluetooth.share.service DESTINATION share/dbus-1/system-services)
index deaf086..eeeecdc 100644 (file)
@@ -27,13 +27,15 @@ extern "C" {
 #include <glib.h>
 #include <dbus/dbus-glib.h>
 #include <notification.h>
+#include <tzplatform_config.h>
 
 #ifndef PACKAGE_NAME
 #define PACKAGE_NAME "bluetooth-share"
 #endif
 
 #define UI_PACKAGE "org.tizen.bluetooth-share-ui"
-#define UI_PKG_PATH "/opt/apps/org.tizen.bluetooth-share-ui/bin/bluetooth-share-ui"
+#define UI_PKG_PATH tzplatform_mkpath(TZ_SYS_RW_APP, \
+               "org.tizen.bluetooth-share-ui/bin/bluetooth-share-ui")
 
 typedef void (*bt_app_cb) (void *, void *, void *);
 
index b9e9bf6..a7cd66c 100644 (file)
@@ -26,12 +26,13 @@ extern "C" {
 
 #include <glib.h>
 #include <notification.h>
+#include <tzplatform_config.h>
 
 #include "bt-share-main.h"
 
-#define BT_SHARE_BIN_PATH "/usr/bin/bluetooth-share"
+#define BT_SHARE_BIN_PATH tzplatform_mkpath(TZ_SYS_BIN, "bluetooth-share")
 
-#define QP_NO_APP_LAUNCH       NOTIFICATION_PROP_DISABLE_APP_LAUNCH
+#define QP_NO_APP_LAUNCH       NOTIFICATION_PROP_DISABLE_APP_LAUNCH
 #define QP_NO_TICKER           NOTIFICATION_PROP_DISABLE_TICKERNOTI
 #define QP_NO_DELETE           (NOTIFICATION_PROP_DISABLE_AUTO_DELETE | NOTIFICATION_PROP_VOLATILE_DISPLAY)
 
index fd89754..a46a870 100644 (file)
@@ -25,6 +25,7 @@ extern "C" {
 #endif
 
 #include <libintl.h>
+#include <tzplatform_config.h>
 
 /*==============  String ================= */
 #define BT_COMMON_PKG          "ug-setting-bluetooth-efl"
@@ -48,12 +49,16 @@ extern "C" {
        dgettext(BT_COMMON_PKG, "IDS_BT_BODY_BLUETOOTH_AVAILABLE")
 
 /*==============  Image ================= */
-#define ICONDIR        "/opt/apps/org.tizen.bluetooth-share-ui/res/images"
+#define ICONDIR                "org.tizen.bluetooth-share-ui/res/images"
+
 #define BT_ICON_PATH_MAX       256
 
-#define BT_ICON_QP_SEND                ICONDIR"/Q02_icon_BT_transmit.png"
-#define BT_ICON_QP_RECEIVE     ICONDIR"/Q02_icon_BT_receive.png"
-#define BT_ICON_QP_BT_ON               ICONDIR"/Q02_Notification_bluetooth.png"
+#define BT_ICON_QP_SEND                tzplatform_mkpath3(TZ_SYS_RW_APP, ICONDIR, \
+                                                       "/Q02_icon_BT_transmit.png")
+#define BT_ICON_QP_RECEIVE     tzplatform_mkpath3(TZ_SYS_RW_APP, ICONDIR, \
+                                                       "/Q02_icon_BT_receive.png")
+#define BT_ICON_QP_BT_ON       tzplatform_mkpath3(TZ_SYS_RW_APP, ICONDIR, \
+                                                       "/Q02_Notification_bluetooth.png")
 
 
 #ifdef __cplusplus