* errors (related to usage of not allowed characters in given places).
*/
typedef DPL::String NcnameType, NmtokenType, AnySimpleType, LangType;
-typedef DPL::String OperationType, MimeType, UriType, TypeType, PackageType;
+typedef DPL::String OperationType, MimeType, UriType, TypeType, PackageType, RootPathType;
typedef DPL::OptionalString InstallLocationType, CategoriesType;
typedef DPL::String AppCategoryType;
typedef DPL::OptionalString KeyType, ValueType;
{
this->version = x;
}
+ void setRootPath(const RootPathType &x)
+ {
+ this->rootPath = x;
+ }
void setStoreClientId(const NcnameType &x)
{
this->storeClientId= x;
NcnameType package;
PackageType type;
NmtokenType version;
+ RootPathType rootPath;
std::list<Account> account;
PrivilegeType privileges;
NcnameType storeClientId;
<< "[" << DPL::GetErrnoString(error) << "]");
}
#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) {
+ LogPedantic("Failed to make a symbolic name for a file "
+ << "[" << DPL::GetErrnoString(errno) << "]");
+ }
+ }
+ }
+
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) {
+ LogDebug("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)
+ {
+ LogError("Adding UiApplication on xml is failed.");
+ isAdded = false;
+ return false;
+ }
+}
+
void TaskManifestFile::stepBackupIconFiles()
{
LogDebug("Backup Icon Files");
void TaskManifestFile::setWidgetManifest(Manifest & manifest)
{
manifest.setPackage(m_context.widgetConfig.tzPkgid);
+ manifest.setRootPath(DPL::FromUTF8String(
+ m_context.locations->getPackageInstallationDir()));
if (!!m_context.widgetConfig.version) {
manifest.setVersion(*m_context.widgetConfig.version);
void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
{
- FOREACH(it, m_context.widgetConfig.configInfo.m_livebox) {
+ ConfigParserData::LiveboxList& liveboxList =
+ m_context.widgetConfig.configInfo.m_livebox;
+
+ if (liveboxList.empty()) {
+ LogDebug("no livebox");
+ return;
+ }
+
+ if (!addBoxUiApplication(manifest)) {
+ LogDebug("error during adding UiApplication for d-box");
+ return;
+ }
+
+ FOREACH(it, liveboxList) {
LogDebug("setLiveBoxInfo");
LiveBoxInfo liveBox;
DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo> ConfigInfo = *it;