Merge remote-tracking branch 'rsa/tizen_2.2' into tizen accepted/tizen/20131014.173528 submit/tizen/20131014.115554
authorHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:45:14 +0000 (20:45 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:45:14 +0000 (20:45 +0900)
Conflicts:
src/jobs/widget_install/task_manifest_file.cpp

Change-Id: Ib3bf102458e896d99bf9b8238de29ece101b29c8

1  2 
packaging/wrt-installer.spec
src/CMakeLists.txt
src/configuration_parser/widget_parser.cpp
src/jobs/widget_install/manifest.cpp
src/jobs/widget_install/manifest.h
src/jobs/widget_install/task_encrypt_resource.cpp
src/jobs/widget_install/task_manifest_file.cpp

@@@ -1,14 -1,12 +1,14 @@@
 -#git:framework/web/wrt-installer
 +%bcond_with livebox
 +%bcond_with decrypt
  Name:       wrt-installer
  Summary:    Installer for tizen Webruntime
- Version:    0.1.128
+ Version:    0.1.137
  Release:    1
  Group:      Development/Libraries
 -License:    Apache License, Version 2.0
 -URL:        N/A
 +License:    Apache-2.0
  Source0:    %{name}-%{version}.tar.gz
 +Source100:  wrt-preinstall-widgets.service
 +Source1001:   wrt-installer.manifest
  BuildRequires:  cmake
  BuildRequires:  edje-tools
  BuildRequires:  pkgconfig(appsvc)
Simple merge
Simple merge
Simple merge
index 13d2780,47898ff..c874150
mode 100644,100755..100755
@@@ -117,18 -115,15 +117,19 @@@ TaskManifestFile::TaskManifestFile(Inst
          // for widget update.
          AddStep(&TaskManifestFile::stepBackupIconFiles);
          AddStep(&TaskManifestFile::stepCopyIconFiles);
 +#ifdef LIVEBOX
          AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
 +#endif
+         AddStep(&TaskManifestFile::stepCopyAccountIconFiles);
          AddStep(&TaskManifestFile::stepCreateExecFile);
          AddStep(&TaskManifestFile::stepGenerateManifest);
          AddAbortStep(&TaskManifestFile::stepAbortIconFiles);
      } else {
          AddStep(&TaskManifestFile::stepCopyIconFiles);
 +#ifdef LIVEBOX
          AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
 +#endif
+         AddStep(&TaskManifestFile::stepCopyAccountIconFiles);
          AddStep(&TaskManifestFile::stepCreateExecFile);
          AddStep(&TaskManifestFile::stepGenerateManifest);
      }
@@@ -363,10 -358,31 +365,32 @@@ void TaskManifestFile::stepCopyLiveboxF
          InstallerContext::INSTALL_COPY_LIVEBOX_FILES,
          "Livebox files copy Finished");
  }
 +#endif // LIVEBOX
  
- void TaskManifestFile::copyDynamicBoxFile(const std::string& sourceFile,
-                                           const std::string& targetFile)
+ void TaskManifestFile::stepCopyAccountIconFiles()
+ {
+     _D("Copy Account icon files");
+     WrtDB::ConfigParserData::AccountProvider account =
+         m_context.widgetConfig.configInfo.accountProvider;
+     if (account.m_iconSet.empty()) {
+         _D("Widget doesn't contain Account");
+         return;
+     }
+     FOREACH(it, account.m_iconSet) {
+         std::string sourceFile = m_context.locations->getSourceDir() +
+                                  '/' +
+                                  DPL::ToUTF8String(it->second);
+         std::string targetFile = m_context.locations->getSharedResourceDir() +
+                                  '/' +
+                                  DPL::ToUTF8String(it->second);
+         copyFile(sourceFile, targetFile);
+     }
+ }
+ void TaskManifestFile::copyFile(const std::string& sourceFile,
+                                 const std::string& targetFile)
  {
      Try
      {
@@@ -676,9 -692,8 +700,10 @@@ void TaskManifestFile::writeManifest(co
      setWidgetOtherInfo(uiApp);
      setAppCategory(uiApp);
      setMetadata(uiApp);
-     setLiveBoxInfo(manifest);
 +#ifdef LIVEBOX
+     // move to the last of this procedure
+     //setLiveBoxInfo(manifest);
 +#endif
      setAccount(manifest);
      setPrivilege(manifest);
      manifest.addUiApplication(uiApp);
          setMetadata(uiApp);
          manifest.addUiApplication(uiApp);
      }
++#ifdef LIVEBOX
+     // TODO: Must fix again with right method
+     // The mainapp attiribute must be set
+     // when there are multiple uiapps in mainfest
+     setLiveBoxInfo(manifest);
++#endif
  #else
      //default widget content
      setWidgetExecPath(uiApp);
      setAppControlsInfo(uiApp);
      setAppCategory(uiApp);
      setMetadata(uiApp);
-     setLiveBoxInfo(manifest);
 +#ifdef LIVEBOX
+     // move to the last of this procedure
+     //setLiveBoxInfo(manifest);
 +#endif
      setAccount(manifest);
      setPrivilege(manifest);
  
      manifest.addUiApplication(uiApp);
++#ifdef LIVEBOX
+     // TODO: Must fix again with right method
+     // The mainapp attiribute must be set
+     // when there are multiple uiapps in mainfest
+     setLiveBoxInfo(manifest);
+ #endif
 +#endif
  
      manifest.generate(path);
      _D("Manifest file serialized");