// 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);
}
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
{
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");