Launching a NaCl Project from Tizen Studio

Tutorial on launching a NaCl application from Tizen Studio.

Launching in the Google Chrome Web Browser

A NaCl project can be launched in the Google Chrome browser. Please note that the Chrome browser is not included in the Tizen Studio and must be installed separately. You must provide the main HTML file that will load the project’s NaCl manifest. The generated manifest file must be reachable from the HTML file’s location. It is therefore recommended to place the HTML file in the root folder of the project.

There is a cheat sheet available for launching a project in Google Chrome. For opening a cheat sheet please refer to Cheatsheets section in the Creating a NaCl Project in Tizen Studio article.

In order to create a new launch configuration for Chrome, open the "Run" -> "Run Configurations…" menu. Alternatively, you can expand the menu under the "Run As…" button on the toolbar and select "Run Configurations…" from there.

In the "Run Configurations" window select "Chrome" and press the "New" button.

Based on the current selection in the "Project Explorer" view, the IDE will try to automatically fill the "Project name" and "Main HTML file" fields. Verify that these values match the project you want to run.

Based on your operating system, the IDE will provide a default command for launching the Chrome browser. Verify that this command is valid and if necessary correct it. You can also browse for the location of the Chrome executable.

It is also possible to alter the default arguments passed to the Chrome executable:

  • in order to add an argument, write it in the "Chrome arguments" field and press the "Add" button;
  • in order to modify an existing argument, select it, change the text in the "Chrome arguments" field and press the "Update" button;
  • in order to remove an argument, select it and press the "Remove" button.

After setting all properties on the "Main" page, press the "Run" button.

When the "Run" button is pressed, the following actions are performed:

  1. A HTTP server is launched. This server serves files from the main HTML file's location. This server is automatically killed after the Google Chrome browser exits.
  2. A new instance of Google Chrome is launched with the given arguments. It is pointed to the main HTML file on the server's address. A temporary user data directory is created for this launch and is automatically deleted once the Chrome instance closes.

Launching in Chrome using the launch shortcut

In cases, where such fine-grained control of the launch process is not needed, a launch shortcut can be used instead. This shortcut initiates a Chrome launch with default parameters. The main HTML file will be automatically deducted from your project structure.

In order to launch a NaCl project in Chrome using the launch shortcut, right-click the project, then select: "Run As" > "Webpage in Chrome".

Launching on the Smart TV Emulator

A NaCl project packed into a widget can be launched using the Smart TV Emulator. For packing a project into a widget please refer to the article Exporting a NaCl Project to a Widget in IDE.

In order to create a new launch configuration for the Smart TV Emulator, open the "Run" > "Run Configurations…" menu.

In the "Run Configurations" window, select "Tizen Device" and press the "New" button.

In the "Project name" field, enter the name of the project to launch.

In the "Widget file" field, enter the path to the Tizen widget. You can also use the "Browse…" button to search for the file.

In the "Target emulator" field, enter the ID of the Smart TV Emulator instance on which you want to run the widget. Pressing the "Select…" button will open a new window in which you can select one of the currently running emulator instances. The ID of the chosen instance will be copied to the "Target emulator" field.

Press the "Run" button. The widget will be installed and executed in the chosen emulator.

Launching on Smart TV Emulator Using Launch Shortcut

As with launching in the Chrome browser, a launch shortcut is also provided for the Emulator launch configuration. Please note that to use this shortcut, you must still manually create a Tizen widget in the project’s root folder.

In order to launch a widget on the emulator using the launch shortcut, first select the chosen running emulator instance in the "Connection Explorer" view.

Next, right-click the project and select "Run As" -> "Widget on a Tizen device".