-
- _D("widgetPath:%s", widgetPath.c_str());
- _D("tempPath:%s", tempDir.c_str());
-
- m_context.widgetConfig.packagingType =
- checkPackageType(widgetPath, tempDir);
- ConfigParserData configData = getWidgetDataFromXML(
- widgetPath,
- tempDir,
- m_context.widgetConfig.packagingType,
- m_context.mode.command == InstallMode::Command::REINSTALL);
- _D("widget packaging type : %d", m_context.widgetConfig.packagingType.pkgType);
-
- setTizenId(configData);
- setApplicationType(configData);
- m_context.needEncryption = detectResourceEncryption(configData);
- setInstallLocationType(configData);
- // TODO: (job_install_refactoring) hide this call
- m_context.callerPkgId =
- DPL::FromUTF8String(m_context.job->GetInstallerStruct().pkgmgrInterface->getCallerId());
- _D("Caller Package Id : %ls", m_context.callerPkgId.c_str());
-
- // Configure installation
- result = ConfigureInstallation(widgetPath, configData, tempDir);
- // TODO: (job_install_refactoring) hide this call
- m_context.job->GetInstallerStruct().pkgmgrInterface->sendSignal(
- PKGMGR_PROGRESS_KEY,
- PKGMGR_START_VALUE);
- }
- Catch(Exceptions::OpenZipFailed)
- {
- _E("Failed to unzip for widget");
- result = ConfigureResult::Failed_OpenZipError;
- }
- Catch(Exceptions::ExtractFileFailed)
- {
- _E("Failed to unzip for widget");
- result = ConfigureResult::Failed_UnzipError;
- }
- Catch(Exceptions::DrmDecryptFailed)
- {
- _E("Failed to unzip for widget");
- result = ConfigureResult::Failed_DrmError;
- }
- Catch(Exceptions::MissingConfig)
- {
- _E("Failed to localize config.xml");
- result = ConfigureResult::Failed_InvalidConfig;
- }
- Catch(Exceptions::WidgetConfigFileInvalid)
- {
- _E("Invalid configuration file");
- result = ConfigureResult::Failed_InvalidConfig;
- }
- Catch(DPL::Exception)
- {
- _E("Unknown exception");
- result = ConfigureResult::Failed;