X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnative_client_sdk%2Fdoc_generated%2Fdevguide%2Ftutorial%2Ftutorial-part2.html;h=72c33bed0c8c191f7b12b3491271fa7c9b845c8f;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=7731fccd7e2193f929825abd5cd5ea12b3cb6058;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/native_client_sdk/doc_generated/devguide/tutorial/tutorial-part2.html b/src/native_client_sdk/doc_generated/devguide/tutorial/tutorial-part2.html index 7731fcc..72c33be 100644 --- a/src/native_client_sdk/doc_generated/devguide/tutorial/tutorial-part2.html +++ b/src/native_client_sdk/doc_generated/devguide/tutorial/tutorial-part2.html @@ -28,8 +28,7 @@
This tutorial shows how to convert the finished PNaCl web application from Part 1 to use the Native Client SDK build system and common JavaScript files. It also demonstrates some techniques to make your web @@ -42,13 +41,11 @@ your application.
The finished code for this example can be found in the
pepper_$(VERSION)/getting_started/part2
directory in the Native Client SDK
download.
This section describes how to use the SDK build system. To do so, we’ll make changes in the makefile. Because the makefile in part1 and part2 are so different, it is easier to start from scratch. Here is the contents of the new makefile. The following sections will describe it in more detail.
-The makefile from part1 only supports one toolchain (PNaCl) and one configuration (Release). It also only supports one source file. It’s relatively @@ -85,7 +82,6 @@ endif $(eval $(call NMF_RULE,$(TARGET),)) -
The makefile begins by specifying the toolchains that are valid for this project. The Native Client SDK build system supports multi-toolchain projects @@ -116,7 +112,6 @@ to compile and link a project, which we’ll use below.
include $(NACL_SDK_ROOT)/tools/common.mk-
After including tools/common.mk
, we configure the project by specifying its
name, the sources and libraries it uses:
For many projects, the following build macros do not need to be changed; they will use the variables we’ve defined above.
@@ -205,12 +199,10 @@ each executable generated in the previous step:$(eval $(call NMF_RULE,$(TARGET),))-
This section describes the changes necessary to make the HTML and JavaScript in part1 CSP-compliant. This is required if you want to build a Chrome App, but is not necessary if you want to use PNaCl on the open web.
-Chrome Apps CSP restricts you from doing the following:
@@ -223,7 +215,6 @@ iframe.eval()
and new
Function()
.To make our application CSP-compliant, we have to remove inline scripting. As
described above, we can’t use inline <script>
blocks or event handlers. This
@@ -245,7 +236,6 @@ this example.
This logic is now handled by common.js
.
Finally, there are a few changes to index.html
that are not necessary for
CSP-compliance, but help make the SDK examples more generic.
As described in the previous section, common.js
will call certain functions
during the module loading process. This example only needs to respond to two:
@@ -436,6 +423,6 @@ function handleMessage(message) {
logEl.textContent += message.data;
}
-