AddStep(&TaskWidgetConfig::ProcessLocalizedStartFiles);
AddStep(&TaskWidgetConfig::ProcessBackgroundPageFile);
AddStep(&TaskWidgetConfig::ProcessLocalizedIcons);
+ AddStep(&TaskWidgetConfig::ProcessWidgetInstalledPath);
AddStep(&TaskWidgetConfig::StepVerifyFeatures);
+ AddStep(&TaskWidgetConfig::StepCheckMinVersionInfo);
if (!GlobalSettings::TestModeEnabled() && !m_installContext.m_quiet) {
AddStep(&TaskWidgetConfig::StepCancelWidgetInstallationAfterVerifyFeatures);
AddStep(&TaskWidgetConfig::StepShowWidgetInfo);
AddStep(&TaskWidgetConfig::StepCancelWidgetInstallation);
- AddStep(&TaskWidgetConfig::StepCheckMinVersionInfo);
AddStep(&TaskWidgetConfig::StepCancelWidgetInstallationAfterMinVersion);
AddStep(&TaskWidgetConfig::StepDeletePopupWin);
}
if (m_installContext.widgetConfig.webAppType ==
APP_TYPE_TIZENWEBAPP)
{
- const char *startPath =
- DPL::ToUTF8String(startFileData.path).c_str();
- if (strstr(startPath, "http") == startPath) {
+ std::string startPath = DPL::ToUTF8String(startFileData.path);
+
+ if (strstr(startPath.c_str(), "http") == startPath.c_str()) {
WidgetRegisterInfo::StartFileProperties
startFileProperties;
if (!!type) {
}
}
+void TaskWidgetConfig::ProcessWidgetInstalledPath()
+{
+ LogDebug("ProcessWidgetInstalledPath");
+ m_installContext.widgetConfig.widgetInstalledPath =
+ DPL::FromUTF8String(m_installContext.locations->getPackageInstallationDir());
+}
+
void TaskWidgetConfig::StepCancelWidgetInstallationAfterVerifyFeatures()
{
LogDebug("StepCancelWidgetInstallationAfterVerifyFeatures");
if (!isMinVersionCompatible(
m_installContext.widgetConfig.webAppType.appType,
m_installContext.widgetConfig.minVersion)) {
- std::string label = WIDGET_NOT_COMPATIBLE + QUESTION;
- createInstallPopup(PopupType::WIDGET_MIN_VERSION, label);
+ if(!GlobalSettings::TestModeEnabled() && !m_installContext.m_quiet)
+ {
+ LogDebug("Platform version to low - launching");
+ std::string label = WIDGET_NOT_COMPATIBLE + QUESTION;
+ createInstallPopup(PopupType::WIDGET_MIN_VERSION, label);
+ }
+ else
+ {
+ LogError("Platform version lower than required -> cancelling installation");
+ ThrowMsg(Exceptions::NotAllowed,
+ "Platform version does not meet requirements");
+ }
}
m_installContext.job->UpdateProgress(
LogInfo("FetureName = [" << featureName << "]");
AppType featureType = APP_TYPE_UNKNOWN;
- const char* feature = DPL::ToUTF8String(featureName).c_str();
+ std::string featureStr = DPL::ToUTF8String(featureName);
+ const char* feature = featureStr.c_str();
+
// check prefix of feature name
if (strstr(feature, PluginsPrefix::TIZENPluginsPrefix) == feature) {
// Tizen WebApp feature
if (!parseVersionString(version,
majorSupported, minorSupported, microSupported)) {
- LogWarning("Invalid format of WAC version string.");
+ LogWarning("Invalid format of platform version string.");
return true;
}
if (majorWidget > majorSupported ||
- minorWidget > minorSupported ||
- microWidget > microSupported) {
+ (majorWidget == majorSupported && minorWidget > minorSupported) ||
+ (majorWidget == majorSupported && minorWidget == minorSupported
+ && microWidget > microSupported))
+ {
LogInfo("Platform doesn't support this widget.");
return false;
}
}
}
if (!!configInfo.tizenId) {
- if (!pWidgetConfigInfo.pkgname) {
- pWidgetConfigInfo.pkgname = configInfo.tizenId;
- } else {
- if (pWidgetConfigInfo.pkgname != configInfo.tizenId) {
- LogError("Invalid archive - Tizen ID not same error");
- return false;
- }
- }
+ if (pWidgetConfigInfo.pkgName != *configInfo.tizenId) {
+ LogError("Invalid archive - Tizen ID not same error");
+ return false;
+ }
}
if (!!configInfo.version) {
if (!pWidgetConfigInfo.version) {