From 429357437d5f67685c2966a072004c40e984dd16 Mon Sep 17 00:00:00 2001 From: Soyoung Kim Date: Fri, 23 Nov 2012 21:17:10 +0900 Subject: [PATCH] Revert "Platform version check during wgt installation" This reverts commit 4e95ddb0231a0818d62d2165c83a857766a219ed. --- src/jobs/widget_install/task_widget_config.cpp | 24 ++++++----------------- src/jobs/widget_install/widget_installer_struct.h | 2 +- src/wrt-installer/wrt_installer.cpp | 2 +- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/jobs/widget_install/task_widget_config.cpp b/src/jobs/widget_install/task_widget_config.cpp index 1d7f093..8423144 100644 --- a/src/jobs/widget_install/task_widget_config.cpp +++ b/src/jobs/widget_install/task_widget_config.cpp @@ -81,12 +81,12 @@ TaskWidgetConfig::TaskWidgetConfig(InstallerContext& installContext) : 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); } @@ -426,18 +426,8 @@ void TaskWidgetConfig::StepCheckMinVersionInfo() if (!isMinVersionCompatible( m_installContext.widgetConfig.webAppType.appType, m_installContext.widgetConfig.minVersion)) { - 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"); - } + std::string label = WIDGET_NOT_COMPATIBLE + QUESTION; + createInstallPopup(PopupType::WIDGET_MIN_VERSION, label); } m_installContext.job->UpdateProgress( @@ -639,15 +629,13 @@ bool TaskWidgetConfig::isMinVersionCompatible(WrtDB::AppType appType, if (!parseVersionString(version, majorSupported, minorSupported, microSupported)) { - LogWarning("Invalid format of platform version string."); + LogWarning("Invalid format of WAC version string."); return true; } if (majorWidget > majorSupported || - (majorWidget == majorSupported && minorWidget > minorSupported) || - (majorWidget == majorSupported && minorWidget == minorSupported - && microWidget > microSupported)) - { + minorWidget > minorSupported || + microWidget > microSupported) { LogInfo("Platform doesn't support this widget."); return false; } diff --git a/src/jobs/widget_install/widget_installer_struct.h b/src/jobs/widget_install/widget_installer_struct.h index 1550e37..2c7e3c8 100755 --- a/src/jobs/widget_install/widget_installer_struct.h +++ b/src/jobs/widget_install/widget_installer_struct.h @@ -103,7 +103,7 @@ struct WidgetInstallationStruct : public WidgetInstallCallbackBase // It must be empty-constructible as a parameter of generic event WidgetInstallationStruct() : updateMode(WidgetUpdateMode::Zero), - m_quiet(false) + m_quiet(true) { } diff --git a/src/wrt-installer/wrt_installer.cpp b/src/wrt-installer/wrt_installer.cpp index 937d0d6..354cb5a 100644 --- a/src/wrt-installer/wrt_installer.cpp +++ b/src/wrt-installer/wrt_installer.cpp @@ -87,7 +87,7 @@ WrtInstaller::WrtInstaller(int argc, char **argv) : m_totalPlugins(0), m_returnStatus(-1), m_installByPkgmgr(false), - m_quiet(false), + m_quiet(true), m_popup(NULL), m_startupPluginInstallation(false) { -- 2.7.4