Assets page

This page allows you to manage the assets packaged in the application's BAR file. Because the packaging of assets is specific to a configuration, this page provides you with the build configurations within the bar-descriptor.xml file. This file lets you specify almost any content on a configuration basis. The editor isn't quite this flexible because:
  • The primary purpose for configurations is the packaging of different variants of the application code and/or data assets, such as for debugging or for different target architectures. Other application metadata, such as the name, icon, window characteristics, permissions, and other entry-point attributes are configuration-independent.
  • When you require specific configuration details, the Source page provides full access to the bar-descriptor.xml file. The editor might not include configuration-specific data; in this case the page heading displays warning annotations to indicate this.

You can change the assets by updating your bar-descriptor.xml file, or you can update assets by using a command-line option when you package an application using the blackberry-nativepackager tool. If you specify assets in both the bar-descriptor.xml file and by using the blackberry-nativepackager tool, the assets packaged using the blackberry-nativepackager tool are used. For more information, see "Package your application from the command line" in the Developer's Guide .

Option XML element Description Default
Build Configurations <configuration...>

Select the build configuration to specify assets for.

  • (All Configurations) — All configurations
  • Device-Debug — Create a debug version of your application for the device for debugging purposes.
  • Device-Release — Create a release version of your application for the device; as small an executable as possible, without any debug code.
  • Simulator — Create a version of your application to use on the simulator.
(All Configurations), Device-Debug, Device-Release, Simulator
Add N/A Create a new build configuration. N/A
Duplicate <configuration id="plugin_name" name="New_Configuration_Name"> Create a duplicate build configuration based on the selected configuration type from the Build Configurations list. N/A
Remove N/A Remove the selected build configuration from the list. N/A
Edit N/A Open a dialog that allows you to create, remove, or rename build configurations. N/A
Assets <asset path="Asset_Location"> Update the table of assets by selecting assets from anywhere inside and outside of the workspace, and then assign types to indicate their runtime and packaging semantics. Additionally, where appropriate, you can move or copy selected assets from the workspace or the host OS's filesystem by using drag-and-drop.
  • Source Path — the source location and source file name used for an asset.
  • Target Path — the target file name to be used for an asset.
  • Type — the corresponding type for an asset, such as Entry-point or Other.
An asset that cannot be resolved to a file on disk is annotated with a warning icon and a tooltip gives an overview of the problem. A problem marker in the Problems view also reports the error, with the text marker attributes that link to the particular <asset> element in the Source view of the XML file.
N/A
Add Files N/A Add an asset to the project. N/A
Remove N/A Delete an asset from the project. N/A
Hide assets common to all configurations N/A Hides the display of assets from the Assets list that are common to and included in all of the configurations listed in the (All Configurations) list. Not Selected
Related Settings N/A Provide a direct link to the C/C++ build settings, which are critical to the generation of the assets included in the package. N/A

Add assets for your application

Your project requires some setup to access the capabilities of the .
To add assets for the application to use at run time:
  1. Select and expand a project in the Project Explorer view, and then double-click bar-descriptor.xml in your project.
  2. In the bar-descriptor.xml view, click Assets then click (All Configurations).
  3. In the Assets section, click Add.
  4. In the dialog, click Workspace and select the file you want to the application to use.
  5. Click OK and then Save.

Copy assets from a device to an application

To copy files from your device or simulator to your project:
  1. Establish a connection to your device or simulator.
  2. Either open the QNX System Perspective (select Window > Open Perspective > Other, and then select QNX System Information), or open the Target File System Navigator view directly (select Window > Show View > Other, and then type Target File System Navigator to select it from the list).
  3. On the left in the Target File System Navigator view, select and expand the target device or simulator you want to use.

    If the selected target for your device or simulator indicates that it is not currently connected, from the Target Navigator view, right-click on your target and select Connect.

  4. Navigate to the folder that you want to copy files.
  5. Either drag and drop any required assets from the target to your desired location on the host, or use the Copy To command to copy assets (In the Target File System Navigator view, right-click a file, then select Copy To > File System, and the use the Browse For Folder dialog to specify the location to copy.)

    For information about the folders (such as Sandbox, Shared, Developer, and System), see Where Files Are Stored.

Last modified: 2013-12-21

comments powered by Disqus