#include <widget_install/task_unzip.h>
#include <widget_install/widget_install_errors.h>
#include <widget_install/widget_install_context.h>
+#include <widget_install/job_widget_install.h>
#include <dpl/log/log.h>
#include <dpl/copy.h>
#include <dpl/file_output.h>
#include <dpl/abstract_waitable_input_adapter.h>
+#include <dpl/wrt-dao-ro/global_config.h>
#include <task_commons.h>
-namespace {
+using namespace WrtDB;
+namespace {
struct PathAndFilePair
{
std::string path;
{
// Step succedded, save temporary widget path
m_installerContext.tempWidgetPath = createTempPath();
+
+ if (m_installerContext.widgetConfig.pType == PKG_TYPE_TIZEN_WITHSVCAPP) {
+ std::ostringstream tempRoot;
+ tempRoot << m_installerContext.tempWidgetPath;
+ tempRoot << "/" << GlobalConfig::GetWidgetSrcPath();
+ m_installerContext.tempWidgetRoot = tempRoot.str();
+ } else {
+ m_installerContext.tempWidgetRoot = m_installerContext.tempWidgetPath;
+ }
+
+ m_installerContext.job->UpdateProgress(
+ InstallerContext::INSTALL_CREATE_TEMPDIR,
+ "Create temporary directory for unzip");
}
void TaskUnzip::StepUnzipPrepare()
} else {
SwitchToStep(&TaskUnzip::StepUnzipProgress);
}
+
+ m_installerContext.job->UpdateProgress(
+ InstallerContext::INSTALL_UNZIP_FILES,
+ "Unzip widget files to temporary directory");
}
void TaskUnzip::StepUnzipFinished()