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)
* 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")
#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"
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
%{_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
void* handle;
handle = dlopen(filepath, RTLD_LAZY);
-
if (!handle) {
SLOG(LOG_WARN, TAG_VCD, "[Engine Agent] Invalid engine : %s", filepath);
return -1;
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);
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;
#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