diff options
Diffstat (limited to 'native_client_sdk')
114 files changed, 758 insertions, 273 deletions
diff --git a/native_client_sdk/doc_generated/community/application-gallery.html b/native_client_sdk/doc_generated/community/application-gallery.html index 81aca82a27..cb7501c1b5 100644 --- a/native_client_sdk/doc_generated/community/application-gallery.html +++ b/native_client_sdk/doc_generated/community/application-gallery.html @@ -2,6 +2,64 @@ <section id="application-gallery"> <span id="id1"></span><h1 id="application-gallery"><span id="id1"></span>Application Gallery</h1> -</section> + +<p>Native Client is an open-source project. This page highlights demos and projects from the community of Native Client +developers to help everyone.</p> + +<p>Know an application that should be featured here? <a href="mailto:salty@gonacl.com">Let us know!</a></p> + +<p>A number of the applications below were produced using +<a href="middleware">middleware and other software packages that support Native Client</a>.</p> + +<p class="note"><b>Note:</b> The most recent applications may have been developed using use a newer version of the Pepper API than +Pepper {{peppernum}}, and may correspondingly require a newer version of Chrome.</p> + +<br> + +<table class="showcase"> + <tbody> + + <tr class="col5"> + <td><a href="https://chrome.google.com/webstore/detail/lara-croft-and-the-guardi/dcfdbmpeeihbpddkneaploeinlbaaodn" target="_blank"><img src="/native-client/images/lara-croft-guardian.png"><br>Lara Croft and the Guardian of Light</a></td> + <td><a href="https://chrome.google.com/webstore/detail/crimson-steam-pirates/glfbkgkceahodalogdpenjoekbacjfcj?utm_source=chrome-ntp-icon&gl=CA" target="_blank"><img src="/native-client/images/pirates.png"><br>Crimson: Steam Pirates</a></td> + <td><a href="https://chrome.google.com/webstore/detail/hiledapehlkhdehbhppgmekfalnlfajc" target="_blank"><img src="/native-client/images/dontstarve.png"><br>Don't Starve</a></td> + <td><a href="https://chrome.google.com/webstore/detail/amfalcbcdebaemokjapphcfnldiogddk" target="_blank"><img src="/native-client/images/running-fred.png"><br>Running Fred</a></td> + <td><a href="https://chrome.google.com/webstore/detail/oijfbknbncemokdnlboeabbcfhobechi" target="_blank"><img src="/native-client/images/mini-ninjas.png"><br>Mini Ninjas</a></td> + </tr> + + <tr class="col5"> + <td><a href="https://chrome.google.com/webstore/detail/acfbekphmapfjpdkfedomagjpccekhaa" target="_blank"><img src="/native-client/images/dark-legends.png"><br>Dark Legends</a></td> + <td><a href="https://chrome.google.com/webstore/detail/chcaflnbhnoegjedbjaamecefhglfamc" target="_blank"><img src="/native-client/images/star-legends.png"><br>Star Legends</a></td> + <td><a href="https://chrome.google.com/webstore/detail/mhpdbcnfpodnaefldpdohoibdajcfabp" target="_blank"><img src="/native-client/images/pocket-legends.png"><br>Pocket Legends</a></td> + <td><a href="https://chrome.google.com/webstore/detail/jccpdhkmgdfccbdmbggjafpokmgeimnm" target="_blank"><img src="/native-client/images/moonbreakers.png"><br>Moon Breakers</a></td> + <td><a href="https://chrome.google.com/webstore/detail/hdahlabpinmfcemhcbcfoijcpoalfgdn" target="_blank"><img src="/native-client/images/airmech.png"><br>AirMech</a></td> + </tr> + + <tr class="col5"> + <td><a href="https://chrome.google.com/webstore/detail/jmfhnfnjfdoplkgbkmibfkdjolnemfdk" target="_blank"><img src="/native-client/images/ztm.png"><br>Zombie Track Meat</a></td> + <td><a href="https://chrome.google.com/webstore/detail/ngcgpajmidlcgbkpjaopbcglkjepkbaa" target="_blank"><img src="/native-client/images/muffinknight.png"><br>Muffin Knight</a></td> + <td><a href="https://chrome.google.com/webstore/detail/icefnknicgejiphafapflechfoeelbeo" target="_blank"><img src="/native-client/images/gohomedino.png"><br>Go Home Dinosaurs</a></td> + <td><a href="https://chrome.google.com/webstore/detail/eets-munchies/fbabclodbpdbgmkniaceplmfbaaiondl" target="_blank"><img src="/native-client/images/eets.png"><br>Eets Munchies</a></td> + <td><a href="https://chrome.google.com/webstore/detail/fjjdhchbojobioihbjhbndceeibabpid" target="_blank"><img src="/native-client/images/planet-buster.png"><br>Planet Buster</a></td> + </tr> + + <tr class="col5"> + <td><a href="https://chrome.google.com/webstore/detail/oohphhdkahjlioohbalmicpokoefkgid" target="_blank"><img src="/native-client/images/bastion.png"><br>Bastion</a></td> + <td><a href="https://chrome.google.com/webstore/detail/edjdoaebnejlnjknbkbacepgemnjlmfc" target="_blank"><img src="/native-client/images/sleepy-jack.png"><br>Sleepy Jack</a></td> + <td><a href="https://chrome.google.com/webstore/detail/dgjbkahdllcckjbjijejpmcgkkjpnnfk" target="_blank"><img src="/native-client/images/cordy.png"><br>Cordy</a></td> + <td><a href="https://chrome.google.com/webstore/detail/pobnonecghmlpppkkjpdiiblmakhhldb" target="_blank"><img src="/native-client/images/battle-for-wesnoth.png"><br>Battle for Wesnoth</a></td> + <td><a href="https://chrome.google.com/webstore/detail/pjlncddmdljpioccbmempchonhlifakc" target="_blank"><img src="/native-client/images/wolf-toss.png"><br>Wolf Toss</a></td> + </tr> + + <tr class="col5"> + <td><a href="https://chrome.google.com/webstore/detail/idnlbhjpainpnikdjnmcmiaombhhchkg" target="_blank"><img src="/native-client/images/sixty-second-shooter.png"><br>60 Second Shooter</a></td> + <td><a href="https://chrome.google.com/webstore/detail/ocpoapiejnpokdojkgjhglijajghikla" target="_blank"><img src="/native-client/images/ogre.jpg"><br>OGRE</a></td> + <td><a href="https://chrome.google.com/webstore/detail/chhkejkkcghanjclmhhpncachhgejoel" target="_blank"><img src="/native-client/images/flite.jpg"><br>FLITE: Text to speech</a></td> + <td><a href="https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo" target="_blank"><img src="/native-client/images/secureshell.png"><br>Secure Shell</a></td> + <td class="empty"> </td> + </tr> + + </tbody> +</table> {{/partials.standard_nacl_article}} diff --git a/native_client_sdk/doc_generated/community/middleware.html b/native_client_sdk/doc_generated/community/middleware.html index 8cee6c721a..2387a82400 100644 --- a/native_client_sdk/doc_generated/community/middleware.html +++ b/native_client_sdk/doc_generated/community/middleware.html @@ -4,4 +4,76 @@ <h1 id="middleware-and-software-support">Middleware and Software Support</h1> </section> +<p>This page showcases middleware that supports Native Client, as well as libraries and other software packages that have been ported +to Native Client. For an example of some applications that were produced using this software, see the +<a href="application-gallery">Application Gallery</a>.</p> + +<section> +<h2>Software middleware partners</h2> +<br> + +<table class="showcase"> + <tbody> + <tr class="col3"> + <td><a href="http://www.unity3d.com" target="_blank"><img src="/native-client/images/unity_logo.jpg"></a></td> + <td><a href="http://www.mono-project.com/" target="_blank"><img src="/native-client/images/mp_mono_logo.png"></a></td> + <td><a href="http:havok.com/" target="_blank"><img src="/native-client/images/havok_logo.jpg"></a></td> + </tr> + + <tr class="col3"> + <td><a href="http://www.blitzgamesstudios.com/blitztech/" target="_blank"><img src="/native-client/images/blitztech_logo.jpg"></a></td> + <td><a href="http://bulletphysics.org/wordpress/" target="_blank"><img src="/native-client/images/bullet_logo-210-86.png"></a></td> + <td><a href="http://www.fmod.org/index.php/download" target="_blank"><img src="/native-client/images/fmod_logo.png"></a></td> + </tr> + + <tr> + <td><a href="http://www.audiokinetic.com/en/products/wwise/introduction" target="_blank"><img src="/native-client/images/wwise_logo.png"></a></td> + <td><a href="https://github.com/eugenis/sdl-nacl" target="_blank"><img src="/native-client/images/SDL_logo.png"></a></td> + <td><a href="http://developer.qt.nokia.com/wiki/Qt_for_Google_Native_Client" target="_blank"><img src="/native-client/images/qt_logo.png"></a></td> + </tr> + + <tr class="col3"> + <td><a href="http://www.ogre3d.org/forums/viewtopic.php?f=4&t=66394" target="_blank"><img src="/native-client/images/Ogre_logo.png"></a></td> + <td><a href="http://www.getmoai.com/" target="_blank"><img src="/native-client/images/moai_logo.png" target="_blank"></a></td> + <td style="border-bottom-style: hidden; border-right-style: hidden;"> </td> + </tr> + </tbody> +</table> +</section> + +<br> +<section> +<h2>Software packages that support Native Client</h2> +<br> + +<table class="showcase-list"> + + <thead> + <tr> + <th>Name</th> + <th>Description</th> + <th>Source</th> + </tr> + </thead> + + <tbody> + <tr> + <td><b>NaClPorts</b></td> + <td>Ports of various open-source projects to Native Client (e.g., SDL, etc.) </td> + <td><a href="http://code.google.com/p/naclports/" target="_blank">Source</a></td> + </tr> + <tr> + <td><b>NaTcl</b></td> + <td>A Native Client port of the popular TCL programming language.</td> + <td><a href="http://wiki.tcl.tk/28211" target="_blank">Source</a></td> + </tr> + <tr> + <td><b>OCaml</b></td> + <td>A compiler that converts Objective Caml source code into Native Client-compliant machine code.</td> + <td><a href="http://code.google.com/p/nacl-ocaml/" target="_blank">Source</a></td> + </tr> + </tbody> +</table> +</section> + {{/partials.standard_nacl_article}} diff --git a/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html b/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html index 2bbe720809..c07032df33 100644 --- a/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html +++ b/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html @@ -318,7 +318,7 @@ the list of shared library dependencies using tools such as <code>objdump_</code executable code modules that the application directly depends on, including modules from the application itself (.nexe and .so files), modules from the Native Client SDK (e.g., libppapi_cpp.so), and perhaps also modules from -<a class="reference external" href="naclports_">naclport</a> or from <a class="reference internal" href="/native-client/community/middleware.html"><em>middleware systems</em></a> that +<a class="reference external" href="naclports_">naclport</a> or from <a class="reference external" href="../../community/middleware">middleware systems</a> that the application uses. You must provide all of those modules as part of the application deployment process.</p> <p>As explained in <a class="reference internal" href="/native-client/devguide/distributing.html"><em>Distributing Your Application</em></a>, there are two basic ways to deploy an application:</p> diff --git a/native_client_sdk/doc_generated/image-list.html b/native_client_sdk/doc_generated/image-list.html new file mode 100644 index 0000000000..4cdff6ca2b --- /dev/null +++ b/native_client_sdk/doc_generated/image-list.html @@ -0,0 +1,51 @@ +{{+bindTo:partials.standard_nacl_article}} + +<section id="native-client-documentation-images"> +<h1 id="native-client-documentation-images">Native Client Documentation Images</h1> +<img alt="/native-client/images/airmech.png" src="/native-client/images/airmech.png" /> +<img alt="/native-client/images/bastion.png" src="/native-client/images/bastion.png" /> +<img alt="/native-client/images/battle-for-wesnoth.png" src="/native-client/images/battle-for-wesnoth.png" /> +<img alt="/native-client/images/conways-life.png" src="/native-client/images/conways-life.png" /> +<img alt="/native-client/images/cordy.png" src="/native-client/images/cordy.png" /> +<img alt="/native-client/images/dark-legends.png" src="/native-client/images/dark-legends.png" /> +<img alt="/native-client/images/dontstarve.png" src="/native-client/images/dontstarve.png" /> +<img alt="/native-client/images/dust.png" src="/native-client/images/dust.png" /> +<img alt="/native-client/images/eets.png" src="/native-client/images/eets.png" /> +<img alt="/native-client/images/flite.jpg" src="/native-client/images/flite.jpg" /> +<img alt="/native-client/images/flocking-geese.png" src="/native-client/images/flocking-geese.png" /> +<img alt="/native-client/images/gohomedino.png" src="/native-client/images/gohomedino.png" /> +<img alt="/native-client/images/hex.png" src="/native-client/images/hex.png" /> +<img alt="/native-client/images/jumpbump.jpg" src="/native-client/images/jumpbump.jpg" /> +<img alt="/native-client/images/lara-croft-guardian.png" src="/native-client/images/lara-croft-guardian.png" /> +<img alt="/native-client/images/mame.jpg" src="/native-client/images/mame.jpg" /> +<img alt="/native-client/images/mini-ninjas.png" src="/native-client/images/mini-ninjas.png" /> +<img alt="/native-client/images/moonbreakers.png" src="/native-client/images/moonbreakers.png" /> +<img alt="/native-client/images/muffinknight.png" src="/native-client/images/muffinknight.png" /> +<img alt="/native-client/images/ogre.jpg" src="/native-client/images/ogre.jpg" /> +<img alt="/native-client/images/pirates.png" src="/native-client/images/pirates.png" /> +<img alt="/native-client/images/planet-buster.png" src="/native-client/images/planet-buster.png" /> +<img alt="/native-client/images/pocket-legends.png" src="/native-client/images/pocket-legends.png" /> +<img alt="/native-client/images/running-fred.png" src="/native-client/images/running-fred.png" /> +<img alt="/native-client/images/sdk-examples.png" src="/native-client/images/sdk-examples.png" /> +<img alt="/native-client/images/secureshell.png" src="/native-client/images/secureshell.png" /> +<img alt="/native-client/images/sixty-second-shooter.png" src="/native-client/images/sixty-second-shooter.png" /> +<img alt="/native-client/images/sleepy-jack.png" src="/native-client/images/sleepy-jack.png" /> +<img alt="/native-client/images/sodasynth.jpg" src="/native-client/images/sodasynth.jpg" /> +<img alt="/native-client/images/star-legends.png" src="/native-client/images/star-legends.png" /> +<img alt="/native-client/images/totemo.png" src="/native-client/images/totemo.png" /> +<img alt="/native-client/images/wolf-toss.png" src="/native-client/images/wolf-toss.png" /> +<img alt="/native-client/images/ztm.png" src="/native-client/images/ztm.png" /> +<img alt="/native-client/images/Ogre_logo.png" src="/native-client/images/Ogre_logo.png" /> +<img alt="/native-client/images/SDL_logo.png" src="/native-client/images/SDL_logo.png" /> +<img alt="/native-client/images/blitztech_logo.jpg" src="/native-client/images/blitztech_logo.jpg" /> +<img alt="/native-client/images/bullet_logo-210-86.png" src="/native-client/images/bullet_logo-210-86.png" /> +<img alt="/native-client/images/fmod_logo.png" src="/native-client/images/fmod_logo.png" /> +<img alt="/native-client/images/havok_logo.jpg" src="/native-client/images/havok_logo.jpg" /> +<img alt="/native-client/images/moai_logo.png" src="/native-client/images/moai_logo.png" /> +<img alt="/native-client/images/mp_mono_logo.png" src="/native-client/images/mp_mono_logo.png" /> +<img alt="/native-client/images/qt_logo.png" src="/native-client/images/qt_logo.png" /> +<img alt="/native-client/images/unity_logo.jpg" src="/native-client/images/unity_logo.jpg" /> +<img alt="/native-client/images/wwise_logo.png" src="/native-client/images/wwise_logo.png" /> +</section> + +{{/partials.standard_nacl_article}} diff --git a/native_client_sdk/doc_generated/images/Ogre_logo.png b/native_client_sdk/doc_generated/images/Ogre_logo.png Binary files differnew file mode 100644 index 0000000000..6ad8c4d46c --- /dev/null +++ b/native_client_sdk/doc_generated/images/Ogre_logo.png diff --git a/native_client_sdk/doc_generated/images/SDL_logo.png b/native_client_sdk/doc_generated/images/SDL_logo.png Binary files differnew file mode 100644 index 0000000000..6932b31e77 --- /dev/null +++ b/native_client_sdk/doc_generated/images/SDL_logo.png diff --git a/native_client_sdk/doc_generated/images/airmech.png b/native_client_sdk/doc_generated/images/airmech.png Binary files differnew file mode 100644 index 0000000000..fd5a740255 --- /dev/null +++ b/native_client_sdk/doc_generated/images/airmech.png diff --git a/native_client_sdk/doc_generated/images/bastion.png b/native_client_sdk/doc_generated/images/bastion.png Binary files differnew file mode 100644 index 0000000000..673e76fdd7 --- /dev/null +++ b/native_client_sdk/doc_generated/images/bastion.png diff --git a/native_client_sdk/doc_generated/images/battle-for-wesnoth.png b/native_client_sdk/doc_generated/images/battle-for-wesnoth.png Binary files differnew file mode 100644 index 0000000000..5fcac3613c --- /dev/null +++ b/native_client_sdk/doc_generated/images/battle-for-wesnoth.png diff --git a/native_client_sdk/doc_generated/images/blitztech_logo.jpg b/native_client_sdk/doc_generated/images/blitztech_logo.jpg Binary files differnew file mode 100644 index 0000000000..9f900ba295 --- /dev/null +++ b/native_client_sdk/doc_generated/images/blitztech_logo.jpg diff --git a/native_client_sdk/doc_generated/images/bullet_logo-210-86.png b/native_client_sdk/doc_generated/images/bullet_logo-210-86.png Binary files differnew file mode 100644 index 0000000000..6f411780af --- /dev/null +++ b/native_client_sdk/doc_generated/images/bullet_logo-210-86.png diff --git a/native_client_sdk/doc_generated/images/conways-life.png b/native_client_sdk/doc_generated/images/conways-life.png Binary files differnew file mode 100644 index 0000000000..df46811dd5 --- /dev/null +++ b/native_client_sdk/doc_generated/images/conways-life.png diff --git a/native_client_sdk/doc_generated/images/cordy.png b/native_client_sdk/doc_generated/images/cordy.png Binary files differnew file mode 100644 index 0000000000..7db7354992 --- /dev/null +++ b/native_client_sdk/doc_generated/images/cordy.png diff --git a/native_client_sdk/doc_generated/images/dark-legends.png b/native_client_sdk/doc_generated/images/dark-legends.png Binary files differnew file mode 100644 index 0000000000..c532e2af89 --- /dev/null +++ b/native_client_sdk/doc_generated/images/dark-legends.png diff --git a/native_client_sdk/doc_generated/images/dontstarve.png b/native_client_sdk/doc_generated/images/dontstarve.png Binary files differnew file mode 100644 index 0000000000..b94b96ba5e --- /dev/null +++ b/native_client_sdk/doc_generated/images/dontstarve.png diff --git a/native_client_sdk/doc_generated/images/dust.png b/native_client_sdk/doc_generated/images/dust.png Binary files differnew file mode 100644 index 0000000000..449ac5eb1d --- /dev/null +++ b/native_client_sdk/doc_generated/images/dust.png diff --git a/native_client_sdk/doc_generated/images/eets.png b/native_client_sdk/doc_generated/images/eets.png Binary files differnew file mode 100644 index 0000000000..9711ee013b --- /dev/null +++ b/native_client_sdk/doc_generated/images/eets.png diff --git a/native_client_sdk/doc_generated/images/flite.jpg b/native_client_sdk/doc_generated/images/flite.jpg Binary files differnew file mode 100644 index 0000000000..dfb8d12431 --- /dev/null +++ b/native_client_sdk/doc_generated/images/flite.jpg diff --git a/native_client_sdk/doc_generated/images/flocking-geese.png b/native_client_sdk/doc_generated/images/flocking-geese.png Binary files differnew file mode 100644 index 0000000000..d293e443a7 --- /dev/null +++ b/native_client_sdk/doc_generated/images/flocking-geese.png diff --git a/native_client_sdk/doc_generated/images/fmod_logo.png b/native_client_sdk/doc_generated/images/fmod_logo.png Binary files differnew file mode 100644 index 0000000000..cfa2f7a116 --- /dev/null +++ b/native_client_sdk/doc_generated/images/fmod_logo.png diff --git a/native_client_sdk/doc_generated/images/gohomedino.png b/native_client_sdk/doc_generated/images/gohomedino.png Binary files differnew file mode 100644 index 0000000000..ee98cbf908 --- /dev/null +++ b/native_client_sdk/doc_generated/images/gohomedino.png diff --git a/native_client_sdk/doc_generated/images/havok_logo.jpg b/native_client_sdk/doc_generated/images/havok_logo.jpg Binary files differnew file mode 100644 index 0000000000..d6ae0c6118 --- /dev/null +++ b/native_client_sdk/doc_generated/images/havok_logo.jpg diff --git a/native_client_sdk/doc_generated/images/hex.png b/native_client_sdk/doc_generated/images/hex.png Binary files differnew file mode 100644 index 0000000000..023aefe0a2 --- /dev/null +++ b/native_client_sdk/doc_generated/images/hex.png diff --git a/native_client_sdk/doc_generated/images/jumpbump.jpg b/native_client_sdk/doc_generated/images/jumpbump.jpg Binary files differnew file mode 100644 index 0000000000..6bcab78412 --- /dev/null +++ b/native_client_sdk/doc_generated/images/jumpbump.jpg diff --git a/native_client_sdk/doc_generated/images/lara-croft-guardian.png b/native_client_sdk/doc_generated/images/lara-croft-guardian.png Binary files differnew file mode 100644 index 0000000000..cf9c550964 --- /dev/null +++ b/native_client_sdk/doc_generated/images/lara-croft-guardian.png diff --git a/native_client_sdk/doc_generated/images/mame.jpg b/native_client_sdk/doc_generated/images/mame.jpg Binary files differnew file mode 100644 index 0000000000..7972d7aca3 --- /dev/null +++ b/native_client_sdk/doc_generated/images/mame.jpg diff --git a/native_client_sdk/doc_generated/images/mini-ninjas.png b/native_client_sdk/doc_generated/images/mini-ninjas.png Binary files differnew file mode 100644 index 0000000000..6edec36a66 --- /dev/null +++ b/native_client_sdk/doc_generated/images/mini-ninjas.png diff --git a/native_client_sdk/doc_generated/images/moai_logo.png b/native_client_sdk/doc_generated/images/moai_logo.png Binary files differnew file mode 100644 index 0000000000..b527e0d085 --- /dev/null +++ b/native_client_sdk/doc_generated/images/moai_logo.png diff --git a/native_client_sdk/doc_generated/images/moonbreakers.png b/native_client_sdk/doc_generated/images/moonbreakers.png Binary files differnew file mode 100644 index 0000000000..193893c938 --- /dev/null +++ b/native_client_sdk/doc_generated/images/moonbreakers.png diff --git a/native_client_sdk/doc_generated/images/mp_mono_logo.png b/native_client_sdk/doc_generated/images/mp_mono_logo.png Binary files differnew file mode 100644 index 0000000000..225760b343 --- /dev/null +++ b/native_client_sdk/doc_generated/images/mp_mono_logo.png diff --git a/native_client_sdk/doc_generated/images/muffinknight.png b/native_client_sdk/doc_generated/images/muffinknight.png Binary files differnew file mode 100644 index 0000000000..3ab73af070 --- /dev/null +++ b/native_client_sdk/doc_generated/images/muffinknight.png diff --git a/native_client_sdk/doc_generated/images/ogre.jpg b/native_client_sdk/doc_generated/images/ogre.jpg Binary files differnew file mode 100644 index 0000000000..25a7ea9bff --- /dev/null +++ b/native_client_sdk/doc_generated/images/ogre.jpg diff --git a/native_client_sdk/doc_generated/images/pirates.png b/native_client_sdk/doc_generated/images/pirates.png Binary files differnew file mode 100644 index 0000000000..f8b7481f25 --- /dev/null +++ b/native_client_sdk/doc_generated/images/pirates.png diff --git a/native_client_sdk/doc_generated/images/planet-buster.png b/native_client_sdk/doc_generated/images/planet-buster.png Binary files differnew file mode 100644 index 0000000000..5a30d55856 --- /dev/null +++ b/native_client_sdk/doc_generated/images/planet-buster.png diff --git a/native_client_sdk/doc_generated/images/pocket-legends.png b/native_client_sdk/doc_generated/images/pocket-legends.png Binary files differnew file mode 100644 index 0000000000..0dc3164751 --- /dev/null +++ b/native_client_sdk/doc_generated/images/pocket-legends.png diff --git a/native_client_sdk/doc_generated/images/qt_logo.png b/native_client_sdk/doc_generated/images/qt_logo.png Binary files differnew file mode 100644 index 0000000000..3f01f83a8e --- /dev/null +++ b/native_client_sdk/doc_generated/images/qt_logo.png diff --git a/native_client_sdk/doc_generated/images/running-fred.png b/native_client_sdk/doc_generated/images/running-fred.png Binary files differnew file mode 100644 index 0000000000..b7f41ab4b2 --- /dev/null +++ b/native_client_sdk/doc_generated/images/running-fred.png diff --git a/native_client_sdk/doc_generated/images/sdk-examples.png b/native_client_sdk/doc_generated/images/sdk-examples.png Binary files differnew file mode 100644 index 0000000000..a269645c76 --- /dev/null +++ b/native_client_sdk/doc_generated/images/sdk-examples.png diff --git a/native_client_sdk/doc_generated/images/secureshell.png b/native_client_sdk/doc_generated/images/secureshell.png Binary files differnew file mode 100644 index 0000000000..fc511e10a7 --- /dev/null +++ b/native_client_sdk/doc_generated/images/secureshell.png diff --git a/native_client_sdk/doc_generated/images/sixty-second-shooter.png b/native_client_sdk/doc_generated/images/sixty-second-shooter.png Binary files differnew file mode 100644 index 0000000000..3874d95564 --- /dev/null +++ b/native_client_sdk/doc_generated/images/sixty-second-shooter.png diff --git a/native_client_sdk/doc_generated/images/sleepy-jack.png b/native_client_sdk/doc_generated/images/sleepy-jack.png Binary files differnew file mode 100644 index 0000000000..4166a32f0c --- /dev/null +++ b/native_client_sdk/doc_generated/images/sleepy-jack.png diff --git a/native_client_sdk/doc_generated/images/sodasynth.jpg b/native_client_sdk/doc_generated/images/sodasynth.jpg Binary files differnew file mode 100644 index 0000000000..b835f4c0b7 --- /dev/null +++ b/native_client_sdk/doc_generated/images/sodasynth.jpg diff --git a/native_client_sdk/doc_generated/images/star-legends.png b/native_client_sdk/doc_generated/images/star-legends.png Binary files differnew file mode 100644 index 0000000000..43147d381e --- /dev/null +++ b/native_client_sdk/doc_generated/images/star-legends.png diff --git a/native_client_sdk/doc_generated/images/totemo.png b/native_client_sdk/doc_generated/images/totemo.png Binary files differnew file mode 100644 index 0000000000..fd0e0618f1 --- /dev/null +++ b/native_client_sdk/doc_generated/images/totemo.png diff --git a/native_client_sdk/doc_generated/images/unity_logo.jpg b/native_client_sdk/doc_generated/images/unity_logo.jpg Binary files differnew file mode 100644 index 0000000000..a6e86f7cc0 --- /dev/null +++ b/native_client_sdk/doc_generated/images/unity_logo.jpg diff --git a/native_client_sdk/doc_generated/images/voronoi1.png b/native_client_sdk/doc_generated/images/voronoi1.png Binary files differnew file mode 100644 index 0000000000..3616ba469b --- /dev/null +++ b/native_client_sdk/doc_generated/images/voronoi1.png diff --git a/native_client_sdk/doc_generated/images/voronoi2.png b/native_client_sdk/doc_generated/images/voronoi2.png Binary files differnew file mode 100644 index 0000000000..67bf262e24 --- /dev/null +++ b/native_client_sdk/doc_generated/images/voronoi2.png diff --git a/native_client_sdk/doc_generated/images/wolf-toss.png b/native_client_sdk/doc_generated/images/wolf-toss.png Binary files differnew file mode 100644 index 0000000000..eea1fd1fd3 --- /dev/null +++ b/native_client_sdk/doc_generated/images/wolf-toss.png diff --git a/native_client_sdk/doc_generated/images/wwise_logo.png b/native_client_sdk/doc_generated/images/wwise_logo.png Binary files differnew file mode 100644 index 0000000000..89fc37c5d5 --- /dev/null +++ b/native_client_sdk/doc_generated/images/wwise_logo.png diff --git a/native_client_sdk/doc_generated/images/ztm.png b/native_client_sdk/doc_generated/images/ztm.png Binary files differnew file mode 100644 index 0000000000..6ac204efdb --- /dev/null +++ b/native_client_sdk/doc_generated/images/ztm.png diff --git a/native_client_sdk/doc_generated/io2014.html b/native_client_sdk/doc_generated/io2014.html new file mode 100644 index 0000000000..d12e9355a1 --- /dev/null +++ b/native_client_sdk/doc_generated/io2014.html @@ -0,0 +1,168 @@ +{{+bindTo:partials.standard_nacl_article}} + +<section id="building-a-nacl-app"> +<h1 id="building-a-nacl-app">Building a NaCl App</h1> +<section id="in-the-browser"> +<h2 id="in-the-browser">In the browser!</h2> +<p>Follow along with Brad Nelson’s Google I/O 2014 talk. +Explore our new in-browser development environment and debugger.</p> +<p>Learn how easy it is to edit, build, and debug NaCl application +all in your desktop web browser or on a Chromebook. +Work either on-line or off-line!</p> +<iframe class="video" width="500" height="281" +src="//www.youtube.com/embed/MvKEomoiKBA?rel=0" frameborder="0"></iframe><section id="installation"> +<h3 id="installation">Installation</h3> +<p>The setup process currently requires several steps. +We’re working to reduce the number of steps in future releases. +As the process gets easier, we’ll update this page.</p> +<p>You currently need to:</p> +<ul class="small-gap"> +<li><p class="first">Navigate to: chrome://flags and:</p> +<ul class="small-gap"> +<li>Enable <strong>Native Client</strong>.</li> +<li>Enable <strong>Native Client GDB-based debugging</strong>. (For the debugger)</li> +</ul> +</li> +<li><p class="first">Install the NaCl in-browser debugger.</p> +<ul class="small-gap"> +<li>Install the <a class="reference external" href="https://chrome.google.com/webstore/detail/nacl-debugger/ncpkkhabohglmhjibnloicgdfjmojkfd">NaCl Debugger Extension</a>.</li> +<li>Install <a class="reference external" href="https://chrome.google.com/webstore/detail/gdb/gkjoooooiaohiceibmdleokniplmbahe">GDB</a>.</li> +</ul> +</li> +<li><p class="first">Install the <a class="reference external" href="https://chrome.google.com/webstore/detail/nacl-development-environm/aljpgkjeipgnmdpikaajmnepbcfkglfa">NaCl Development Environment</a>.</p> +<ul class="small-gap"> +<li>First run is slow (as it downloads and installs packages).</li> +</ul> +</li> +</ul> +</section><section id="editor"> +<h3 id="editor">Editor</h3> +<p>To follow along in this tutorial, you’ll need to use a text editor to modify +various files in our development environment. +There are currently two editor options, nano or vim. +Emacs is coming soon... +If you’re unsure what to pick, nano is simpler to start with and has on-screen +help.</p> +<ul class="small-gap"> +<li><p class="first">You can open <strong>nano</strong> like this:</p> +<pre class="prettyprint"> +$ nano <filename> +</pre> +<p>Here’s an online <a class="reference external" href="http://mintaka.sdsu.edu/reu/nano.html">nano tutorial</a>.</p> +</li> +<li><p class="first">You can open <strong>vim</strong> like this:</p> +<pre class="prettyprint"> +$ vim <filename> +</pre> +<p>Here’s an online <a class="reference external" href="http://www.openvim.com/tutorial.html">vim tutorial</a>.</p> +</li> +</ul> +</section><section id="git-setup"> +<h3 id="git-setup">Git Setup</h3> +<p>This tutorial also uses a revision control program called +<a class="reference external" href="http://en.wikipedia.org/wiki/Git_(software)">git</a>. +In order to commit to a git repository, +you need to setup your environment to with your identity.</p> +<p>You’ll need to add these lines to <cite>~/.bashrc</cite> to cause them to be invoked each +time you start the development environment.</p> +<pre class="prettyprint"> +git config --global user.name "John Doe" +git config --global user.email johndoe@example.com +</pre> +</section><section id="tour-follow-the-video"> +<h3 id="tour-follow-the-video">Tour (follow the video)</h3> +<p>Create a working directory and go into it:</p> +<pre class="prettyprint"> +$ mkdir work +$ cd work +</pre> +<p>Download a zip file containing our sample:</p> +<pre class="prettyprint"> +$ curl http://nacltools.storage.googleapis.com/io2014/voronoi.zip -O +$ ls -l +</pre> +<p>Unzip the sample:</p> +<pre class="prettyprint"> +$ unzip voronoi.zip +</pre> +<p>Go into the sample and take a look at the files inside:</p> +<pre class="prettyprint"> +$ cd voronoi +$ ls +</pre> +<p>Our project combines voronoi.cc with several C++ libraries to produce a NEXE +(or Native Client Executable).</p> +<img alt="/native-client/images/voronoi1.png" src="/native-client/images/voronoi1.png" /> +<p>The resulting application combines the NEXE with some Javascript to load +the NaCl module, producing the complete application.</p> +<img alt="/native-client/images/voronoi2.png" src="/native-client/images/voronoi2.png" /> +<p>Let’s use git (a revision control program) to track our changes.</p> +<p>First, create a new repository:</p> +<pre class="prettyprint"> +$ git init +</pre> +<p>Add everything here:</p> +<pre class="prettyprint"> +$ git add . +</pre> +<p>Then commit our starting state:</p> +<pre class="prettyprint"> +$ git commit -m "imported voronoi demo" +</pre> +<p>Now, likes run <strong>make</strong> to compile our program (NOTE: Changed since video, +we’ve got Makefiles!):</p> +<pre class="prettyprint"> +$ make +</pre> +<p>Oops, we get this error:</p> +<pre class="prettyprint"> +voronoi.cc: In member function 'void Voronoi::Update()': +voronoi.cc:506: error: 'struct PSContext2D_t' has no member named 'hieght' +</pre> +<p>We’ll need to start an editor to fix this. +You’ll want to change <em>hieght</em> to <em>height</em> on line 506. +Then rebuild:</p> +<pre class="prettyprint"> +$ make +</pre> +<p>Lets look at the diff:</p> +<pre class="prettyprint"> +$ git diff +</pre> +<p>And commit our fix:</p> +<pre class="prettyprint"> +$ git commit -am "fixed build error" +</pre> +<p>To test our application, we run a local web server, written in python. +Run the server with this command (NOTE: Running through a Makefile +now):</p> +<pre class="prettyprint"> +$ make serve +</pre> +<p>Then, navigate to <a class="reference external" href="http://localhost:5103/">http://localhost:5103/</a> to test the demo.</p> +<p>If you follow along with the demo video, you will discover the sample crashes +when you change the thread count.</p> +<p><em>Debugger walk-thru coming soon.</em></p> +<p>Once you’ve identified the problem. You’ll want to stop the test server. +Press enter to halt it.</p> +<p>Open your editor again, navigate to line 485 and change <em>valu</em> to <em>value</em>.</p> +<p>Then rebuild:</p> +<pre class="prettyprint"> +$ make +</pre> +<p>Check the diff and commit our fix:</p> +<pre class="prettyprint"> +$ git diff +$ git commit -am "fixed thread ui bug" +</pre> +<p>Now look at your commit history:</p> +<pre class="prettyprint"> +$ git log +</pre> +<p>Run the demo again. And everything now works:</p> +<pre class="prettyprint"> +$ make serve +</pre> +</section></section></section> + +{{/partials.standard_nacl_article}} diff --git a/native_client_sdk/doc_generated/quick-start.html b/native_client_sdk/doc_generated/quick-start.html index 0a851c78be..8535f2de95 100644 --- a/native_client_sdk/doc_generated/quick-start.html +++ b/native_client_sdk/doc_generated/quick-start.html @@ -7,7 +7,7 @@ <li>Read the <a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a> to understand what Native Client is, how a Native Client application is structured and to get a feel for what you need to do to port existing code.</li> -<li>Play with some of the applications in the <a class="reference internal" href="/native-client/community/application-gallery.html"><em>Application Gallery</em></a> to see what others have done so far.</li> +<li>Play with some of the applications in the <a class="reference external" href="community/application-gallery">Application Gallery</a> to see what others have done so far.</li> <li>Go through the <a class="reference internal" href="/native-client/devguide/tutorial/tutorial-part1.html"><em>Getting Started Tutorial</em></a>. The tutorial walks you through how to get Native Client set up for the first time and check for browser version compatibility.</li> diff --git a/native_client_sdk/doc_generated/sitemap.html b/native_client_sdk/doc_generated/sitemap.html index 2d7c84f4f8..adf6ff9c9d 100644 --- a/native_client_sdk/doc_generated/sitemap.html +++ b/native_client_sdk/doc_generated/sitemap.html @@ -211,9 +211,11 @@ <li class="toctree-l2"><a class="reference internal" href="/native-client/devguide/distributing.html#non-portable-native-client">Non-portable Native Client</a></li> </ul> </li> +<li class="toctree-l1"><a class="reference internal" href="/native-client/io2014.html">Building a NaCl App</a><ul class="small-gap"> +<li class="toctree-l2"><a class="reference internal" href="/native-client/io2014.html#in-the-browser">In the browser!</a></li> +</ul> +</li> <li class="toctree-l1"><a class="reference internal" href="/native-client/community/index.html">Community</a></li> -<li class="toctree-l1"><a class="reference internal" href="/native-client/community/application-gallery.html">Application Gallery</a></li> -<li class="toctree-l1"><a class="reference internal" href="/native-client/community/middleware.html">Middleware and Software Support</a></li> <li class="toctree-l1"><a class="reference internal" href="/native-client/community/security-contest/index.html">Security Contest Archive</a><ul class="small-gap"> <li class="toctree-l2"><a class="reference internal" href="/native-client/community/security-contest/index.html#contest-overview">Contest overview</a></li> <li class="toctree-l2"><a class="reference internal" href="/native-client/community/security-contest/index.html#contest-winners">Contest winners</a></li> diff --git a/native_client_sdk/src/build_tools/json/naclsdk_manifest2.json b/native_client_sdk/src/build_tools/json/naclsdk_manifest2.json index 7f1076e75a..5d6a0bbce7 100644 --- a/native_client_sdk/src/build_tools/json/naclsdk_manifest2.json +++ b/native_client_sdk/src/build_tools/json/naclsdk_manifest2.json @@ -356,6 +356,16 @@ }, { "archives": [], + "description": "Chrome 36 bundle, revision xxxxx", + "name": "pepper_36", + "recommended": "no", + "repath": "pepper_36", + "revision": 0, + "stability": "post_stable", + "version": 36 + }, + { + "archives": [], "description": "Chrome Canary", "name": "pepper_canary", "recommended": "no", @@ -365,23 +375,14 @@ "version": 0 }, { - "archives": [ - { - "checksum": { - "sha1": "9f6a8fc33df9cfc2b48dc6f017e9de01efd546b9" - }, - "host_os": "linux", - "size": 399561504, - "url": "https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/trunk.277747/naclsdk_bionic.tar.bz2" - } - ], + "archives": [], "description": "Bionic Canary", "name": "bionic_canary", "recommended": "no", - "repath": "pepper_37", - "revision": 277747, + "repath": "", + "revision": 0, "stability": "canary", - "version": 37 + "version": 0 } ], "manifest_version": 2 diff --git a/native_client_sdk/src/build_tools/tests/update_nacl_manifest_test.py b/native_client_sdk/src/build_tools/tests/update_nacl_manifest_test.py index 8820b692b3..c2ef9da800 100755 --- a/native_client_sdk/src/build_tools/tests/update_nacl_manifest_test.py +++ b/native_client_sdk/src/build_tools/tests/update_nacl_manifest_test.py @@ -202,11 +202,10 @@ class MakeFiles(dict): class TestDelegate(update_nacl_manifest.Delegate): - def __init__(self, manifest, history, files, version_mapping): + def __init__(self, manifest, history, files): self.manifest = manifest self.history = history self.files = files - self.version_mapping = version_mapping self.dryrun = 0 self.called_gsutil_cp = False self.called_sendmail = False @@ -217,16 +216,25 @@ class TestDelegate(update_nacl_manifest.Delegate): def GetHistory(self): return self.history - def GetTrunkRevision(self, version): - return self.version_mapping[version] - def GsUtil_ls(self, url): path = GetPathFromGsUrl(url) result = [] - for filename, _ in self.files.iteritems(): - if filename.startswith(path): - result.append(MakeGsUrl(filename)) - return result + for filename in self.files.iterkeys(): + if not filename.startswith(path): + continue + + # Find the first slash after the prefix (path). + # +1, because if the slash is directly after path, then we want to find + # the following slash anyway. + slash = filename.find('/', len(path) + 1) + + if slash != -1: + filename = filename[:slash] + + result.append(MakeGsUrl(filename)) + + # Remove dupes. + return list(set(result)) def GsUtil_cat(self, url): path = GetPathFromGsUrl(url) @@ -291,12 +299,10 @@ class TestUpdateManifest(unittest.TestCase): self.delegate = None self.uploaded_manifest = None self.manifest = None - # Ignore logging warnings, etc. - logging.getLogger('update_nacl_manifest').setLevel(logging.INFO) def _MakeDelegate(self): self.delegate = TestDelegate(self.manifest, self.history.history, - self.files, self.version_mapping) + self.files) def _Run(self, host_oses, extra_archives=None, fixed_bundle_versions=None): update_nacl_manifest.Run(self.delegate, host_oses, extra_archives, @@ -479,47 +485,12 @@ class TestUpdateManifest(unittest.TestCase): self.assertEqual(uploaded_bundle.version, 18) def testUpdateCanary(self): - # Note that the bundle in naclsdk_manifest2.json will be called - # CANARY_BUNDLE_NAME, whereas the bundle in the manifest "snippet" will be - # called "pepper_21". - canary_bundle = copy.deepcopy(BCANARY_NONE) - self.manifest = MakeManifest(canary_bundle) - self.history.Add(OS_MW, CANARY, V21_0_1145_0) - self.files.Add(B21_0_1145_0_MLW) - self._MakeDelegate() - self._Run(OS_MLW) - self._ReadUploadedManifest() - self._AssertUploadedManifestHasBundle(B21_0_1145_0_MLW, CANARY, - bundle_name=CANARY_BUNDLE_NAME) - - def testUpdateCanaryUseTrunkArchives(self): - canary_bundle = copy.deepcopy(BCANARY_NONE) - self.manifest = MakeManifest(canary_bundle) - self.history.Add(OS_MW, CANARY, V21_0_1166_0) - self.files.Add(B21_0_1166_0_MW) - self.files.Add(BTRUNK_140819_MLW) - self.version_mapping[V21_0_1166_0] = VTRUNK_140819 - self._MakeDelegate() - self._Run(OS_MLW) - self._ReadUploadedManifest() - - test_bundle = copy.deepcopy(B21_0_1166_0_MW) - test_bundle.AddArchive(BTRUNK_140819_MLW.GetArchive('linux')) - self._AssertUploadedManifestHasBundle(test_bundle, CANARY, - bundle_name=CANARY_BUNDLE_NAME) - - def testCanaryUseOnlyTrunkArchives(self): self.manifest = MakeManifest(copy.deepcopy(BCANARY_NONE)) - history = """win,canary,21.0.1163.0,2012-06-04 12:35:44.784446 -mac,canary,21.0.1163.0,2012-06-04 11:54:09.433166""" - self._AddCsvHistory(history) - self.version_mapping['21.0.1163.0'] = 'trunk.140240' - my_bundle = MakePlatformBundle(21, 140240, '21.0.1163.0', OS_MLW) - self.files.Add(my_bundle) + self.files.Add(BTRUNK_140819_MLW) self._MakeDelegate() self._Run(OS_MLW) self._ReadUploadedManifest() - self._AssertUploadedManifestHasBundle(my_bundle, CANARY, + self._AssertUploadedManifestHasBundle(BTRUNK_140819_MLW, CANARY, bundle_name=CANARY_BUNDLE_NAME) def testCanaryShouldOnlyUseCanaryVersions(self): @@ -532,42 +503,6 @@ mac,canary,21.0.1163.0,2012-06-04 11:54:09.433166""" self._MakeDelegate() self.assertRaises(Exception, self._Run, OS_MLW) - def testMissingCanaryFollowedByStableShouldWork(self): - history = """win,canary,21.0.1160.0,2012-06-01 19:44:35.936109 -mac,canary,21.0.1160.0,2012-06-01 18:20:02.003123 -mac,stable,19.0.1084.52,2012-06-01 17:59:21.559710 -win,canary,21.0.1159.2,2012-06-01 02:31:43.877688 -mac,stable,19.0.1084.53,2012-06-01 01:39:57.549149 -win,canary,21.0.1158.0,2012-05-31 20:16:55.615236 -win,canary,21.0.1157.0,2012-05-31 17:41:29.516013 -mac,canary,21.0.1158.0,2012-05-31 17:41:27.591354 -mac,beta,20.0.1132.21,2012-05-30 23:45:38.535586 -linux,beta,20.0.1132.21,2012-05-30 23:45:37.025015 -cf,beta,20.0.1132.21,2012-05-30 23:45:36.767529 -win,beta,20.0.1132.21,2012-05-30 23:44:56.675123 -win,canary,21.0.1156.1,2012-05-30 22:28:01.872056 -mac,canary,21.0.1156.1,2012-05-30 21:20:29.920390 -win,canary,21.0.1156.0,2012-05-30 12:46:48.046627 -mac,canary,21.0.1156.0,2012-05-30 12:14:21.305090""" - self.manifest = MakeManifest(copy.deepcopy(BCANARY_NONE)) - self._AddCsvHistory(history) - self.version_mapping = { - '21.0.1160.0': 'trunk.139984', - '21.0.1159.2': 'trunk.139890', - '21.0.1158.0': 'trunk.139740', - '21.0.1157.0': 'unknown', - '21.0.1156.1': 'trunk.139576', - '21.0.1156.0': 'trunk.139984'} - self.files.Add(MakePlatformBundle(21, 139890, '21.0.1159.2', OS_MLW)) - self.files.Add(MakePlatformBundle(21, 0, '21.0.1157.1', ('linux', 'win'))) - my_bundle = MakePlatformBundle(21, 139576, '21.0.1156.1', OS_MLW) - self.files.Add(my_bundle) - self._MakeDelegate() - self._Run(OS_MLW) - self._ReadUploadedManifest() - self._AssertUploadedManifestHasBundle(my_bundle, CANARY, - bundle_name=CANARY_BUNDLE_NAME) - def testExtensionWorksAsBz2(self): # Allow old bundles with just .bz2 extension to work self.manifest = MakeManifest(B18_NONE) @@ -734,46 +669,6 @@ mac,canary,21.0.1156.0,2012-05-30 12:14:21.305090""" self.assertRaises(update_nacl_manifest.UnknownLockedBundleException, self._Run, OS_MLW) - def testIgnoreLastDigitOnCanary(self): - # The final number in a canary build does not include any different - # changes, it is just a different experiment (e.g. using ASAN, or using - # aura). We should not compare these versions differently. - # - # Note that the version mapping will show that 31.0.1608.0 is different - # from 31.0.1608.1 -- this is because 31.0.1608.1 is built from the branch, - # not from trunk. Inspecting the branch would show that there are no - # changes (why would there be? No one has any reason to merge changes to a - # canary branch.) - self.manifest = MakeManifest(copy.deepcopy(BCANARY_NONE)) - history = """win,canary,31.0.1608.1,2013-08-22 09:33:24.469760 -mac,canary,31.0.1608.0,2013-08-22 07:18:09.762600""" - self._AddCsvHistory(history) - self.version_mapping['31.0.1608.1'] = 'trunk.218914' - self.version_mapping['31.0.1608.0'] = 'trunk.218872' - my_bundle = MakePlatformBundle(31, 218872, '31.0.1608.0', OS_MLW) - self.files.Add(my_bundle) - self._MakeDelegate() - self._Run(OS_MLW) - self._ReadUploadedManifest() - self._AssertUploadedManifestHasBundle(my_bundle, CANARY, - bundle_name=CANARY_BUNDLE_NAME) - - def testDontIgnoreLastDigitForNonCanary(self): - self.manifest = MakeManifest(B26_NONE) - self.history.Add(OS_M, BETA, V26_0_1386_1) # Only Mac - self.history.Add(OS_LW, BETA, V26_0_1386_0) # Only Linux, Windows. - self.files.Add(B26_0_1386_0_MLW) - - self._MakeDelegate() - # This raises because pepper_26 is not found in the history, and therefore - # "locked", but it also doesn't have an online version, therefore there is - # no good version number to upload. - # - # Basically we're asserting that 26.0.1386.1 != 26.0.1386.0, which would be - # true if it were canary. - self.assertRaises(update_nacl_manifest.UnknownLockedBundleException, - self._Run, OS_MLW) - def testUpdateBionic(self): bionic_bundle = copy.deepcopy(BBIONIC_NONE) self.manifest = MakeManifest(bionic_bundle) @@ -825,21 +720,9 @@ class TestUpdateVitals(unittest.TestCase): self.assertEqual(archive['checksum']['sha1'], self.sha1) -class TestRealDelegate(unittest.TestCase): - def setUp(self): - self.delegate = update_nacl_manifest.RealDelegate() - - def testGetTrunkRevision(self): - revision_dict = { - '21.0.1180.80': '151582', - '23.0.1271.89': '167132', - '24.0.1305.4': '164971', - } - for version, revision in revision_dict.iteritems(): - self.assertEqual('trunk.%s' % revision, - self.delegate.GetTrunkRevision(version)) - - if __name__ == '__main__': - logging.basicConfig(level=logging.INFO) + logging.basicConfig(level=logging.CRITICAL) + # Uncomment the following line to enable more debugging info. + # logging.getLogger('update_nacl_manifest').setLevel(logging.INFO) + sys.exit(unittest.main()) diff --git a/native_client_sdk/src/build_tools/update_nacl_manifest.py b/native_client_sdk/src/build_tools/update_nacl_manifest.py index ef542d4fa0..4754abf8d4 100755 --- a/native_client_sdk/src/build_tools/update_nacl_manifest.py +++ b/native_client_sdk/src/build_tools/update_nacl_manifest.py @@ -15,7 +15,6 @@ import csv import cStringIO import difflib import email -import json import logging import logging.handlers import manifest_util @@ -50,9 +49,47 @@ logger = logging.getLogger(__name__) def SplitVersion(version_string): """Split a version string (e.g. "18.0.1025.163") into its components. - Note that this function doesn't handle versions in the form "trunk.###". + e.g. + SplitVersion("trunk.123456") => ("trunk", "123456") + SplitVersion("18.0.1025.163") => (18, 0, 1025, 163) """ - return tuple(map(int, version_string.split('.'))) + parts = version_string.split('.') + if parts[0] == 'trunk': + return (parts[0], int(parts[1])) + return tuple([int(p) for p in parts]) + + +def GetMajorVersion(version_string): + """Get the major version number from a version string (e.g. "18.0.1025.163"). + + e.g. + GetMajorVersion("trunk.123456") => "trunk" + GetMajorVersion("18.0.1025.163") => 18 + """ + return SplitVersion(version_string)[0] + + +def CompareVersions(version1, version2): + """Compare two version strings and return -1, 0, 1 (similar to cmp). + + Versions can only be compared if they are both trunk versions, or neither is. + + e.g. + CompareVersions("trunk.123", "trunk.456") => -1 + CompareVersions("18.0.1025.163", "37.0.2054.3") => -1 + CompareVersions("trunk.123", "18.0.1025.163") => Error + + """ + split1 = SplitVersion(version1) + split2 = SplitVersion(version2) + if split1[0] == split2[0]: + return cmp(split1[1:], split2[1:]) + + if split1 == 'trunk' or split2 == 'trunk': + raise Exception("Unable to compare versions %s and %s" % ( + version1, version2)) + + return cmp(split1, split2) def JoinVersion(version_tuple): @@ -60,6 +97,8 @@ def JoinVersion(version_tuple): The tuple should be of the form (18, 0, 1025, 163). """ + assert len(version_tuple) == 4 + assert version_tuple[0] != 'trunk' return '.'.join(map(str, version_tuple)) @@ -146,15 +185,6 @@ class Delegate(object): tuple.""" raise NotImplementedError() - def GetTrunkRevision(self, version): - """Given a Chrome version, get its trunk revision. - - Args: - version: A version string of the form '18.0.1025.64' - Returns: - The revision number for that version, as a string.""" - raise NotImplementedError() - def GsUtil_ls(self, url): """Runs gsutil ls |url| @@ -223,12 +253,6 @@ class RealDelegate(Delegate): # os,channel,version,timestamp return history[1:] - def GetTrunkRevision(self, version): - """See Delegate.GetTrunkRevision""" - url = 'http://omahaproxy.appspot.com/revision.json?version=%s' % (version,) - data = json.loads(urllib2.urlopen(url).read()) - return 'trunk.%s' % int(data['chromium_revision']) - def GsUtil_ls(self, url): """See Delegate.GsUtil_ls""" try: @@ -366,8 +390,7 @@ class VersionFinder(object): shared_version_generator = self._FindNextSharedVersion(self.platforms, GetPlatformHistory) - return self._DoGetMostRecentSharedVersion(shared_version_generator, - allow_trunk_revisions=False) + return self._DoGetMostRecentSharedVersion(shared_version_generator) def GetMostRecentSharedCanary(self): """Returns the most recent version of a canary pepper bundle that exists on @@ -378,23 +401,12 @@ class VersionFinder(object): Returns: A tuple (version, channel, archives). The version is a string such as - "19.0.1084.41". The channel is always 'canary'. |archives| is a list of + "trunk.123456". The channel is always 'canary'. |archives| is a list of archive URLs.""" - # Canary versions that differ in the last digit shouldn't be considered - # different; this number is typically used to represent an experiment, e.g. - # using ASAN or aura. - def CanaryKey(version): - return version[:-1] - - # We don't ship canary on Linux, so it won't appear in self.history. - # Instead, we can use the matching Linux trunk build for that version. - shared_version_generator = self._FindNextSharedVersion( - set(self.platforms) - set(('linux',)), - self._GetPlatformCanaryHistory, CanaryKey) - return self._DoGetMostRecentSharedVersion(shared_version_generator, - allow_trunk_revisions=True) - - def GetAvailablePlatformArchivesFor(self, version, allow_trunk_revisions): + version_generator = self._FindNextTrunkVersion() + return self._DoGetMostRecentSharedVersion(version_generator) + + def GetAvailablePlatformArchivesFor(self, version): """Returns a sequence of archives that exist for a given version, on the given platforms. @@ -403,8 +415,6 @@ class VersionFinder(object): Args: version: The version to find archives for. (e.g. "18.0.1025.164") - allow_trunk_revisions: If True, will search for archives using the - trunk revision that matches the branch version. Returns: A tuple (archives, missing_archives). |archives| is a list of archive URLs, |missing_archives| is a list of archive names. @@ -419,21 +429,11 @@ class VersionFinder(object): if self.extra_archives: for extra_archive, extra_archive_min_version in self.extra_archives: - if SplitVersion(version) >= SplitVersion(extra_archive_min_version): + if CompareVersions(version, extra_archive_min_version) >= 0: expected_archives.add(extra_archive) found_archives = set(GetCanonicalArchiveName(a) for a in archive_urls) missing_archives = expected_archives - found_archives - if allow_trunk_revisions and missing_archives: - # Try to find trunk versions of any missing archives. - trunk_version = self.delegate.GetTrunkRevision(version) - trunk_archives = self._GetAvailableArchivesFor(trunk_version) - for trunk_archive_url in trunk_archives: - trunk_archive = GetCanonicalArchiveName(trunk_archive_url) - if trunk_archive in missing_archives: - archive_urls.append(trunk_archive_url) - missing_archives.discard(trunk_archive) - # Only return archives that are "expected". def IsExpected(url): return GetCanonicalArchiveName(url) in expected_archives @@ -441,8 +441,7 @@ class VersionFinder(object): expected_archive_urls = [u for u in archive_urls if IsExpected(u)] return expected_archive_urls, missing_archives - def _DoGetMostRecentSharedVersion(self, shared_version_generator, - allow_trunk_revisions): + def _DoGetMostRecentSharedVersion(self, shared_version_generator): """Returns the most recent version of a pepper bundle that exists on all given platforms. @@ -451,8 +450,6 @@ class VersionFinder(object): Args: shared_version_generator: A generator that will yield (version, channel) tuples in order of most recent to least recent. - allow_trunk_revisions: If True, will search for archives using the - trunk revision that matches the branch version. Returns: A tuple (version, channel, archives). The version is a string such as "19.0.1084.41". The channel is one of ('stable', 'beta', 'dev', @@ -477,8 +474,7 @@ class VersionFinder(object): logger.info('Found shared version: %s, channel: %s' % ( version, channel)) - archives, missing_archives = self.GetAvailablePlatformArchivesFor( - version, allow_trunk_revisions) + archives, missing_archives = self.GetAvailablePlatformArchivesFor(version) if not missing_archives: return version, channel, archives @@ -506,24 +502,7 @@ class VersionFinder(object): (with_major_version == 0 or with_major_version == version[0])): yield channel, version - def _GetPlatformCanaryHistory(self, with_platform): - """Yields Chrome history for a given platform, but only for canary - versions. - - Args: - with_platform: The name of the platform to filter for. - Returns: - A generator that yields a tuple (channel, version) for each version that - matches the platform and uses the canary channel. The version returned is - a tuple as returned from SplitVersion. - """ - for platform, channel, version, _ in self.history: - version = SplitVersion(version) - if with_platform == platform and channel == CANARY: - yield channel, version - - - def _FindNextSharedVersion(self, platforms, generator_func, key_func=None): + def _FindNextSharedVersion(self, platforms, generator_func): """Yields versions of Chrome that exist on all given platforms, in order of newest to oldest. @@ -535,17 +514,11 @@ class VersionFinder(object): ('mac', 'linux', 'win') generator_func: A function which takes a platform and returns a generator that yields (channel, version) tuples. - key_func: A function to convert the version into a value that should be - used for comparison. See python built-in sorted() or min(), for - an example. Returns: A generator that yields a tuple (version, channel) for each version that matches all platforms and the major version. The version returned is a string (e.g. "18.0.1025.164"). """ - if not key_func: - key_func = lambda x: x - platform_generators = [] for platform in platforms: platform_generators.append(generator_func(platform)) @@ -563,19 +536,13 @@ class VersionFinder(object): platform, JoinVersion(platform_versions[i][1]))) logger.info('Checking versions: %s' % ', '.join(msg_info)) - shared_version = min((v for c, v in platform_versions), key=key_func) - - if all(key_func(v) == key_func(shared_version) - for c, v in platform_versions): - # The real shared_version should be the real minimum version. This will - # be different from shared_version above only if key_func compares two - # versions with different values as equal. - min_version = min((v for c, v in platform_versions)) + shared_version = min((v for c, v in platform_versions)) + if all(v == shared_version for c, v in platform_versions): # grab the channel from an arbitrary platform first_platform = platform_versions[0] channel = first_platform[0] - yield JoinVersion(min_version), channel + yield JoinVersion(shared_version), channel # force increment to next version for all platforms shared_version = None @@ -589,6 +556,30 @@ class VersionFinder(object): return + def _FindNextTrunkVersion(self): + """Yields all trunk versions that exist in the cloud storage bucket, newest + to oldest. + + Returns: + A generator that yields a tuple (version, channel) for each version that + matches all platforms and the major version. The version returned is a + string (e.g. "trunk.123456"). + """ + files = self.delegate.GsUtil_ls(GS_BUCKET_PATH) + assert all(f.startswith('gs://') for f in files) + + trunk_versions = [] + for f in files: + match = re.search(r'(trunk\.\d+)', f) + if match: + trunk_versions.append(match.group(1)) + + trunk_versions.sort(reverse=True) + + for version in trunk_versions: + yield version, 'canary' + + def _GetAvailableArchivesFor(self, version_string): """Downloads a list of all available archives for a given version. @@ -602,7 +593,7 @@ class VersionFinder(object): All returned URLs will use the gs:// schema.""" files = self.delegate.GsUtil_ls(GS_BUCKET_PATH + version_string) - assert all(file.startswith('gs://') for file in files) + assert all(f.startswith('gs://') for f in files) archives = [f for f in files if not f.endswith('.json')] manifests = [f for f in files if f.endswith('.json')] @@ -657,7 +648,7 @@ class Updater(object): bundles that contain no archives will be considered for auto-updating.""" # Make sure there is only one stable branch: the one with the max version. # All others are post-stable. - stable_major_versions = [SplitVersion(version)[0] for _, version, channel, _ + stable_major_versions = [GetMajorVersion(version) for _, version, channel, _ in self.versions_to_update if channel == 'stable'] # Add 0 in case there are no stable versions. max_stable_version = max([0] + stable_major_versions) @@ -697,7 +688,7 @@ class Updater(object): bundle.MergeWithBundle(platform_bundle) # Fix the stability and recommended values - major_version = SplitVersion(version)[0] + major_version = GetMajorVersion(version) if major_version < max_stable_version: bundle.stability = 'post_stable' else: @@ -832,7 +823,8 @@ def Run(delegate, platforms, extra_archives, fixed_bundle_versions=None): try: if bundle.name == BIONIC_CANARY_BUNDLE_NAME: logger.info('>>> Looking for most recent bionic_canary...') - version_finder = VersionFinder(delegate, platforms, extra_archives, + # Ignore extra_archives on bionic; There is no naclports bundle yet. + version_finder = VersionFinder(delegate, platforms, None, is_bionic=True) version, channel, archives = version_finder.GetMostRecentSharedCanary() elif bundle.name == CANARY_BUNDLE_NAME: @@ -857,9 +849,8 @@ def Run(delegate, platforms, extra_archives, fixed_bundle_versions=None): # version may not be in the history.) version = fixed_bundle_versions[bundle.name] logger.info('Fixed bundle version: %s, %s' % (bundle.name, version)) - allow_trunk_revisions = bundle.name == CANARY_BUNDLE_NAME - archives, missing = version_finder.GetAvailablePlatformArchivesFor( - version, allow_trunk_revisions) + archives, missing = \ + version_finder.GetAvailablePlatformArchivesFor(version) if missing: logger.warn( 'Some archives for version %s of bundle %s don\'t exist: ' diff --git a/native_client_sdk/src/doc/README b/native_client_sdk/src/doc/README index 878e9dc230..2cdfe1130c 100644 --- a/native_client_sdk/src/doc/README +++ b/native_client_sdk/src/doc/README @@ -22,8 +22,10 @@ All output is written to native_client_sdk/doc_generated/... How to build ------------ -To build the docs you will needs sphinx installed (and sphinx-build in your -path). On debian/ubuntu this command is part of the ``python-sphinx`` package. +To build the docs you will need these debian/ubuntu packages: + +* python-sphinx +* python-beautifulsoup There are two primary make targets: ``chromesite`` and ``chromesite_rst``. The ``chromesite`` target will build all documentation, including the doxygen docs. diff --git a/native_client_sdk/src/doc/community/application-gallery.rst b/native_client_sdk/src/doc/community/application-gallery.rst deleted file mode 100644 index eb0942adac..0000000000 --- a/native_client_sdk/src/doc/community/application-gallery.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _application-gallery: - -################### -Application Gallery -################### - diff --git a/native_client_sdk/src/doc/community/middleware.rst b/native_client_sdk/src/doc/community/middleware.rst deleted file mode 100644 index 9a02f13fc9..0000000000 --- a/native_client_sdk/src/doc/community/middleware.rst +++ /dev/null @@ -1,4 +0,0 @@ -############################### -Middleware and Software Support -############################### - diff --git a/native_client_sdk/src/doc/devguide/devcycle/dynamic-loading.rst b/native_client_sdk/src/doc/devguide/devcycle/dynamic-loading.rst index 28cbcd2386..5c394cabec 100644 --- a/native_client_sdk/src/doc/devguide/devcycle/dynamic-loading.rst +++ b/native_client_sdk/src/doc/devguide/devcycle/dynamic-loading.rst @@ -307,7 +307,7 @@ As described above, an application's manifest file must explicitly list all the executable code modules that the application directly depends on, including modules from the application itself (.nexe and .so files), modules from the Native Client SDK (e.g., libppapi_cpp.so), and perhaps also modules from -`naclport <naclports_>`_ or from :doc:`middleware systems <../../community/middleware>` that +`naclport <naclports_>`_ or from `middleware systems <../../community/middleware>`_ that the application uses. You must provide all of those modules as part of the application deployment process. diff --git a/native_client_sdk/src/doc/image-list.rst b/native_client_sdk/src/doc/image-list.rst new file mode 100644 index 0000000000..767543940e --- /dev/null +++ b/native_client_sdk/src/doc/image-list.rst @@ -0,0 +1,49 @@ +:orphan: + +Native Client Documentation Images +=================================== + +.. image:: /images/airmech.png +.. image:: /images/bastion.png +.. image:: /images/battle-for-wesnoth.png +.. image:: /images/conways-life.png +.. image:: /images/cordy.png +.. image:: /images/dark-legends.png +.. image:: /images/dontstarve.png +.. image:: /images/dust.png +.. image:: /images/eets.png +.. image:: /images/flite.jpg +.. image:: /images/flocking-geese.png +.. image:: /images/gohomedino.png +.. image:: /images/hex.png +.. image:: /images/jumpbump.jpg +.. image:: /images/lara-croft-guardian.png +.. image:: /images/mame.jpg +.. image:: /images/mini-ninjas.png +.. image:: /images/moonbreakers.png +.. image:: /images/muffinknight.png +.. image:: /images/ogre.jpg +.. image:: /images/pirates.png +.. image:: /images/planet-buster.png +.. image:: /images/pocket-legends.png +.. image:: /images/running-fred.png +.. image:: /images/sdk-examples.png +.. image:: /images/secureshell.png +.. image:: /images/sixty-second-shooter.png +.. image:: /images/sleepy-jack.png +.. image:: /images/sodasynth.jpg +.. image:: /images/star-legends.png +.. image:: /images/totemo.png +.. image:: /images/wolf-toss.png +.. image:: /images/ztm.png +.. image:: /images/Ogre_logo.png +.. image:: /images/SDL_logo.png +.. image:: /images/blitztech_logo.jpg +.. image:: /images/bullet_logo-210-86.png +.. image:: /images/fmod_logo.png +.. image:: /images/havok_logo.jpg +.. image:: /images/moai_logo.png +.. image:: /images/mp_mono_logo.png +.. image:: /images/qt_logo.png +.. image:: /images/unity_logo.jpg +.. image:: /images/wwise_logo.png
\ No newline at end of file diff --git a/native_client_sdk/src/doc/images/Ogre_logo.png b/native_client_sdk/src/doc/images/Ogre_logo.png Binary files differnew file mode 100644 index 0000000000..6ad8c4d46c --- /dev/null +++ b/native_client_sdk/src/doc/images/Ogre_logo.png diff --git a/native_client_sdk/src/doc/images/SDL_logo.png b/native_client_sdk/src/doc/images/SDL_logo.png Binary files differnew file mode 100644 index 0000000000..6932b31e77 --- /dev/null +++ b/native_client_sdk/src/doc/images/SDL_logo.png diff --git a/native_client_sdk/src/doc/images/airmech.png b/native_client_sdk/src/doc/images/airmech.png Binary files differnew file mode 100644 index 0000000000..fd5a740255 --- /dev/null +++ b/native_client_sdk/src/doc/images/airmech.png diff --git a/native_client_sdk/src/doc/images/bastion.png b/native_client_sdk/src/doc/images/bastion.png Binary files differnew file mode 100644 index 0000000000..673e76fdd7 --- /dev/null +++ b/native_client_sdk/src/doc/images/bastion.png diff --git a/native_client_sdk/src/doc/images/battle-for-wesnoth.png b/native_client_sdk/src/doc/images/battle-for-wesnoth.png Binary files differnew file mode 100644 index 0000000000..5fcac3613c --- /dev/null +++ b/native_client_sdk/src/doc/images/battle-for-wesnoth.png diff --git a/native_client_sdk/src/doc/images/blitztech_logo.jpg b/native_client_sdk/src/doc/images/blitztech_logo.jpg Binary files differnew file mode 100644 index 0000000000..9f900ba295 --- /dev/null +++ b/native_client_sdk/src/doc/images/blitztech_logo.jpg diff --git a/native_client_sdk/src/doc/images/bullet_logo-210-86.png b/native_client_sdk/src/doc/images/bullet_logo-210-86.png Binary files differnew file mode 100644 index 0000000000..6f411780af --- /dev/null +++ b/native_client_sdk/src/doc/images/bullet_logo-210-86.png diff --git a/native_client_sdk/src/doc/images/conways-life.png b/native_client_sdk/src/doc/images/conways-life.png Binary files differnew file mode 100644 index 0000000000..df46811dd5 --- /dev/null +++ b/native_client_sdk/src/doc/images/conways-life.png diff --git a/native_client_sdk/src/doc/images/cordy.png b/native_client_sdk/src/doc/images/cordy.png Binary files differnew file mode 100644 index 0000000000..7db7354992 --- /dev/null +++ b/native_client_sdk/src/doc/images/cordy.png diff --git a/native_client_sdk/src/doc/images/dark-legends.png b/native_client_sdk/src/doc/images/dark-legends.png Binary files differnew file mode 100644 index 0000000000..c532e2af89 --- /dev/null +++ b/native_client_sdk/src/doc/images/dark-legends.png diff --git a/native_client_sdk/src/doc/images/dontstarve.png b/native_client_sdk/src/doc/images/dontstarve.png Binary files differnew file mode 100644 index 0000000000..b94b96ba5e --- /dev/null +++ b/native_client_sdk/src/doc/images/dontstarve.png diff --git a/native_client_sdk/src/doc/images/dust.png b/native_client_sdk/src/doc/images/dust.png Binary files differnew file mode 100644 index 0000000000..449ac5eb1d --- /dev/null +++ b/native_client_sdk/src/doc/images/dust.png diff --git a/native_client_sdk/src/doc/images/eets.png b/native_client_sdk/src/doc/images/eets.png Binary files differnew file mode 100644 index 0000000000..9711ee013b --- /dev/null +++ b/native_client_sdk/src/doc/images/eets.png diff --git a/native_client_sdk/src/doc/images/flite.jpg b/native_client_sdk/src/doc/images/flite.jpg Binary files differnew file mode 100644 index 0000000000..dfb8d12431 --- /dev/null +++ b/native_client_sdk/src/doc/images/flite.jpg diff --git a/native_client_sdk/src/doc/images/flocking-geese.png b/native_client_sdk/src/doc/images/flocking-geese.png Binary files differnew file mode 100644 index 0000000000..d293e443a7 --- /dev/null +++ b/native_client_sdk/src/doc/images/flocking-geese.png diff --git a/native_client_sdk/src/doc/images/fmod_logo.png b/native_client_sdk/src/doc/images/fmod_logo.png Binary files differnew file mode 100644 index 0000000000..cfa2f7a116 --- /dev/null +++ b/native_client_sdk/src/doc/images/fmod_logo.png diff --git a/native_client_sdk/src/doc/images/gohomedino.png b/native_client_sdk/src/doc/images/gohomedino.png Binary files differnew file mode 100644 index 0000000000..ee98cbf908 --- /dev/null +++ b/native_client_sdk/src/doc/images/gohomedino.png diff --git a/native_client_sdk/src/doc/images/havok_logo.jpg b/native_client_sdk/src/doc/images/havok_logo.jpg Binary files differnew file mode 100644 index 0000000000..d6ae0c6118 --- /dev/null +++ b/native_client_sdk/src/doc/images/havok_logo.jpg diff --git a/native_client_sdk/src/doc/images/hex.png b/native_client_sdk/src/doc/images/hex.png Binary files differnew file mode 100644 index 0000000000..023aefe0a2 --- /dev/null +++ b/native_client_sdk/src/doc/images/hex.png diff --git a/native_client_sdk/src/doc/images/jumpbump.jpg b/native_client_sdk/src/doc/images/jumpbump.jpg Binary files differnew file mode 100644 index 0000000000..6bcab78412 --- /dev/null +++ b/native_client_sdk/src/doc/images/jumpbump.jpg diff --git a/native_client_sdk/src/doc/images/lara-croft-guardian.png b/native_client_sdk/src/doc/images/lara-croft-guardian.png Binary files differnew file mode 100644 index 0000000000..cf9c550964 --- /dev/null +++ b/native_client_sdk/src/doc/images/lara-croft-guardian.png diff --git a/native_client_sdk/src/doc/images/mame.jpg b/native_client_sdk/src/doc/images/mame.jpg Binary files differnew file mode 100644 index 0000000000..7972d7aca3 --- /dev/null +++ b/native_client_sdk/src/doc/images/mame.jpg diff --git a/native_client_sdk/src/doc/images/mini-ninjas.png b/native_client_sdk/src/doc/images/mini-ninjas.png Binary files differnew file mode 100644 index 0000000000..6edec36a66 --- /dev/null +++ b/native_client_sdk/src/doc/images/mini-ninjas.png diff --git a/native_client_sdk/src/doc/images/moai_logo.png b/native_client_sdk/src/doc/images/moai_logo.png Binary files differnew file mode 100644 index 0000000000..b527e0d085 --- /dev/null +++ b/native_client_sdk/src/doc/images/moai_logo.png diff --git a/native_client_sdk/src/doc/images/moonbreakers.png b/native_client_sdk/src/doc/images/moonbreakers.png Binary files differnew file mode 100644 index 0000000000..193893c938 --- /dev/null +++ b/native_client_sdk/src/doc/images/moonbreakers.png diff --git a/native_client_sdk/src/doc/images/mp_mono_logo.png b/native_client_sdk/src/doc/images/mp_mono_logo.png Binary files differnew file mode 100644 index 0000000000..225760b343 --- /dev/null +++ b/native_client_sdk/src/doc/images/mp_mono_logo.png diff --git a/native_client_sdk/src/doc/images/muffinknight.png b/native_client_sdk/src/doc/images/muffinknight.png Binary files differnew file mode 100644 index 0000000000..3ab73af070 --- /dev/null +++ b/native_client_sdk/src/doc/images/muffinknight.png diff --git a/native_client_sdk/src/doc/images/ogre.jpg b/native_client_sdk/src/doc/images/ogre.jpg Binary files differnew file mode 100644 index 0000000000..25a7ea9bff --- /dev/null +++ b/native_client_sdk/src/doc/images/ogre.jpg diff --git a/native_client_sdk/src/doc/images/pirates.png b/native_client_sdk/src/doc/images/pirates.png Binary files differnew file mode 100644 index 0000000000..f8b7481f25 --- /dev/null +++ b/native_client_sdk/src/doc/images/pirates.png diff --git a/native_client_sdk/src/doc/images/planet-buster.png b/native_client_sdk/src/doc/images/planet-buster.png Binary files differnew file mode 100644 index 0000000000..5a30d55856 --- /dev/null +++ b/native_client_sdk/src/doc/images/planet-buster.png diff --git a/native_client_sdk/src/doc/images/pocket-legends.png b/native_client_sdk/src/doc/images/pocket-legends.png Binary files differnew file mode 100644 index 0000000000..0dc3164751 --- /dev/null +++ b/native_client_sdk/src/doc/images/pocket-legends.png diff --git a/native_client_sdk/src/doc/images/qt_logo.png b/native_client_sdk/src/doc/images/qt_logo.png Binary files differnew file mode 100644 index 0000000000..3f01f83a8e --- /dev/null +++ b/native_client_sdk/src/doc/images/qt_logo.png diff --git a/native_client_sdk/src/doc/images/running-fred.png b/native_client_sdk/src/doc/images/running-fred.png Binary files differnew file mode 100644 index 0000000000..b7f41ab4b2 --- /dev/null +++ b/native_client_sdk/src/doc/images/running-fred.png diff --git a/native_client_sdk/src/doc/images/sdk-examples.png b/native_client_sdk/src/doc/images/sdk-examples.png Binary files differnew file mode 100644 index 0000000000..a269645c76 --- /dev/null +++ b/native_client_sdk/src/doc/images/sdk-examples.png diff --git a/native_client_sdk/src/doc/images/secureshell.png b/native_client_sdk/src/doc/images/secureshell.png Binary files differnew file mode 100644 index 0000000000..fc511e10a7 --- /dev/null +++ b/native_client_sdk/src/doc/images/secureshell.png diff --git a/native_client_sdk/src/doc/images/sixty-second-shooter.png b/native_client_sdk/src/doc/images/sixty-second-shooter.png Binary files differnew file mode 100644 index 0000000000..3874d95564 --- /dev/null +++ b/native_client_sdk/src/doc/images/sixty-second-shooter.png diff --git a/native_client_sdk/src/doc/images/sleepy-jack.png b/native_client_sdk/src/doc/images/sleepy-jack.png Binary files differnew file mode 100644 index 0000000000..4166a32f0c --- /dev/null +++ b/native_client_sdk/src/doc/images/sleepy-jack.png diff --git a/native_client_sdk/src/doc/images/sodasynth.jpg b/native_client_sdk/src/doc/images/sodasynth.jpg Binary files differnew file mode 100644 index 0000000000..b835f4c0b7 --- /dev/null +++ b/native_client_sdk/src/doc/images/sodasynth.jpg diff --git a/native_client_sdk/src/doc/images/star-legends.png b/native_client_sdk/src/doc/images/star-legends.png Binary files differnew file mode 100644 index 0000000000..43147d381e --- /dev/null +++ b/native_client_sdk/src/doc/images/star-legends.png diff --git a/native_client_sdk/src/doc/images/totemo.png b/native_client_sdk/src/doc/images/totemo.png Binary files differnew file mode 100644 index 0000000000..fd0e0618f1 --- /dev/null +++ b/native_client_sdk/src/doc/images/totemo.png diff --git a/native_client_sdk/src/doc/images/unity_logo.jpg b/native_client_sdk/src/doc/images/unity_logo.jpg Binary files differnew file mode 100644 index 0000000000..a6e86f7cc0 --- /dev/null +++ b/native_client_sdk/src/doc/images/unity_logo.jpg diff --git a/native_client_sdk/src/doc/images/voronoi1.png b/native_client_sdk/src/doc/images/voronoi1.png Binary files differnew file mode 100644 index 0000000000..3616ba469b --- /dev/null +++ b/native_client_sdk/src/doc/images/voronoi1.png diff --git a/native_client_sdk/src/doc/images/voronoi2.png b/native_client_sdk/src/doc/images/voronoi2.png Binary files differnew file mode 100644 index 0000000000..67bf262e24 --- /dev/null +++ b/native_client_sdk/src/doc/images/voronoi2.png diff --git a/native_client_sdk/src/doc/images/wolf-toss.png b/native_client_sdk/src/doc/images/wolf-toss.png Binary files differnew file mode 100644 index 0000000000..eea1fd1fd3 --- /dev/null +++ b/native_client_sdk/src/doc/images/wolf-toss.png diff --git a/native_client_sdk/src/doc/images/wwise_logo.png b/native_client_sdk/src/doc/images/wwise_logo.png Binary files differnew file mode 100644 index 0000000000..89fc37c5d5 --- /dev/null +++ b/native_client_sdk/src/doc/images/wwise_logo.png diff --git a/native_client_sdk/src/doc/images/ztm.png b/native_client_sdk/src/doc/images/ztm.png Binary files differnew file mode 100644 index 0000000000..6ac204efdb --- /dev/null +++ b/native_client_sdk/src/doc/images/ztm.png diff --git a/native_client_sdk/src/doc/io2014.rst b/native_client_sdk/src/doc/io2014.rst new file mode 100644 index 0000000000..29996c15e8 --- /dev/null +++ b/native_client_sdk/src/doc/io2014.rst @@ -0,0 +1,186 @@ +################### +Building a NaCl App +################### +In the browser! +--------------- + +Follow along with Brad Nelson's Google I/O 2014 talk. +Explore our new in-browser development environment and debugger. + +Learn how easy it is to edit, build, and debug NaCl application +all in your desktop web browser or on a Chromebook. +Work either on-line or off-line! + +.. raw:: html + + <iframe class="video" width="500" height="281" + src="//www.youtube.com/embed/MvKEomoiKBA?rel=0" frameborder="0"></iframe> + + +Installation +============ + +The setup process currently requires several steps. +We're working to reduce the number of steps in future releases. +As the process gets easier, we'll update this page. + +You currently need to: + +* Navigate to: chrome://flags and: + + * Enable **Native Client**. + * Enable **Native Client GDB-based debugging**. (For the debugger) + +* Install the NaCl in-browser debugger. + + * Install the `NaCl Debugger Extension <https://chrome.google.com/webstore/detail/nacl-debugger/ncpkkhabohglmhjibnloicgdfjmojkfd>`_. + + * Install `GDB <https://chrome.google.com/webstore/detail/gdb/gkjoooooiaohiceibmdleokniplmbahe>`_. + +* Install the `NaCl Development Environment <https://chrome.google.com/webstore/detail/nacl-development-environm/aljpgkjeipgnmdpikaajmnepbcfkglfa>`_. + + * First run is slow (as it downloads and installs packages). + + +Editor +====== + +To follow along in this tutorial, you'll need to use a text editor to modify +various files in our development environment. +There are currently two editor options, nano or vim. +Emacs is coming soon... +If you're unsure what to pick, nano is simpler to start with and has on-screen +help. + +* You can open **nano** like this:: + + $ nano <filename> + + Here's an online `nano tutorial <http://mintaka.sdsu.edu/reu/nano.html>`_. + +* You can open **vim** like this:: + + $ vim <filename> + + Here's an online `vim tutorial <http://www.openvim.com/tutorial.html>`_. + + +Git Setup +========= + +This tutorial also uses a revision control program called +`git <http://en.wikipedia.org/wiki/Git_(software)>`_. +In order to commit to a git repository, +you need to setup your environment to with your identity. + +You'll need to add these lines to `~/.bashrc` to cause them to be invoked each +time you start the development environment. +:: + + git config --global user.name "John Doe" + git config --global user.email johndoe@example.com + +Tour (follow the video) +======================= + +Create a working directory and go into it:: + + $ mkdir work + $ cd work + +Download a zip file containing our sample:: + + $ curl http://nacltools.storage.googleapis.com/io2014/voronoi.zip -O + $ ls -l + +Unzip the sample:: + + $ unzip voronoi.zip + +Go into the sample and take a look at the files inside:: + + $ cd voronoi + $ ls + +Our project combines voronoi.cc with several C++ libraries to produce a NEXE +(or Native Client Executable). + +.. image:: /images/voronoi1.png + +The resulting application combines the NEXE with some Javascript to load +the NaCl module, producing the complete application. + +.. image:: /images/voronoi2.png + +Let's use git (a revision control program) to track our changes. + +First, create a new repository:: + + $ git init + +Add everything here:: + + $ git add . + +Then commit our starting state:: + + $ git commit -m "imported voronoi demo" + +Now, likes run **make** to compile our program (NOTE: Changed since video, +we've got Makefiles!):: + + $ make + +Oops, we get this error:: + + voronoi.cc: In member function 'void Voronoi::Update()': + voronoi.cc:506: error: 'struct PSContext2D_t' has no member named 'hieght' + +We'll need to start an editor to fix this. +You'll want to change *hieght* to *height* on line 506. +Then rebuild:: + + $ make + +Lets look at the diff:: + + $ git diff + +And commit our fix:: + + $ git commit -am "fixed build error" + +To test our application, we run a local web server, written in python. +Run the server with this command (NOTE: Running through a Makefile +now):: + + $ make serve + +Then, navigate to http://localhost:5103/ to test the demo. + +If you follow along with the demo video, you will discover the sample crashes +when you change the thread count. + +*Debugger walk-thru coming soon.* + +Once you've identified the problem. You'll want to stop the test server. +Press enter to halt it. + +Open your editor again, navigate to line 485 and change *valu* to *value*. + +Then rebuild:: + + $ make + +Check the diff and commit our fix:: + + $ git diff + $ git commit -am "fixed thread ui bug" + +Now look at your commit history:: + + $ git log + +Run the demo again. And everything now works:: + + $ make serve diff --git a/native_client_sdk/src/doc/quick-start.rst b/native_client_sdk/src/doc/quick-start.rst index 8e7d7a4ad1..89535d6d67 100644 --- a/native_client_sdk/src/doc/quick-start.rst +++ b/native_client_sdk/src/doc/quick-start.rst @@ -9,8 +9,8 @@ To get started with Native Client: #. Read the :doc:`Technical Overview <overview>` to understand what Native Client is, how a Native Client application is structured and to get a feel for what you need to do to port existing code. -#. Play with some of the applications in the :doc:`Application Gallery - <community/application-gallery>` to see what others have done so far. +#. Play with some of the applications in the `Application Gallery + <community/application-gallery>`_ to see what others have done so far. #. Go through the :doc:`Getting Started Tutorial <devguide/tutorial/tutorial-part1>`. The tutorial walks you through how to get Native Client set up for the first time and check for browser version compatibility. diff --git a/native_client_sdk/src/doc/sitemap.rst b/native_client_sdk/src/doc/sitemap.rst index 97aac9e218..4b5ef241ab 100644 --- a/native_client_sdk/src/doc/sitemap.rst +++ b/native_client_sdk/src/doc/sitemap.rst @@ -37,9 +37,8 @@ Contents: devguide/coding/url-loading.rst devguide/coding/view-focus-input-events.rst devguide/distributing.rst + io2014.rst community/index.rst - community/application-gallery.rst - community/middleware.rst community/security-contest/index.rst community/security-contest/contest-announcement.rst community/security-contest/contest-terms.rst diff --git a/native_client_sdk/src/examples/demo/earth_simd/earth.jpg b/native_client_sdk/src/examples/demo/earth_simd/earth.jpg Binary files differindex fbfb6bd2a7..82bd420a87 100644 --- a/native_client_sdk/src/examples/demo/earth_simd/earth.jpg +++ b/native_client_sdk/src/examples/demo/earth_simd/earth.jpg diff --git a/native_client_sdk/src/examples/demo/earth_simd/earthnight.jpg b/native_client_sdk/src/examples/demo/earth_simd/earthnight.jpg Binary files differindex fa721aea36..301f152567 100644 --- a/native_client_sdk/src/examples/demo/earth_simd/earthnight.jpg +++ b/native_client_sdk/src/examples/demo/earth_simd/earthnight.jpg diff --git a/native_client_sdk/src/libraries/nacl_io/host_resolver.cc b/native_client_sdk/src/libraries/nacl_io/host_resolver.cc index b8100a72b5..c16fbcb16d 100644 --- a/native_client_sdk/src/libraries/nacl_io/host_resolver.cc +++ b/native_client_sdk/src/libraries/nacl_io/host_resolver.cc @@ -2,9 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif + #include "nacl_io/host_resolver.h" #include <assert.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> @@ -231,7 +236,7 @@ int HostResolver::getaddrinfo(const char* node, if (service != NULL) { char* cp; port = strtol(service, &cp, 10); - if (port > 0 && port <= 65535 && *cp == '\0') { + if (port >= 0 && port <= UINT16_MAX && *cp == '\0') { port = htons(port); } else { return EAI_SERVICE; diff --git a/native_client_sdk/src/tests/nacl_io_test/host_resolver_test.cc b/native_client_sdk/src/tests/nacl_io_test/host_resolver_test.cc index fab3ec52d3..3aaec27b32 100644 --- a/native_client_sdk/src/tests/nacl_io_test/host_resolver_test.cc +++ b/native_client_sdk/src/tests/nacl_io_test/host_resolver_test.cc @@ -89,7 +89,7 @@ TEST_F(HostResolverTest, Getaddrinfo_Numeric) { struct sockaddr_in* in; struct addrinfo hints; - // Numberic only + // Numeric only memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; @@ -107,6 +107,34 @@ TEST_F(HostResolverTest, Getaddrinfo_Numeric) { ki_freeaddrinfo(ai); } +TEST_F(HostResolverTest, Getaddrinfo_NumericService) { + struct addrinfo* ai = NULL; + struct sockaddr_in* in; + struct addrinfo hints; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + + ASSERT_EQ(0, ki_getaddrinfo("1.2.3.4", "0", &hints, &ai)); + ASSERT_NE(NULL_INFO, ai); + ASSERT_NE(NULL_ADDR, ai->ai_addr); + in = (struct sockaddr_in*)ai->ai_addr; + uint16_t expected_port = htons(0); + ASSERT_EQ(expected_port, in->sin_port); + ASSERT_EQ(NULL_INFO, ai->ai_next); + ki_freeaddrinfo(ai); + + ASSERT_EQ(0, ki_getaddrinfo("1.2.3.4", "65000", &hints, &ai)); + ASSERT_NE(NULL_INFO, ai); + ASSERT_NE(NULL_ADDR, ai->ai_addr); + in = (struct sockaddr_in*)ai->ai_addr; + expected_port = htons(65000); + ASSERT_EQ(expected_port, in->sin_port); + ASSERT_EQ(NULL_INFO, ai->ai_next); + ki_freeaddrinfo(ai); +} + TEST_F(HostResolverTest, Getaddrinfo_MissingPPAPI) { // Verify that full lookups fail due to lack of PPAPI interfaces struct addrinfo* ai = NULL; |