top

Building a NaCl Project in Tizen Studio

Tutorial on building a NaCl application in Tizen Studio.

Basic Building

To build a NaCl project, right-click the project folder in the “Project Explorer” view of the Tizen Studio and select “Build project” from the context menu.

Build progress and status can be viewed in the “Console” view.

The build products may be found in the CurrentBin directory in the main project directory. This directory is in fact a symbolic link to the build directory of the current configuration (either Debug or Release).

The build process produces the following files:

  • a portable NaCl executable (.pexe) – this file contains the NaCl executable code built from your C / C++ sources that is independent of the target architecture; at the moment, these files are only supported by the Google Chrome browser and are not included in the generated manifest file;
  • NaCl executables (.nexe) – these files contain the native NaCl executable code for the target platform; they are translated from the .pexe files and are included in the generated manifest file;
  • a NaCl manifest (.nmf) – this file contains paths to the NaCl exectutable files for all supported architectures; this is the file from which the web browser gets information on where to look for the relevant NaCl executable; in case of the Tizen Operating System, this file may contain also a list of permissions if such are required for the NaCl module to successfully load.

Choosing a Build Configuration

A NaCl project can be built in one of the following configurations: “Debug” and “Release”.

When using “Debug” configuration:

  • executable files will be generated with debug symbols,
  • executable files will be generated for each of the supported architectures: i686, x86_64 and armv7.

When using “Release” configuration:

  • executable files will be generated without debug symbols,
  • only one executable file will be generated; target architecture can be chosen in the NaCl translator settings.

In order to change the active configuration, use the “Project” > “Build Configurations” > “Set Active” menu.

Providing Custom Settings

In order to change the active configuration, use the “Project” > “Build Configurations” > “Set Active” menu.

For each tool, you can change the invoked command name and its composition. Please note that this may break the build system. It is advised to use the provided option groups instead, where possible.

NaCl Compiler

The following setting groups are available for the NaCl compiler:

  • Includes - allows modifying the list of include paths that are passed to the compiler command.
  • Preprocessor - allows to define and undefine preprocessor symbols.
  • Miscellaneous - allows passing any other command parameters to the compiler.
  • Optimization - allows setting the optimization level.

NaCl Linker

The following setting groups are available for the NaCl linker:

  • Libraries - allows modifying library search paths and library names that are passed to the linker command.
  • Miscellaneous - allows passing any other command parameters to the linker.

NaCl Translator

The following setting groups are available for the NaCl translator:

  • Architecture - this setting is available only in Release configuration. It allows choosing the target architecture for the .nexe file.
  • Miscellaneous - allows passing any other command parameters to the translator.

NaCl Manifest Generator

This tool does not provide any specific group settings.