_E("Failed to make a symbolic name for a file [%s]", DPL::GetErrnoString(error).c_str());
}
#endif
+ // creation of box symlink
+ ConfigParserData::LiveboxList& liveboxList =
+ m_context.widgetConfig.configInfo.m_livebox;
+ if (!liveboxList.empty()) {
+ std::string boxExec = "/usr/bin/WebProcess";
+ std::string boxSymlink = m_context.locations->getExecFile();
+ boxSymlink += ".d-box";
+
+ if (symlink(boxExec.c_str(), boxSymlink.c_str()) != 0) {
+ if (errno) {
+ _E("Failed to make a symbolic name for a file [%s]", DPL::GetErrnoString(errno).c_str());
+ }
+ }
+ }
+
m_context.job->UpdateProgress(
InstallerContext::INSTALL_CREATE_EXECFILE,
"Widget execfile creation Finished");
targetFile << (**boxIt).m_liveboxId << ".";
targetFile << DPL::ToUTF8String((*sizeIt).m_size) << "." << DEFAULT_PREVIEW_NAME;
- DynamicBoxFileCopy(sourceFile.str(), targetFile.str());
+ copyDynamicBoxFile(sourceFile.str(), targetFile.str());
// clear stream objects
sourceFile.str("");
targetFile << m_context.locations->getSharedDataDir() << "/";
targetFile << (**boxIt).m_liveboxId << "." << DEFAULT_ICON_NAME;
- DynamicBoxFileCopy(sourceFile.str(), targetFile.str());
+ copyDynamicBoxFile(sourceFile.str(), targetFile.str());
// clear stream objects
sourceFile.str("");
"Livebox files copy Finished");
}
-void TaskManifestFile::DynamicBoxFileCopy(const std::string& sourceFile,
+void TaskManifestFile::copyDynamicBoxFile(const std::string& sourceFile,
const std::string& targetFile)
{
Try
}
}
+bool TaskManifestFile::addBoxUiApplication(Manifest& manifest)
+{
+ UiApplication uiApp;
+ std::string postfix = ".d-box";
+ static bool isAdded = false;
+
+ Try
+ {
+ if (isAdded) {
+ _D("UiApplication for d-box is already added");
+ return false;
+ }
+ uiApp.setNodisplay(true);
+ uiApp.setTaskmanage(false);
+ uiApp.setMultiple(false);
+ setWidgetName(manifest, uiApp);
+ setWidgetIcons(uiApp);
+
+ // appid for box is like [webapp id].d-box
+ setWidgetIds(manifest, uiApp, postfix);
+ // executable path for box is like [app path]/bin/[webapp id].d-box
+ setWidgetExecPath(uiApp, postfix);
+ manifest.addUiApplication(uiApp);
+ isAdded = true;
+
+ return true;
+ }
+ Catch(DPL::Exception)
+ {
+ _E("Adding UiApplication on xml is failed.");
+ isAdded = false;
+ return false;
+ }
+}
+
void TaskManifestFile::stepBackupIconFiles()
{
_D("Backup Icon Files");
void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
{
- FOREACH(it, m_context.widgetConfig.configInfo.m_livebox) {
- _D("setLiveBoxInfo");
+ ConfigParserData::LiveboxList& liveboxList =
+ m_context.widgetConfig.configInfo.m_livebox;
+
+ if (liveboxList.empty()) {
+ _D("no livebox");
+ return;
+ }
+
+ if (!addBoxUiApplication(manifest)) {
+ _D("error during adding UiApplication for d-box");
+ return;
+ }
+
+ FOREACH(it, liveboxList) {
+ LogDebug("setLiveBoxInfo");
LiveBoxInfo liveBox;
DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo> ConfigInfo = *it;
DPL::String appid = m_context.widgetConfig.tzAppid;