AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
AddStep(&TaskManifestFile::stepCreateExecFile);
AddStep(&TaskManifestFile::stepGenerateManifest);
- AddStep(&TaskManifestFile::stepParseManifest);
AddAbortStep(&TaskManifestFile::stepAbortIconFiles);
} else {
AddStep(&TaskManifestFile::stepCopyLiveboxFiles);
AddStep(&TaskManifestFile::stepCreateExecFile);
AddStep(&TaskManifestFile::stepGenerateManifest);
- AddStep(&TaskManifestFile::stepParseManifest);
-
- AddAbortStep(&TaskManifestFile::stepAbortParseManifest);
}
}
}
#else
//default widget
- LogInfo("link -s " << clientExeStr << " " << exec);
+ LogDebug("link -s " << clientExeStr << " " << exec);
errno = 0;
if (symlink(clientExeStr.c_str(), exec.c_str()) != 0)
{
void TaskManifestFile::backupIconFiles()
{
- LogInfo("Backup Icon Files");
+ LogDebug("Backup Icon Files");
std::ostringstream b_icon_dir;
b_icon_dir << backup_dir.str() << "icons";
commit_manifest = destFile.str();
LogDebug("Commiting manifest file : " << commit_manifest);
- m_context.job->UpdateProgress(
- InstallerContext::INSTALL_CREATE_MANIFEST,
- "Widget Manifest Creation Finished");
-}
-
-void TaskManifestFile::stepParseManifest()
-{
- int code = 0;
- char* updateTags[3] = {NULL, };
-
- if (!m_context.mode.removable) {
- updateTags[0] = "preload=false";
- updateTags[1] = "removable=false";
- updateTags[2] = NULL;
-
- }
-
commitManifest();
- if (m_context.isUpdateMode || (
- m_context.mode.rootPath == InstallMode::RootPath::RO
- && m_context.mode.installTime == InstallMode::InstallTime::PRELOAD
- && m_context.mode.extension == InstallMode::ExtensionType::DIR)) {
-
- if (m_context.widgetConfig.packagingType != PKG_TYPE_HYBRID_WEB_APP) {
- code = pkgmgr_parser_parse_manifest_for_upgrade(
- commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
-
- if (code != 0) {
- LogError("Manifest parser error: " << code);
- ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
- }
- }
- } else {
- code = pkgmgr_parser_parse_manifest_for_installation(
- commit_manifest.c_str(), (updateTags[0] == NULL) ? NULL : updateTags);
-
- if (code != 0) {
- LogError("Manifest parser error: " << code);
- ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
- }
- }
-
m_context.job->UpdateProgress(
- InstallerContext::INSTALL_CREATE_MANIFEST,
- "Widget Manifest Parsing Finished");
- LogDebug("Manifest parsed");
+ InstallerContext::INSTALL_CREATE_MANIFEST,
+ "Widget Manifest Creation Finished");
}
void TaskManifestFile::commitManifest()
if (!(m_context.mode.rootPath == InstallMode::RootPath::RO &&
m_context.mode.installTime == InstallMode::InstallTime::PRELOAD
&& m_context.mode.extension == InstallMode::ExtensionType::DIR)) {
- LogInfo("cp " << manifest_file << " " << commit_manifest);
+ LogDebug("cp " << manifest_file << " " << commit_manifest);
DPL::FileInput input(DPL::ToUTF8String(manifest_file));
DPL::FileOutput output(commit_manifest);
DPL::String name = (!!m_context.widgetConfig.configInfo.authorName ?
*m_context.widgetConfig.configInfo.authorName : L"");
manifest.addAuthor(Author(email, href, L"", name));
+
+ if (!m_context.callerPkgId.empty()) {
+ manifest.setStoreClientId(m_context.callerPkgId);
+ }
}
void TaskManifestFile::setWidgetOtherInfo(UiApplication & uiApp)
m_context.widgetConfig.configInfo.appControlList;
if (appControlList.empty()) {
- LogInfo("Widget doesn't contain app control");
+ LogDebug("Widget doesn't contain app control");
return;
}
m_context.widgetConfig.configInfo.categoryList;
if (categoryList.empty()) {
- LogInfo("Widget doesn't contain application category");
+ LogDebug("Widget doesn't contain application category");
return;
}
FOREACH(it, categoryList) {
m_context.widgetConfig.configInfo.metadataList;
if (metadataList.empty()) {
- LogInfo("Web application doesn't contain metadata");
+ LogDebug("Web application doesn't contain metadata");
return;
}
FOREACH(it, metadataList) {
}
}
-void TaskManifestFile::stepAbortParseManifest()
-{
- LogError("[Parse Manifest] Abroting....");
-
- int code = pkgmgr_parser_parse_manifest_for_uninstallation(
- DPL::ToUTF8String(manifest_file).c_str(), NULL);
-
- if (0 != code) {
- LogWarning("Manifest parser error: " << code);
- ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
- }
- int ret = unlink(DPL::ToUTF8String(manifest_file).c_str());
- if (0 != ret) {
- LogWarning("No manifest file found: " << manifest_file);
- }
-}
-
void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
{
FOREACH(it, m_context.widgetConfig.configInfo.m_livebox) {
- LogInfo("setLiveBoxInfo");
+ LogDebug("setLiveBoxInfo");
LiveBoxInfo liveBox;
DPL::Optional<WrtDB::ConfigParserData::LiveboxInfo> ConfigInfo = *it;
DPL::String appid = m_context.widgetConfig.tzAppid;
if (ConfigInfo->m_boxInfo.m_boxSrc.empty() ||
ConfigInfo->m_boxInfo.m_boxSize.empty())
{
- LogInfo("Widget doesn't contain box");
+ LogDebug("Widget doesn't contain box");
return;
} else {
BoxInfoType box;
AccountProviderType provider;
if (account.m_iconSet.empty()) {
- LogInfo("Widget doesn't contain Account");
+ LogDebug("Widget doesn't contain Account");
return;
}
if (account.m_multiAccountSupport) {
- provider.multiAccount = L"ture";
+ provider.multiAccount = L"true";
} else {
provider.multiAccount = L"false";
}
manifest.addPrivileges(privilege);
}
+void TaskManifestFile::StartStep()
+{
+
+}
+
+void TaskManifestFile::EndStep()
+{
+
+}
} //namespace WidgetInstall
} //namespace Jobs