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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 ``/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`` for | 195 ``/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`` for |
196 Chrome Stable and | 196 Chrome Stable and |
197 ``Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary`` | 197 ``Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary`` |
198 for Chrome Canary. Note that you have to reference the executable inside the | 198 for Chrome Canary. Note that you have to reference the executable inside the |
199 application bundle, not the top-level ``.app`` directory:: | 199 application bundle, not the top-level ``.app`` directory:: |
200 | 200 |
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 Chrome 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 Chrome apps. A Chrome app is a special |
209 application is a special zip file (with a .crx extension) hosted in the Chrome | 209 zip file (with a .crx extension) hosted in the Chrome Web Store. This file |
210 Web Store. This file contains all of the application parts: A Chrome Web Store | 210 contains all of the application parts: A Chrome Web Store manifest file |
211 manifest file (``manifest.json``), an icon, and all of the regular Native Client | 211 (``manifest.json``), an icon, and all of the regular Native Client application |
212 application files. Refer to `What are Chrome Apps </apps/about_apps>`_ for more | 212 files. Refer to `What are Chrome Apps </apps>`_ for more information about |
213 information about creating a packaged application. | 213 creating a Chrome app. |
214 | 214 |
215 Some Pepper features, such as `TCP | 215 Some Pepper features, such as `TCP |
216 <pepper_stable/cpp/classpp_1_1_t_c_p_socket>`_ or `UDP | 216 <pepper_stable/cpp/classpp_1_1_t_c_p_socket>`_ or `UDP |
217 <pepper_stable/cpp/classpp_1_1_u_d_p_socket>`_ socket access, are only allowed | 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 | 218 in `Chrome apps </apps>`_. The examples that use these features must be run as |
219 features must be run as `packaged applications </apps/about_apps>`_, by using | 219 `Chrome apps </apps>`_, by using the following command:: |
220 the following command:: | |
221 | 220 |
222 $ make run_package | 221 $ make run_package |
223 | 222 |
224 You can use ``TOOLCHAIN`` and ``CONFIG`` parameters as described above to run | 223 You can use ``TOOLCHAIN`` and ``CONFIG`` parameters as described above to run |
225 with a different toolchain or configuration. | 224 with a different toolchain or configuration. |
226 | 225 |
227 .. _debugging_the_sdk_examples: | 226 .. _debugging_the_sdk_examples: |
228 | 227 |
229 Debugging the SDK examples | 228 Debugging the SDK examples |
230 -------------------------- | 229 -------------------------- |
(...skipping 19 matching lines...) Expand all Loading... |
250 | 249 |
251 At this point, you can use the standard GDB commands to debug your NaCl module. | 250 At this point, you can use the standard GDB commands to debug your NaCl module. |
252 The most common commands you will use to debug are ``continue``, ``step``, | 251 The most common commands you will use to debug are ``continue``, ``step``, |
253 ``next``, ``break`` and ``backtrace``. See | 252 ``next``, ``break`` and ``backtrace``. See |
254 :doc:`Debugging <../devguide/devcycle/debugging>` for more information about | 253 :doc:`Debugging <../devguide/devcycle/debugging>` for more information about |
255 debugging a Native Client application. | 254 debugging a Native Client application. |
256 | 255 |
257 | 256 |
258 .. |menu-icon| image:: /images/menu-icon.png | 257 .. |menu-icon| image:: /images/menu-icon.png |
259 .. |gear-icon| image:: /images/gear-icon.png | 258 .. |gear-icon| image:: /images/gear-icon.png |
OLD | NEW |