From: Mateusz Bruno-Kaminski 0.1.0
2015-05-15
Initial Draft
-Wojciech Kosowicz
+
w.kosowicz@samsung.comWojciech Kosowicz
w.kosowicz@samsung.com
0.2.0
2015-05-22
Extended version
-Pawel Kaczmarek
+
p.kaczmarek3@samsung.comPawel Kaczmarek
p.kaczmarek3@samsung.com
0.2.1
2015-06-01
Proofreading
-Rafal Galka
+
r.galka@samsung.comRafal Galka
r.galka@samsung.com
0.3.0
2015-06-08
Supplemented C++ implementation guide
-Rafal Galka
+
r.galka@samsung.comRafal Galka
r.galka@samsung.com
0.4.0
2015-06-16
Guideline
-Pawel Kaczmarek
+
p.kaczmarek3@samsung.comPawel Kaczmarek
p.kaczmarek3@samsung.com
0.5.0
2015-06-18
Devel package
-Pawel Kaczmarek
+
p.kaczmarek3@samsung.comPawel Kaczmarek
p.kaczmarek3@samsung.com
+0.5.1
2015-06-24
Add info about WAPIOven.py
-Pawel Kaczmarek
+
p.kaczmarek3@samsung.comPawel Kaczmarek
+
p.kaczmarek3@samsung.com
+
@@ -294,11 +300,9 @@ lacks of keyword 0.6.0
+2016-10-28
+update devel package for tizen 3.0
+Annie Park
hj.na.park@samsung.comFunctionOnly
.
tools/skeleton_generator/
directory and run the python command:
$ python WAPIOven.py -d <stub code destination directory name> <widl directory/pluginname>.widl
-If tizen.widl is needed, add tizen.widl you can use stub generator located in
-tools/skeleton_generator/
directory and run the python command:
$ python WAPIOven.py -d <stub code destination directory name> <widl directory/pluginname>.widl <widl directory/>tizen.widl
-
-Path to WAPIOven.py:
+If tizen.widl is needed, add tizen.widl
+$ python WAPIOven.py -d <stub code destination directory name> <widl directory/pluginname>.widl <widl directory/>tizen.widl
+
Path to WAPIOven.py:
$ tools/skeleton_generator/WAPIOven.py
You need to install jinja2 for WAPIOven.py:
@@ -672,39 +676,55 @@ Requires: dbus-1 dlog glib-2.0 Libs: -L${libdir} -ltizen_common Cflags: -I${includedir}To create custom web device plugins module webapi-plugins.spec
, tizen-wrt.gyp
and src
files are needed.
+
To create custom web device plugins module webapi-plugins.spec
, tizen-wrt.gyp
, webapi-plugins.manifest
and src
files are needed.
Skeleton below shows the required structure of test module.
âââ packaging
â âââ webapi-plugins.spec
âââ src
â âââ test
-â âââ test_api.js
-â âââ test_extension.cc
-â âââ test_extension.h
-â âââ test.gyp
-â âââ test_instance.cc
-â âââ test_instance.h
-âââ tizen-wrt.gyp
+â | âââ test_api.js
+â | âââ test_extension.cc
+â | âââ test_extension.h
+â | âââ test.gyp
+â | âââ test_instance.cc
+â | âââ test_instance.h
+â âââ tool
+â | âââ desc_gentool.cc
+â | âââ tool.gyp
+| âââ tizen-wrt.gyp
+âââ webapi-plugins.manifest
webapi-plugins.spec source:
-%define _manifestdir %{TZ_SYS_RW_PACKAGES}
+%bcond_with wayland
+
+%define _manifestdir %{TZ_SYS_RW_PACKAGES}
%define _desktop_icondir %{TZ_SYS_SHARE}/icons/default/small
%define crosswalk_extensions tizen-extensions-crosswalk
+%define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
+
Name: webapi-plugins-test
Version: 0.1
Release: 0
License: Apache-2.0 and BSD-2.0 and MIT
Group: Development/Libraries
-Summary: Tizen Web APIs implemented
+Summary: Tizen Test Web APIs
Source0: %{name}-%{version}.tar.gz
+%ifarch %{arm} aarch64
+# ARM
+%define tizen_is_emulator 0
+%else
+# I586
+%define tizen_is_emulator 1
+%endif
+
BuildRequires: ninja
BuildRequires: pkgconfig(webapi-plugins)
%description
-Tizen Test Web APIs.
+Tizen Test Web APIs
%prep
%setup -q
@@ -712,19 +732,36 @@ Tizen Test Web APIs.
%build
export GYP_GENERATORS='ninja'
-GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{tizen_profile_name} -Dprivilege_engine=%{tizen_privilege_engine}"
-GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=x11"
+GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=%{tizen_privilege_engine}"
+GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
+GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
+
+# feature flags
+GYP_OPTIONS="$GYP_OPTIONS -Dtizen_is_emulator=%{?tizen_is_emulator}"
/usr/include/webapi-plugins/tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
ninja -C out/Default %{?_smp_mflags}
%install
-mkdir -p %{buildroot}%{_libdir}/%{crosswalk_extensions}
-install -p -m 644 out/Default/libtizen*.so %{buildroot}%{_libdir}/%{crosswalk_extensions}
+
+# Extensions.
+mkdir -p %{buildroot}%{crosswalk_extensions_path}
+install -p -m 644 out/Default/libwebapis*.so %{buildroot}%{crosswalk_extensions_path}
+
+# execute desc_gentool
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path} out/Default/desc_gentool \
+ %{crosswalk_extensions_path} \
+ %{buildroot}%{crosswalk_extensions_path} > webapis-plugins.json
+
+# temporary plugins description for lazy loading
+install -p -m 644 webapis-plugins.json %{buildroot}%{crosswalk_extensions_path}/webapis-plugins.json
+
%files
-%{_libdir}/%{crosswalk_extensions}/libtizen*.so
+%{crosswalk_extensions_path}/libwebapis*.so
+%{crosswalk_extensions_path}/webapis-plugins.json
+%manifest webapi-plugins.manifest
tizen-wrt.gyp source:
{
'includes':[
@@ -736,6 +773,7 @@ install -p -m 644 out/Default/libtizen*.so %{buildroot}%{_libdir}/%{crosswalk_ex
'target_name': 'extensions',
'type': 'none',
'dependencies': [
+ 'tool/tool.gyp:*',
'test/test.gyp:*',
],
'conditions': [],
@@ -749,7 +787,7 @@ install -p -m 644 out/Default/libtizen*.so %{buildroot}%{_libdir}/%{crosswalk_ex
],
'targets': [
{
- 'target_name': 'tizen_test',
+ 'target_name': 'webapis_test',
'type': 'loadable_module',
'sources': [
'test_api.js',
@@ -774,8 +812,8 @@ install -p -m 644 out/Default/libtizen*.so %{buildroot}%{_libdir}/%{crosswalk_ex
Custom web device plugins module test is placed in src/
directory and contains all required files.
Please see Plugin structure chapter for more details.
To install custom web device plugins module webapi-plugins-xxx.rpm
and webapi-plugins-devel-xxx.rpm
must be installed first.
-After build and installation webapi-plugins-devel-test tizen.test
namespace should be available.
-var test = tizen.test.ping();
+After build and installation webapi-plugins-test webapis.test
namespace should be available.
+var test = webapis.test.ping();
console.log(test); // Hello!
diff --git a/doc/src/assets/webapi-plugins-devel-test.zip b/doc/src/assets/webapi-plugins-devel-test.zip
index b940fb5c..52201f4e 100644
Binary files a/doc/src/assets/webapi-plugins-devel-test.zip and b/doc/src/assets/webapi-plugins-devel-test.zip differ
diff --git a/doc/src/assets/webapi-plugins-devel-test/LICENSE.MIT b/doc/src/assets/webapi-plugins-devel-test/LICENSE.MIT
new file mode 100644
index 00000000..f1aebff7
--- /dev/null
+++ b/doc/src/assets/webapi-plugins-devel-test/LICENSE.MIT
@@ -0,0 +1,8 @@
+MIT License
+Copyright (c) 2015 Samsung Electronics Co, Ltd. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/doc/src/assets/webapi-plugins-devel-test/packaging/webapi-plugins.spec b/doc/src/assets/webapi-plugins-devel-test/packaging/webapi-plugins.spec
old mode 100755
new mode 100644
index 8bddfb40..c992a8a8
--- a/doc/src/assets/webapi-plugins-devel-test/packaging/webapi-plugins.spec
+++ b/doc/src/assets/webapi-plugins-devel-test/packaging/webapi-plugins.spec
@@ -1,21 +1,33 @@
+%bcond_with wayland
+
%define _manifestdir %{TZ_SYS_RW_PACKAGES}
%define _desktop_icondir %{TZ_SYS_SHARE}/icons/default/small
%define crosswalk_extensions tizen-extensions-crosswalk
+%define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
+
Name: webapi-plugins-test
Version: 0.1
Release: 0
License: Apache-2.0 and BSD-2.0 and MIT
Group: Development/Libraries
-Summary: Tizen Web APIs implemented
+Summary: Tizen Test Web APIs
Source0: %{name}-%{version}.tar.gz
+%ifarch %{arm} aarch64
+# ARM
+%define tizen_is_emulator 0
+%else
+# I586
+%define tizen_is_emulator 1
+%endif
+
BuildRequires: ninja
BuildRequires: pkgconfig(webapi-plugins)
%description
-Tizen Test Web APIs.
+Tizen Test Web APIs
%prep
%setup -q
@@ -23,16 +35,33 @@ Tizen Test Web APIs.
%build
export GYP_GENERATORS='ninja'
-GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{tizen_profile_name} -Dprivilege_engine=%{tizen_privilege_engine}"
-GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=x11"
+GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=%{profile} -Dprivilege_engine=%{tizen_privilege_engine}"
+GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=%{display_type}"
+GYP_OPTIONS="$GYP_OPTIONS -Dcrosswalk_extensions_path=%{crosswalk_extensions_path}"
+
+# feature flags
+GYP_OPTIONS="$GYP_OPTIONS -Dtizen_is_emulator=%{?tizen_is_emulator}"
/usr/include/webapi-plugins/tools/gyp/gyp $GYP_OPTIONS src/tizen-wrt.gyp
ninja -C out/Default %{?_smp_mflags}
%install
-mkdir -p %{buildroot}%{_libdir}/%{crosswalk_extensions}
-install -p -m 644 out/Default/libtizen*.so %{buildroot}%{_libdir}/%{crosswalk_extensions}
+
+# Extensions.
+mkdir -p %{buildroot}%{crosswalk_extensions_path}
+install -p -m 644 out/Default/libwebapis*.so %{buildroot}%{crosswalk_extensions_path}
+
+# execute desc_gentool
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{crosswalk_extensions_path} out/Default/desc_gentool \
+ %{crosswalk_extensions_path} \
+ %{buildroot}%{crosswalk_extensions_path} > webapis-plugins.json
+
+# temporary plugins description for lazy loading
+install -p -m 644 webapis-plugins.json %{buildroot}%{crosswalk_extensions_path}/webapis-plugins.json
+
%files
-%{_libdir}/%{crosswalk_extensions}/libtizen*.so
+%{crosswalk_extensions_path}/libwebapis*.so
+%{crosswalk_extensions_path}/webapis-plugins.json
+%manifest webapi-plugins.manifest
diff --git a/doc/src/assets/webapi-plugins-devel-test/src/test/test.gyp b/doc/src/assets/webapi-plugins-devel-test/src/test/test.gyp
index 93b73b78..26d41d99 100644
--- a/doc/src/assets/webapi-plugins-devel-test/src/test/test.gyp
+++ b/doc/src/assets/webapi-plugins-devel-test/src/test/test.gyp
@@ -4,7 +4,7 @@
],
'targets': [
{
- 'target_name': 'tizen_test',
+ 'target_name': 'webapis_test',
'type': 'loadable_module',
'sources': [
'test_api.js',
diff --git a/doc/src/assets/webapi-plugins-devel-test/src/test/test_extension.cc b/doc/src/assets/webapi-plugins-devel-test/src/test/test_extension.cc
index 88328471..0e62ef9f 100755
--- a/doc/src/assets/webapi-plugins-devel-test/src/test/test_extension.cc
+++ b/doc/src/assets/webapi-plugins-devel-test/src/test/test_extension.cc
@@ -26,7 +26,7 @@ common::Extension* CreateExtension() {
}
TestExtension::TestExtension() {
- SetExtensionName("tizen.test");
+ SetExtensionName("webapis.test");
SetJavaScriptAPI(kSource_test_api);
}
diff --git a/doc/src/assets/webapi-plugins-devel-test/src/tizen-wrt.gyp b/doc/src/assets/webapi-plugins-devel-test/src/tizen-wrt.gyp
index fc15ca50..63709379 100755
--- a/doc/src/assets/webapi-plugins-devel-test/src/tizen-wrt.gyp
+++ b/doc/src/assets/webapi-plugins-devel-test/src/tizen-wrt.gyp
@@ -8,6 +8,7 @@
'target_name': 'extensions',
'type': 'none',
'dependencies': [
+ 'tool/tool.gyp:*',
'test/test.gyp:*',
],
'conditions': [],
diff --git a/doc/src/assets/webapi-plugins-devel-test/src/tool/desc_gentool.cc b/doc/src/assets/webapi-plugins-devel-test/src/tool/desc_gentool.cc
new file mode 100644
index 00000000..b6fda30d
--- /dev/null
+++ b/doc/src/assets/webapi-plugins-devel-test/src/tool/desc_gentool.cc
@@ -0,0 +1,223 @@
+#include
+#include
+#include
+#include