OLD | NEW |
---|---|
1 .. _sdk-examples-2: | 1 .. _sdk-examples-2: |
2 | 2 |
3 .. TODO: After default toolchain is changed to pnacl, recreate the make examples . | 3 .. TODO: After default toolchain is changed to pnacl, recreate the make examples . |
4 | 4 |
5 Examples | 5 Examples |
6 ======== | 6 ======== |
7 | 7 |
8 Every Native Client SDK bundle comes with a folder of example applications. | 8 Every Native Client SDK bundle comes with a folder of example applications. |
9 Each example demonstrates one or two key Native Client programming concepts. | 9 Each example demonstrates one or two key Native Client programming concepts. |
10 After you've :doc:`downloaded the SDK <download>`, follow the instructions | 10 After you've :doc:`downloaded the SDK <download>`, follow the instructions |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 $ export CHROME_PATH=<Path to Google Chrome> | 201 $ export CHROME_PATH=<Path to Google Chrome> |
202 | 202 |
203 .. _run_sdk_examples_as_packaged: | 203 .. _run_sdk_examples_as_packaged: |
204 | 204 |
205 Run the SDK examples as packaged apps | 205 Run the SDK examples as packaged apps |
206 ------------------------------------- | 206 ------------------------------------- |
207 | 207 |
208 Each example can also be launched as a packaged application. A packaged | 208 Each example can also be launched as a packaged application. A packaged |
209 application is a special zip file (with a .crx extension) hosted in the Chrome | 209 application is a special zip file (with a .crx extension) hosted in the Chrome |
210 Web Store. This file contains all of the application parts: A Chrome Web Store | 210 Web Store. This file contains all of the application parts: A Chrome Web Store |
211 manifest file (manifest.json), an icon, and all of the regular Native Client | 211 manifest file (``manifest.json``), an icon, and all of the regular Native Client |
212 application files. Refer to `What are Chrome Apps </apps/about_apps>`_ for more | 212 application files. Refer to `What are Chrome Apps </apps/about_apps>`_ for more |
213 information about creating a packaged application. | 213 information about creating a packaged application. |
214 | 214 |
215 Some Pepper features, such as TCP/UDP socket access, are only allowed in | 215 Some Pepper features, such as `TCP |
216 packaged applications. The examples that use these features must be run as | 216 <pepper_stable/cpp/classpp_1_1_u_d_p_socket>`_ or `UDP |
binji
2015/02/09 18:13:42
bad link
JF
2015/02/09 19:25:39
Are you sure? This works:
https://developer.chrom
binji
2015/02/09 21:29:51
I mean it looks like that's a link to udp, not tcp
| |
217 packaged applications, by using the following command:: | 217 <pepper_stable/cpp/classpp_1_1_u_d_p_socket>`_ socket access, are only allowed |
218 in `packaged applications </apps/about_apps>`_. The examples that use these | |
219 features must be run as `packaged applications </apps/about_apps>`_, by using | |
220 the following command:: | |
218 | 221 |
219 $ make run_package | 222 $ make run_package |
220 | 223 |
221 You can use ``TOOLCHAIN`` and ``CONFIG`` parameters as described above to run | 224 You can use ``TOOLCHAIN`` and ``CONFIG`` parameters as described above to run |
222 with a different toolchain or configuration. | 225 with a different toolchain or configuration. |
223 | 226 |
224 .. _debugging_the_sdk_examples: | 227 .. _debugging_the_sdk_examples: |
225 | 228 |
226 Debugging the SDK examples | 229 Debugging the SDK examples |
227 -------------------------- | 230 -------------------------- |
(...skipping 19 matching lines...) Expand all Loading... | |
247 | 250 |
248 At this point, you can use the standard GDB commands to debug your NaCl module. | 251 At this point, you can use the standard GDB commands to debug your NaCl module. |
249 The most common commands you will use to debug are ``continue``, ``step``, | 252 The most common commands you will use to debug are ``continue``, ``step``, |
250 ``next``, ``break`` and ``backtrace``. See | 253 ``next``, ``break`` and ``backtrace``. See |
251 :doc:`Debugging <../devguide/devcycle/debugging>` for more information about | 254 :doc:`Debugging <../devguide/devcycle/debugging>` for more information about |
252 debugging a Native Client application. | 255 debugging a Native Client application. |
253 | 256 |
254 | 257 |
255 .. |menu-icon| image:: /images/menu-icon.png | 258 .. |menu-icon| image:: /images/menu-icon.png |
256 .. |gear-icon| image:: /images/gear-icon.png | 259 .. |gear-icon| image:: /images/gear-icon.png |
OLD | NEW |