update directory path for migration 92/65092/1 accepted/tizen/common/20160414.142705 accepted/tizen/ivi/20160414.092131 accepted/tizen/mobile/20160414.092153 accepted/tizen/tv/20160414.092112 accepted/tizen/wearable/20160414.092106 submit/tizen/20160414.052052
authorky85.kim <ky85.kim@samsung.com>
Thu, 7 Apr 2016 07:49:19 +0000 (16:49 +0900)
committerky85.kim <ky85.kim@samsung.com>
Thu, 7 Apr 2016 07:49:43 +0000 (16:49 +0900)
Change-Id: I40dc8958b5a80cb3bd1fceee5bb26a364670237c
Signed-off-by: ky85.kim <ky85.kim@samsung.com>
CMakeLists.txt
common/vc_defs.h
packaging/voice-control.spec
server/vcd_engine_agent.c
server/vcd_main.h

index 1158e48..acadb9d 100644 (file)
@@ -54,8 +54,8 @@ ADD_SUBDIRECTORY(client)
 ADD_SUBDIRECTORY(server)
 
 ## config ##
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-config.xml DESTINATION ${LIBDIR}/voice/vc/1.0)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-config.xml DESTINATION ${TZ_SYS_RO_SHARE}/voice/vc/1.0)
 
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.vcserver.service DESTINATION /usr/share/dbus-1/services)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.vcserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services)
 
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-server.conf DESTINATION /etc/dbus-1/session.d)
index 53e1ba6..268a2d8 100644 (file)
@@ -141,21 +141,21 @@ extern "C" {
 * Defines for configuration
 *******************************************************************************************/
 
-#define VC_DAEMON_PATH                 "/usr/bin/vc-daemon"
+#define VC_DAEMON_PATH                 tzplatform_mkpath(TZ_SYS_BIN, "vc-daemon")
 
-#define VC_CONFIG_DEFAULT              VOICE_LIBDIR"/voice/vc/1.0/vc-config.xml"
+#define VC_CONFIG_DEFAULT              tzplatform_mkpath(TZ_SYS_RO_SHARE, "voice/vc/vc-config.xml")
 
-#define VC_CONFIG_BASE                 tzplatform_mkpath(TZ_USER_HOME, "share/.voice")
-#define VC_CONFIG                      tzplatform_mkpath(TZ_USER_HOME, "share/.voice/vc-config.xml")
+#define VC_DEFAULT_BASE                        tzplatform_mkpath(TZ_SYS_RO_SHARE, "voice/vc/1.0")
 
-#define VC_DEFAULT_ENGINE_INFO         VOICE_LIBDIR"/voice/vc/1.0/engine-info"
+#define VC_DEFAULT_ENGINE              tzplatform_mkpath(TZ_SYS_RO_SHARE, "voice/vc/1.0/engine")
 
-#define VC_NO_FOREGROUND_PID           0
+#define VC_DEFAULT_ENGINE_SETTING      tzplatform_mkpath(TZ_SYS_RO_SHARE, "voice/vc/1.0/engine-setting")
 
-#define VC_BASE_LANGUAGE               "en_US"
+#define VC_DEFAULT_ENGINE_INFO         tzplatform_mkpath(TZ_SYS_RO_SHARE, "voice/vc/1.0/engine-info")
 
-#define VC_RETRY_COUNT                 5
+#define VC_CONFIG_BASE                 tzplatform_mkpath(TZ_USER_HOME, "share/.voice")
 
+#define VC_CONFIG                      tzplatform_mkpath(TZ_USER_HOME, "share/.voice/vc-config.xml")
 
 #define VC_RUNTIME_INFO_ROOT           tzplatform_mkpath(TZ_USER_HOME, "share/.voice/vc")
 
@@ -169,6 +169,9 @@ extern "C" {
 
 #define VC_RUNTIME_INFO_CLIENT         tzplatform_mkpath(TZ_USER_HOME, "share/.voice/vc/vc-client-info.xml")
 
+#define VC_NO_FOREGROUND_PID           0
+#define VC_BASE_LANGUAGE               "en_US"
+#define VC_RETRY_COUNT                 5
 #define VC_RUNTIME_INFO_NO_FOREGROUND  -1
 
 #define VC_FEATURE_PATH                        "tizen.org/feature/speech.control"
index c54ffaf..cf2580a 100644 (file)
@@ -84,13 +84,14 @@ export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 %endif
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
+cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
+       -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE
 make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-install LICENSE %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
+install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
 
 %make_install
 
@@ -109,10 +110,10 @@ mkdir -p %{_libdir}/voice/vc
 %{_libdir}/libvc_widget.so
 %{_libdir}/libvc_manager.so
 %{_bindir}/vc-daemon
-%{_libdir}/voice/vc/1.0/vc-config.xml
-/usr/share/dbus-1/services/org.tizen.voice*
+%{TZ_SYS_RO_SHARE}/voice/vc/1.0/vc-config.xml
+%{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice*
+%{TZ_SYS_RO_SHARE}/license/%{name}
 /etc/dbus-1/session.d/vc-server.conf
-/usr/share/license/%{name}
 
 %files devel
 %manifest %{name}-devel.manifest
index 3b99ae5..cdba7fe 100644 (file)
@@ -293,7 +293,6 @@ int __internal_get_engine_info(const char* filepath, vcengine_info_s** info)
        void* handle;
 
        handle = dlopen(filepath, RTLD_LAZY);
-
        if (!handle) {
                SLOG(LOG_WARN, TAG_VCD, "[Engine Agent] Invalid engine : %s", filepath);
                return -1;
@@ -389,7 +388,7 @@ int __internal_update_engine_list()
        struct dirent entry;
        struct dirent *dirp = NULL;
 
-       dp  = opendir(ENGINE_DIRECTORY_DEFAULT);
+       dp  = opendir(VC_DEFAULT_ENGINE);
        if (NULL != dp) {
                do {
                        ret = readdir_r(dp, &entry, &dirp);
@@ -403,11 +402,11 @@ int __internal_update_engine_list()
                                char* filepath = NULL;
                                int filesize = 0;
 
-                               filesize = strlen(ENGINE_DIRECTORY_DEFAULT) + strlen(dirp->d_name) + 5;
+                               filesize = strlen(VC_DEFAULT_ENGINE) + strlen(dirp->d_name) + 5;
                                filepath = (char*)calloc(filesize, sizeof(char));
 
                                if (NULL != filepath) {
-                                       snprintf(filepath, filesize, "%s/%s", ENGINE_DIRECTORY_DEFAULT, dirp->d_name);
+                                       snprintf(filepath, filesize, "%s/%s", VC_DEFAULT_ENGINE, dirp->d_name);
                                } else {
                                        SLOG(LOG_ERROR, TAG_VCD, "[Engine Agent ERROR] Memory not enough!!");
                                        continue;
index 51af598..b56650c 100644 (file)
@@ -41,15 +41,6 @@ extern "C" {
 
 #define TAG_VCD "vcd"
 
-#define BASE_DIRECTORY_DEFAULT                 "/usr/lib/voice/vc/1.0"
-#define ENGINE_DIRECTORY_DEFAULT               "/usr/lib/voice/vc/1.0/engine"
-#define ENGINE_DIRECTORY_DEFAULT_SETTING       "/usr/lib/voice/vc/setting"
-
-#define CONFIG_DIRECTORY                       "/opt/home/app/.voice"
-
-#define ENGINE_DIRECTORY_DOWNLOAD              "/opt/usr/voice/vc/engine"
-#define ENGINE_DIRECTORY_DOWNLOAD_SETTING      "/opt/usr/voice/vc/setting"
-
 /* for debug message */
 /* #define RECORDER_DEBUG */
 #define CLIENT_DATA_DEBUG