From 43e199ce97b7ba31d3efbe7e96a78279ee30bc5f Mon Sep 17 00:00:00 2001 From: Andrey Klimenko Date: Thu, 14 Apr 2016 16:44:27 +0300 Subject: [PATCH] TizenRefApp-6075 - Done with gbs-build, also taken into account new path for wallpapers(used SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN system setting to get proper path) Change-Id: Id1811f0668d9978e624520cb06e9046aee7980f1 Signed-off-by: Andrey Klimenko --- CMakeLists.txt | 20 ++------------------ packaging/org.tizen.wallpaper-ui-service.spec | 1 - res/CMakeLists.txt | 8 ++++---- src/wallpaper-ui-service.c | 11 ++++++----- 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8f8691..5920754 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,13 +22,12 @@ SET(SRCS INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/res - ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/inc ) SET(CMAKE_SKIP_BUILD_RPATH TRUE) MESSAGE("BRANCH : ${BRANCH}") - IF("${BRANCH}" STREQUAL "PRIVATE") INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED @@ -47,7 +46,6 @@ pkg_check_modules(pkgs REQUIRED wallpaper-service core-samsung-log-client edbus - libtzplatform-config ) ELSE() INCLUDE(FindPkgConfig) @@ -64,7 +62,6 @@ pkg_check_modules(pkgs REQUIRED notification capi-content-media-content edbus - libtzplatform-config ) ENDIF() @@ -77,14 +74,6 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_C_FLAGS_RELEASE "-O2") -#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions -g") - -#SET(CMAKE_C_COMPILER "/scratchbox/devkits/sbwrap") -#SET(CMAKE_C_COMPILER_ARG1 "/home/serena/working/wallpaper-ui-service.trace /scratchbox/compilers/bin/gcc gcc") - - -#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -g -O2") - ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"") ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") @@ -94,7 +83,6 @@ ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"") ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") ADD_DEFINITIONS("-DHOME_KEY_EMULATION") -#ADD_DEFINITIONS("-DFILE_DEBUG") ADD_DEFINITIONS("-D_DLOG_USED") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie") @@ -106,9 +94,5 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.wallpaper-ui-service.xml DESTINATION INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) -ADD_SUBDIRECTORY(res) -IF("${BRANCH}" STREQUAL "PRIVATE") ADD_SUBDIRECTORY(po) -ELSE() -ADD_SUBDIRECTORY(po_sdk) -ENDIF() +ADD_SUBDIRECTORY(res) diff --git a/packaging/org.tizen.wallpaper-ui-service.spec b/packaging/org.tizen.wallpaper-ui-service.spec index 4b73882..d20043e 100644 --- a/packaging/org.tizen.wallpaper-ui-service.spec +++ b/packaging/org.tizen.wallpaper-ui-service.spec @@ -34,7 +34,6 @@ BuildRequires: cmake BuildRequires: edje-tools BuildRequires: gettext-tools BuildRequires: hash-signer -BuildRequires: pkgconfig(libtzplatform-config) Requires(post): /usr/bin/vconftool diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt index 49e518b..af524ab 100644 --- a/res/CMakeLists.txt +++ b/res/CMakeLists.txt @@ -1,7 +1,7 @@ message("!!! ADD_CUSTOM_TARGET") ADD_CUSTOM_TARGET(popup-wallpaper.edj - COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/icons - -sd ${CMAKE_CURRENT_SOURCE_DIR}/sounds + COMMAND edje_cc -id ${PROJECT_SOURCE_DIR}/edje/images + -sd ${PROJECT_SOURCE_DIR}/edje/sounds ${CMAKE_CURRENT_SOURCE_DIR}/edje/popup-wallpaper.edc ${CMAKE_CURRENT_BINARY_DIR}/edje/popup-wallpaper.edj DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/edje/popup-wallpaper.edc @@ -12,8 +12,8 @@ ADD_DEPENDENCIES(${PROJECT_NAME} popup-wallpaper.edj) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/edje/popup-wallpaper.edj DESTINATION ${EDJDIR}) ADD_CUSTOM_TARGET(button_customized_theme.edj - COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/icons - -sd ${CMAKE_CURRENT_SOURCE_DIR}/sounds + COMMAND edje_cc -id ${PROJECT_SOURCE_DIR}/edje/images + -sd ${PROJECT_SOURCE_DIR}/edje/sounds ${CMAKE_CURRENT_SOURCE_DIR}/edje/button_customized_theme.edc ${CMAKE_CURRENT_BINARY_DIR}/edje/button_customized_theme.edj DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/edje/button_customized_theme.edc diff --git a/src/wallpaper-ui-service.c b/src/wallpaper-ui-service.c index 99df454..3c8c972 100644 --- a/src/wallpaper-ui-service.c +++ b/src/wallpaper-ui-service.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "wallpaper-ui-service.h" #include "wallpaper-ui-service-main.h" @@ -704,12 +705,12 @@ const char *wallpaper_ui_service_get_settings_wallpapers_path() { if (!_g_wallpapersPath) { - char *sharedRes = NULL; + char* path = NULL; + system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &path); _g_wallpapersPath = (char *)calloc(1, MAX_LENGTH_STRING); - app_manager_get_shared_resource_path(SETTINGS_APP_ID, &sharedRes); - snprintf(_g_wallpapersPath, MAX_LENGTH_STRING, "%ssettings/Wallpapers/", sharedRes); - free(sharedRes); - WALLPAPERUI_DBG("wallpapersPath = %s", _g_wallpapersPath); + char* dir_name = dirname(path); + snprintf(_g_wallpapersPath, MAX_LENGTH_STRING, "%s/", dir_name); + WALLPAPERUI_DBG("_g_wallpapersPath = %s", _g_wallpapersPath); } return _g_wallpapersPath; } -- 2.7.4