Fix hardcoded path 67/61267/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 7 Mar 2016 05:40:14 +0000 (14:40 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 7 Mar 2016 06:13:41 +0000 (15:13 +0900)
Change-Id: I3e3854380ba75288c434091e462591046a682e49

CMakeLists.txt
im_setting_list/input_method_setting_list_ui.cpp
im_setting_selector/input_method_setting_selector_ui.cpp
org.tizen.inputmethod-setting.xml
packaging/org.tizen.inputmethod-setting.spec

index 1985c6b..aa5027e 100644 (file)
@@ -12,9 +12,7 @@ SET(PKGNAME "org.tizen.${PACKAGE}")
 SET(PKGDIR "${PREFIX}/apps/${PKGNAME}")
 SET(BINDIR "${PKGDIR}/bin")
 SET(RESDIR "${PKGDIR}/res")
-#SET(ICONDIR "${RESDIR}/icons")
-SET(ICONDIR "/usr/share/icons/default/small")
-SET(DATADIR "/opt${PREFIX}/data")
+SET(ICONDIR "${TZ_SYS_RO_ICONS}/default/small")
 SET(LOCALEDIR "${RESDIR}/locale")
 
 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
@@ -45,12 +43,11 @@ ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
 ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
-ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
 
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE RENAME ${PKGNAME} DESTINATION /usr/share/license)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.xml DESTINATION /usr/share/packages)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE RENAME ${PKGNAME} DESTINATION ${PREFIX}/share/license)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}-list.png DESTINATION ${ICONDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}-selector.png DESTINATION ${ICONDIR})
 
index 2aaf99b..1fadc54 100644 (file)
 #include <efl_extension.h>
 #include <vector>
 #include <algorithm>
+#include <tzplatform_config.h>
 #include "isf_control.h"
 
-#define IM_SETTING_LIST_PACKAGE                      PACKAGE
-#define IM_SETTING_LIST_LOCALE_DIR                   ("/usr/apps/"PACKAGE_NAME"/res/locale")
+#define IM_SETTING_LIST_PACKAGE                 PACKAGE
+#define IM_SETTING_LIST_LOCALE_DIR              tzplatform_mkpath(TZ_SYS_RO_APP, PACKAGE_NAME"/res/locale")
 #define IM_SETTING_LIST_TITLE                   dgettext(PACKAGE, "IDS_IME_BODY_KEYBOARD")
 #define IM_SETTING_LIST_KEYBOARD_HEADER         dgettext(PACKAGE, "IDS_ST_HEADER_KEYBOARDS")
 #define IM_SETTING_LIST_POPUP_TITLE             dgettext(PACKAGE, "IDS_ST_BODY_ATTENTION")
index b0cbdf5..ee027c8 100644 (file)
 #include <isf_control.h>
 #include <app_control.h>
 #include <algorithm>
+#include <tzplatform_config.h>
 
 #define IM_SETTING_SELECTOR_PACKAGE        PACKAGE
-#define IM_SETTING_SELECTOR_LOCALE_DIR     ("/usr/apps/"PACKAGE_NAME"/res/locale")
+#define IM_SETTING_SELECTOR_LOCALE_DIR     tzplatform_mkpath(TZ_SYS_RO_APP, PACKAGE_NAME"/res/locale")
 #define IM_SETTING_SELECTOR_TITLE          dgettext(PACKAGE, "IDS_ST_HEADER_DEFAULT_KEYBOARD_ABB")
 #define IM_SETTING_SELECT_KEYBOARD         dgettext(PACKAGE, "IDS_IME_BODY_SELECT_KEYBOARD")
 
index 087b4b5..1fe62a8 100644 (file)
@@ -3,15 +3,15 @@
         <label>Keyboard setting</label>
         <author email="shoum.chen@samsung.com" href="www.samsung.com">Shuoming Chen</author>
         <description>Keyboard setting Application</description>
-        <ui-application appid="org.tizen.inputmethod-setting-list" launch_mode="caller" exec="/usr/apps/org.tizen.inputmethod-setting/bin/inputmethod-setting-list" hw-acceleration="use-GL" nodisplay="true" multiple="false" type="capp" taskmanage="false">
+        <ui-application appid="org.tizen.inputmethod-setting-list" launch_mode="caller" exec="inputmethod-setting-list" hw-acceleration="use-GL" nodisplay="true" multiple="false" type="capp" taskmanage="false">
             <category name="http://tizen.org/category/ime-list"/>
-            <icon>/usr/share/icons/default/small/org.tizen.inputmethod-setting-list.png</icon>
+            <icon>org.tizen.inputmethod-setting-list.png</icon>
             <label>IME List</label>
             <label xml:lang="en-us">IME List</label>
         </ui-application>
-        <ui-application appid="org.tizen.inputmethod-setting-selector" launch_mode="single" exec="/usr/apps/org.tizen.inputmethod-setting/bin/inputmethod-setting-selector" hw-acceleration="use-GL" nodisplay="true" multiple="false" type="capp" taskmanage="false">
+        <ui-application appid="org.tizen.inputmethod-setting-selector" launch_mode="single" exec="inputmethod-setting-selector" hw-acceleration="use-GL" nodisplay="true" multiple="false" type="capp" taskmanage="false">
             <category name="http://tizen.org/category/ime-selector"/>
-            <icon>/usr/share/icons/default/small/org.tizen.inputmethod-setting-selector.png</icon>
+            <icon>org.tizen.inputmethod-setting-selector.png</icon>
             <label>IME Selector</label>
             <label xml:lang="en-us">IME Selector</label>
         </ui-application>
index 3a3486a..9974211 100644 (file)
@@ -22,6 +22,7 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  cmake
 BuildRequires:  efl-extension-devel
+BuildRequires:  pkgconfig(libtzplatform-config)
 
 %description
 Setting Application for ISF.
@@ -49,14 +50,16 @@ CXXFLAGS+=" -D_WEARABLE";
 
 rm -rf CMakeFiles
 rm -rf CMakeCache.txt
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+        -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
+        -DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
 make %{?jobs:-j%jobs}
 
 %post
 /sbin/ldconfig
 
-mkdir -p /usr/apps/org.tizen.inputmethod-setting/bin
-mkdir -p /usr/apps/org.tizen.inputmethod-setting/res
+mkdir -p %{TZ_SYS_RO_APP}/%{name}/bin
+mkdir -p %{TZ_SYS_RO_APP}/%{name}/res
 
 %postun -p /sbin/ldconfig
 
@@ -67,10 +70,10 @@ rm -rf %{buildroot}
 mkdir -p %{buildroot}/usr/share/license
 
 %files
-%manifest org.tizen.inputmethod-setting.manifest
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
-/usr/apps/org.tizen.inputmethod-setting/bin/*
-/usr/apps/org.tizen.inputmethod-setting/res/locale/*/LC_MESSAGES/inputmethod-setting.mo
+%{TZ_SYS_RO_APP}/%{name}/bin/*
+%{TZ_SYS_RO_APP}/%{name}/res/locale/*/LC_MESSAGES/inputmethod-setting.mo
 /usr/share/license/*
-/usr/share/packages/org.tizen.inputmethod-setting.xml
-/usr/share/icons/default/small/*
+%{TZ_SYS_RO_ICONS}/default/small/*
+%{TZ_SYS_RO_PACKAGES}/%{name}.xml