Launching NaCl Projects


This topic describes how to launch Native Client projects from the Tizen Studio, for testing purposes.


Related Info


You can test your Native Client (NaCl) application by launching it in the Google Chrome™ Web browser, on the TV emulator, or on a Samsung TV.

Testing in Google Chrome™

If Google Chrome™ is installed on your computer, you can test NaCl projects in the browser. Build the project using the "Debug-pnacl" or "Release-pnacl" configuration, and make sure you generate a ".nexe" file for your computer's architecture. For more information about build configurations, see Building NaCl Projects.

To launch the application in Google Chrome™:

  • To use the default launch configuration, in the "Project Explorer" view, right-click the project and select "Run As > Webpage in Chrome".
    The application's main HTML page is automatically detected from the project structure.

  • To create and use a custom launch configuration:

    1. In the Tizen Studio menu, select "Run > Run Configurations".
    2. To create a Google Chrome™ launch configuration, in the side menu, double-click "Chrome".
    3. Define the launch configuration:
      1. Enter the configuration name, project name, and main HTML file path.
      2. Check that the Chrome launch command is correct, or click "Browse" and select the Google Chrome™ executable file location.
    4. Customize the launch parameters:
      • To add an argument, enter it in the "Chrome arguments" field, and click "Add".
      • To modify an existing argument, select it from the list, modify it in the "Chrome arguments" field, and click "Update".
      • To remove an argument, select it from the list, and click "Remove".
        Figure 1. Chrome launch configuration
    5. To launch the application, click "Run".

When you launch the application in Google Chrome™, a temporary HTTP server is created, serving files from the defined main HTML file location. The main HTML file is opened in a browser instance, using the defined launch arguments. A temporary user data directory is created for the browser.

When the Google Chrome™ instance is closed, the temporary user data directory is automatically deleted and the temporary HTTP server is killed.

Testing on the Emulator or TV

Before testing the application on the emulator or a Samsung TV:

  1. If you do not have a certificate profile already, create one.
  2. Build the project:
    • To test the application on the emulator, build the project using the "Debug-pnacl" or "Release-pnacl" configuration, and make sure you generate a ".nexe" file for the i686 architecture.
    • To test the application on a Samsung TV, build the project with the configuration you want, and make sure you generate a ".nexe" file for the ARMv7 architecture.
  3. Export the project as a ".wgt" file in the project directory.
  4. Launch an appropriate emulator instance, or connect the TV to the Tizen Studio.

To launch the application on the emulator or TV:

  • To use the default launch configuration:

    1. In the Tizen Studio toolbar, select the emulator instance or device from the drop-down menu.

      Figure 2. Select emulator instance or device
    2. In the "Project Explorer" view, right-click the project and select "Run As > Widget on a Tizen device".
  • To create and use a custom launch configuration:

    1. In the Tizen Studio menu, select "Run As > Run Configurations > Tizen Device".
    2. To create a Tizen device launch configuration, in the side menu, double-click "Tizen Device".
    3. Define the configuration name, project name, and ".wgt" file path.

      Figure 3. Device launch configuration
    4. To select the emulator instance or device to launch the application on, click "Select" next to the "Target device" box, and select the one you want.

      Figure 4. Select a configuration-specific emulator instance or device
    5. To install and launch the application on the emulator or TV, click "Run".