[Install Location: Part 2] WGT file unzip to package directory (/opt/usr/apps/[pkgid...
authorSoyoung Kim <sy037.kim@samsung.com>
Fri, 18 Oct 2013 09:19:55 +0000 (18:19 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 31 Oct 2013 10:42:53 +0000 (10:42 +0000)
commitc952c0d74a1da5d7760ba7f2136ce4abca678220
tree0f76a8980356d6dc5358bb4b6b1a2af307ca2899
parentb9557dfb1fc92d450d38c4744b2508a2584995e2
[Install Location: Part 2] WGT file unzip to package directory (/opt/usr/apps/[pkgid]) instead of temporary directory

[Issue#]   P130919-00555
[Problem]  web app install to internal storage even if install location is set
           "SD card" from setting menu.
[Cause]    There is an issue to process getting install location.
           (Before parsing config.xml, installer cannot get install location info.)
[Solution] - Parsing config.xml should be done before unzip wgt.
           - So parsing config.xml is separated before unzip.
[Remarks] Installer, therefore, should implement below install location spec.
    * Auto: Get setting value about default storage at setting menu.
      - If user set "Device memory" try internal storage.
        If fails, try external storage.
      - If user set "SD card" try SD card.
        If fails, try internal storage.
    * Internal-only: Try internal storage.
      - If there is no space in internal memory, installation is failed.
    * Prefer-external: Try external storage.
      - If SD card is not available, try internal storage.

    There are three parts for implementation.
     * Part 1: This patch is for separating parse config.xml before unzipping wgt file.
     * Part 2: WGT file unzip to directory package directory
               (/opt/usr/apps/[pkgid]) instead of temporary directory.
     * Part 3: Implement about install location (auto, internal only prefer-external)

[Verification]
    SD card should be attached in the device for this feature.
    -  First> Normal and Hybrid web app can be installed without error.
    - Second> WebApp should be installed into device memory or SD card depending
              on install-location

    1. Install-location: internal-only
          => should be installed into device memory
    2. Install-location: prefer-external
          1) SD card is enabled => into SD card.
          2) SD card is disabled => into device memory.
    3. Install-location:
       * Auto and default storage is "Device Memory"
          1) into device memory.
          2) If device Memory is full = > into SD card.
       * Auto and default storage is "SD card"
          1) into SD card
          2) If SD card isn't available => into device memory.
[SCMRequest] N/A

Change-Id: Iffbd7f35e3c9e9d03feeb987d4d7762f61c6c15d
18 files changed:
src/CMakeLists.txt
src/jobs/widget_install/job_widget_install.cpp
src/jobs/widget_install/task_certify.cpp
src/jobs/widget_install/task_certify_level.cpp
src/jobs/widget_install/task_configuration.cpp
src/jobs/widget_install/task_configuration.h
src/jobs/widget_install/task_encrypt_resource.cpp
src/jobs/widget_install/task_file_manipulation.cpp
src/jobs/widget_install/task_file_manipulation.h
src/jobs/widget_install/task_prepare_files.cpp
src/jobs/widget_install/task_process_config.cpp
src/jobs/widget_install/task_user_data_manipulation.cpp [new file with mode: 0644]
src/jobs/widget_install/task_user_data_manipulation.h [new file with mode: 0644]
src/jobs/widget_install/widget_install_context.h
src/jobs/widget_install/widget_unzip.cpp
src/jobs/widget_install/widget_unzip.h
src/misc/widget_location.cpp
src/misc/widget_location.h