From: Zbigniew Kostrzewa Date: Fri, 14 Jun 2013 10:49:02 +0000 (+0200) Subject: Fix installation of NPRuntime plug-ins. X-Git-Tag: submit/tizen_2.2/20130927.091100^2~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0dbf30751fcdb486a549567b407332ebadfc0d83;p=platform%2Fframework%2Fweb%2Fwrt-commons.git Fix installation of NPRuntime plug-ins. [Issue#] N/A [Problem] All NPRuntime plug-ins are installed with a widget instead of only those that match target architecture. See "Tizen Web Runtime Core Specification 2.1", section "Web Application Installation", requirements 0102 and 0103. [Cause] N/A [Solution] Provide API for retrieving path to the NPRuntime plug-ins depending on the target architecture. [SCMRequest] N/A [Verification] 1. Build repository. Change-Id: Ic341d91adc7a6019b4b0f330baaf06982a44eb8c --- diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h index 2a04b13..cf5647b 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h @@ -304,6 +304,15 @@ inline const char* GetWidgetResPath() { return "/res"; } + +inline const char* GetNPRuntimePluginsPath() +{ +#ifdef __arm__ + return "plugins/arm"; +#else + return "plugins/x86"; +#endif +} } // namespace GlobalConfig } // namespace WrtDB diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h index 643ff7b..c452814 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h @@ -98,6 +98,14 @@ inline std::string GetWidgetSharedResStoragePath(DPL::String tzPkgId) .Concat(GlobalConfig::GetWidgetResPath()) .GetFullPath(); } + +inline std::string GetWidgetNPRuntimePluginsPath(const DPL::String& tzPkgId) +{ + return PathBuilder(GetWidgetBasePath(tzPkgId)) + .Concat(GlobalConfig::GetWidgetSrcPath()) + .Append(GlobalConfig::GetNPRuntimePluginsPath()) + .GetFullPath(); +} } // namespace WidgetConfig } // namespace WrtDB