TizenRefApp-5009 Update install paths for wallpaper-ui-service. Changed some directories. 63/52963/1
authorAndriy Kotsyuba <a.kotsyuba@samsung.com>
Mon, 30 Nov 2015 09:13:52 +0000 (11:13 +0200)
committerAndriy Kotsyuba <a.kotsyuba@samsung.com>
Mon, 30 Nov 2015 09:13:52 +0000 (11:13 +0200)
Change-Id: Ib3789b6b10d4bff2f20c7b89301a765b1116eeb9
Signed-off-by: Andriy Kotsyuba <a.kotsyuba@samsung.com>
include/wallpaper-ui-service-main.h
org.tizen.wallpaper-ui-service.manifest
packaging/org.tizen.wallpaper-ui-service.spec
src/wallpaper-ui-service-main.c

index a300dde..96fc2f9 100755 (executable)
@@ -55,7 +55,7 @@ typedef struct {
 #endif
 
 #ifndef WALLPAPER_TXT_FILE
-#define WALLPAPER_TXT_FILE tzplatform_mkpath(TZ_USER_SHARE, "lockscreen/wallpaper_list/lockscreen_selected_images.txt")
+#define WALLPAPER_TXT_FILE tzplatform_mkpath(TZ_SYS_SHARE, "lockscreen/wallpaper_list/lockscreen_selected_images.txt")
 #endif
 
 
index e766b49..a9fa896 100755 (executable)
@@ -2,15 +2,6 @@
        <define>
                <domain name="org.tizen.wallpaper-ui-service"/>
        </define>
-       <assign>
-               <filesystem path="/usr/apps/org.tizen.wallpaper-ui-service/res/locale/*" label="_" />
-               <filesystem path="/usr/share/locale/*" label="_" />
-               <filesystem path="/usr/apps/org.tizen.wallpaper-ui-service/author-signature.xml" label="_"/>
-               <filesystem path="/usr/apps/org.tizen.wallpaper-ui-service/signature1.xml" label="_"/>
-               <filesystem path="/opt/usr/share/lockscreen" label="org.tizen.setting::default-resources" type="transmutable"/>
-               <filesystem path="/opt/usr/share/lockscreen/wallpaper_list" label="org.tizen.setting::default-resources" type="transmutable"/>
-               <filesystem path="/opt/usr/share/lockscreen/wallpaper_list/lockscreen_selected_images.txt" label="org.tizen.setting::default-resources" type="transmutable"/>
-       </assign>
        <request>
                <domain name="org.tizen.wallpaper-ui-service"/>
        </request>
index 6780d3b..c156483 100755 (executable)
@@ -69,17 +69,17 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 
-if [ ! -d %{TZ_USER_SHARE}/lockscreen/wallpaper_list ]
+if [ ! -d %{TZ_SYS_SHARE}/lockscreen/wallpaper_list ]
 then
-       mkdir -p %{buildroot}/%{TZ_USER_SHARE}/lockscreen/wallpaper_list
+       mkdir -p %{buildroot}%{TZ_SYS_SHARE}/lockscreen/wallpaper_list
 fi
 
-mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/license
-cp -f LICENSE %{buildroot}/%{TZ_SYS_SHARE}/license/%{name}
-mkdir -p %{buildroot}/%{PREFIX}/shared
-mkdir -p %{buildroot}/%{PREFIX}/shared/res
-mkdir -p %{buildroot}/%{PREFIX}/data
-mkdir -p %{buildroot}/%{PREFIX}/data/wallpaper
+mkdir -p %{buildroot}%{TZ_SYS_SHARE}/license
+cp -f LICENSE %{buildroot}%{TZ_SYS_SHARE}/license/%{name}
+mkdir -p %{buildroot}%{PREFIX}/shared
+mkdir -p %{buildroot}%{PREFIX}/shared/res
+mkdir -p %{buildroot}%{PREFIX}/data
+mkdir -p %{buildroot}%{PREFIX}/data/wallpaper
 
 %define tizen_sign 1
 %define tizen_sign_base %{TZ_SYS_RO_APP}/%{name}
@@ -92,8 +92,6 @@ rm -rf %{buildroot}
 
 %post
 
-#usr/bin/signing-client/hash-signer-client.sh -a -d -p platform /usr/apps/org.tizen.wallpaper-ui-service
-
 %postun -p /sbin/ldconfig
 
 %files
@@ -114,5 +112,5 @@ rm -rf %{buildroot}
 %attr(-,app,app) %dir %{PREFIX}/data
 %attr(-,app,app) %dir %{PREFIX}/data/wallpaper
 
-%attr(755,app,app)/%{TZ_USER_SHARE}/lockscreen
-%attr(755,app,app)/%{TZ_USER_SHARE}/lockscreen/wallpaper_list
+%attr(755,app,app) /%{TZ_SYS_SHARE}/lockscreen
+%attr(755,app,app) /%{TZ_SYS_SHARE}/lockscreen/wallpaper_list
index df43347..eeb2a8a 100755 (executable)
@@ -32,7 +32,8 @@
 
 
 #define DEFAULT_IMAGE_DIR "/opt/usr/share/settings/Wallpapers/"
-
+#define WALLPAPER_IMAGE_FILE tzplatform_mkpath(TZ_SYS_SHARE, "lockscreen/wallpaper_list%s.jpg")
+#define WALLPAPER_IMAGE_DIR tzplatform_mkpath(TZ_SYS_SHARE, "lockscreen/wallpaper_list%s/%s")
 
 static Elm_Gengrid_Item_Class *gic_for_main = NULL;
 static wallpaper_ui_service_appdata *ad = NULL;
@@ -515,7 +516,7 @@ static Eina_Bool _lockscreen_gallery_scale_job_0(void *data)
                char temp[MAX_LENGTH_LINE] = {0};
                char *p = strrchr(state_data.from[sd->img_idx], '/');
                if (p) {
-                       snprintf(temp, sizeof(temp), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
+                       snprintf(temp, sizeof(temp), WALLPAPER_IMAGE_DIR, p);
                        WALLPAPERUI_DBG("temp = %s", temp);
                        if (strcmp(temp, ad->current_preview_img_path) == 0) {
                                WALLPAPERUI_DBG("homescreen wallppaer do not be changed");
@@ -1188,10 +1189,10 @@ static void _done_to_set_wallpaper()
                                        if (q) {
                                                *q = '\0';
                                        }
-                                       snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s.jpg", filename);
+                                       snprintf(filepath, sizeof(filepath), WALLPAPER_IMAGE_FILE, filename);
                                } else {
                                        WALLPAPERUI_DBG("other image");
-                                       snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
+                                       snprintf(filepath, sizeof(filepath), WALLPAPER_IMAGE_DIR, p);
                                }
                                WALLPAPERUI_DBG("filepath = %s", filepath);
                                if (ad->preview_image_type == WALLPAPER_TYPE_GALLERY) {
@@ -1268,13 +1269,13 @@ static void _done_to_set_wallpaper()
                }
                WALLPAPERUI_DBG("value = %s", value);
 
-               file_list = ecore_file_ls("/opt/usr/share/lockscreen/wallpaper_list");
+               file_list = ecore_file_ls(WALLPAPER_IMAGE_DIR);
                count = eina_list_count(file_list);
                if (count > 1) {
                        for (i = 0; i < count; i++) {
                                temp = (char *)eina_list_nth(file_list, i);
                                if (temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
-                                       snprintf(string, sizeof(string), "/opt/usr/share/lockscreen/wallpaper_list/%s", temp);
+                                       snprintf(string, sizeof(string), WALLPAPER_IMAGE_DIR, temp);
                                        if (strcmp(string, filepath) != 0) {
                                                if (eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
                                                        WALLPAPERUI_DBG("string = %s", string);
@@ -1330,13 +1331,13 @@ static void _lockscreen_gallery_destroy_func()
        }
        WALLPAPERUI_DBG("value = %s", value);
 
-       file_list = ecore_file_ls("/opt/usr/share/lockscreen/wallpaper_list");
+       file_list = ecore_file_ls(WALLPAPER_IMAGE_DIR);
        count = eina_list_count(file_list);
        if (count > 1) {
                for (i = 0; i < count; i++) {
                        temp = (char *)eina_list_nth(file_list, i);
                        if (temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
-                               snprintf(string, sizeof(string), "/opt/usr/share/lockscreen/wallpaper_list/%s", temp);
+                               snprintf(string, sizeof(string), WALLPAPER_IMAGE_DIR, temp);
                                if (strcmp(string, filepath) != 0) {
                                        if (eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
                                                WALLPAPERUI_DBG("string = %s", string);
@@ -1882,7 +1883,7 @@ static void _service_imageviewer_ug_result_cb(app_control_h request, app_control
        if (result == APP_CONTROL_RESULT_SUCCEEDED) {
                char **path_array = NULL;
                int array_length = 0;
-               char *str = "/opt/usr/share/lockscreen/wallpaper_list";
+               char *str = WALLPAPER_IMAGE_DIR;
                int j = 0;
 
                if (app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
@@ -1907,7 +1908,7 @@ static void _service_imageviewer_ug_result_cb(app_control_h request, app_control
 
 
                        if (strncmp(str, path_array[0], strlen(str))) {
-                               WALLPAPERUI_DBG("it is not from /opt/usr/share/lockscreen/wallpaper_list  home screen");
+                               WALLPAPERUI_DBG("it is not from WALLPAPER_IMAGE_DIR/lockscreen/wallpaper_list  home screen");
                                WALLPAPERUI_DBG("home screen path_array[0]=%s", path_array[0]);
                        }
 
@@ -1921,7 +1922,7 @@ static void _service_imageviewer_ug_result_cb(app_control_h request, app_control
 
                        /*set lock icon in main only for first image */
                        if (strncmp(str, path_array[0], strlen(str))) {
-                               WALLPAPERUI_DBG("it is not from /opt/usr/share/lockscreen/wallpaper_list lock screen");
+                               WALLPAPERUI_DBG("it is not from WALLPAPER_IMAGE_DIR/lockscreen/wallpaper_list lock screen");
                                WALLPAPERUI_DBG("lock screen  path_array[0]=%s", path_array[0]);
                        }