Fix installation of NPRuntime plug-ins.
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Fri, 14 Jun 2013 10:49:02 +0000 (12:49 +0200)
committerZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Fri, 14 Jun 2013 11:53:59 +0000 (13:53 +0200)
[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

modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h
modules/widget_dao/include/dpl/wrt-dao-ro/widget_config.h

index 2a04b13..cf5647b 100644 (file)
@@ -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
 
index 643ff7b..c452814 100644 (file)
@@ -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