TaskWidgetConfig::TaskWidgetConfig(InstallerContext& installContext) :
DPL::TaskDecl<TaskWidgetConfig>(this),
- m_installContext(installContext),
- WidgetInstallPopup(installContext)
+ WidgetInstallPopup(installContext),
+ m_installContext(installContext)
+
{
AddStep(&TaskWidgetConfig::StepProcessConfigurationFile);
AddStep(&TaskWidgetConfig::ReadLocaleFolders);
AddStep(&TaskWidgetConfig::ProcessBackgroundPageFile);
AddStep(&TaskWidgetConfig::ProcessLocalizedIcons);
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);
}
} else {
// set property data for hosted start url
// Hosted start url only support TIZEN WebApp
- if (m_installContext.widgetConfig.type ==
+ if (m_installContext.widgetConfig.webAppType ==
APP_TYPE_TIZENWEBAPP)
{
const char *startPath =
void TaskWidgetConfig::StepCheckMinVersionInfo()
{
if (!isMinVersionCompatible(
- m_installContext.widgetConfig.type.appType,
+ 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(
// check feature vender for permission
// WAC, TIZEN WebApp cannot use other feature
- if (!isFeatureAllowed(m_installContext.widgetConfig.type.appType,
+ if (!isFeatureAllowed(m_installContext.widgetConfig.webAppType.appType,
it->name))
{
LogInfo("This application type not allowed to use this feature");
ThrowMsg(
Exceptions::WidgetConfigFileInvalid,
"This app type [" <<
- m_installContext.widgetConfig.type.getApptypeToString() <<
+ m_installContext.widgetConfig.webAppType.getApptypeToString() <<
"] cannot be allowed to use [" <<
DPL::ToUTF8String(it->name) + "] feature");
}
currentAppType = APP_TYPE_TIZENWEBAPP;
}
- if (widgetInfo->type == APP_TYPE_UNKNOWN) {
- widgetInfo->type = currentAppType;
- } else if (widgetInfo->type == currentAppType) {
+ if (widgetInfo->webAppType == APP_TYPE_UNKNOWN) {
+ widgetInfo->webAppType = currentAppType;
+ } else if (widgetInfo->webAppType == currentAppType) {
continue;
} else {
ThrowMsg(Exceptions::WidgetConfigFileInvalid,
}
// If there is no define, type set to WAC 2.0
- if (widgetInfo->type == APP_TYPE_UNKNOWN) {
- widgetInfo->type = APP_TYPE_WAC20;
+ if (widgetInfo->webAppType == APP_TYPE_UNKNOWN) {
+ widgetInfo->webAppType = APP_TYPE_WAC20;
}
- LogInfo("type = [" << widgetInfo->type.getApptypeToString() << "]");
+ LogInfo("type = [" << widgetInfo->webAppType.getApptypeToString() << "]");
}
bool TaskWidgetConfig::isFeatureAllowed(WrtDB::AppType appType,
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;
}
bool TaskWidgetConfig::isTizenWebApp() const
{
bool ret = FALSE;
- if (m_installContext.widgetConfig.type.appType
+ if (m_installContext.widgetConfig.webAppType.appType
== WrtDB::AppType::APP_TYPE_TIZENWEBAPP)
ret = TRUE;
}
}
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_NOTNULL != *configInfo.tizenId) {
+ LogError("Invalid archive - Tizen ID not same error");
+ return false;
}
}
if (!!configInfo.version) {