The Assets tab lets you manage the assets packaged in the
application's.bar file. Assets can be configuration-specific, meaning that each
different build configuration (Device-Debug, Device-Release, Device-Profile,
Simulator-Debug) can use a unique set of assets. Using the Assets tab to manage assets
is not as flexible as the Source editor because:
- The primary purpose of build configurations is the packaging of
different variants of the application code and 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.
- If you require specific configuration details, the Source tab
provides full access to the bar-descriptor.xml file. The Assets tab might not
include configuration-specific data; in this case the page displays warning
annotations.
Note: 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.
Add assets for the application to use at
runtime
Note:
- Select and expand a project in the Project Explorer view, and
then double-click bar-descriptor.xml in your project.
- In the bar-descriptor.xml, click Assets then click (All Configurations).
- In the Assets
section, click Add.
- In the dialog box, click Workspace and select the file you want to the application
to use.
- Click OK and then
Save.
Copy files from your device or simulator to your
project
Note:
- Establish a connection to your device or simulator.
- Open the QNX System Perspective (select , and then select QNX System
Information). Or open the Target File System Navigator view
directly (select , and then type Target File System
Navigator to select it from the list).
- On the left in the Target File System Navigator view, select
and expand the target device or simulator you want to use.
Note: 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.
- Navigate to the folder that you want to copy files
from.
- Drag and drop any required assets from the target to a
location on your computer. Or use the Copy
To command to copy assets (In the Target File System
Navigator view, right-click a file, then select , and the use the Browse For Folder dialog box to specify the
location to copy to.)
Explore Asset tab specifications
Note:
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. You must use this
configuration when you are preparing your app for distribution in BlackBerry World.
-
Device-Profile —
Create a version of your application for the device for profiling purposes.
-
Simulator-Debug —
Create a version of your application to use on the simulator.
To create a build configuration, click Add. Normally,
build configurations are created for you when you select a launch mode and a
launch Configuration and click Launch on the toolbar.
To create a duplicate build configuration based on the configuration type
selected from the Build Configurations
list, click Duplicate. The new configuration is created
as <configuration name="New_Configuration_Name">.
To remove the selected build configuration from the list, click
Remove.
To open a dialog box that allows you to create, remove, or rename build
configurations, click Edit.
Note:
Assets (<asset>)
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 your computer's filesystem by using drag-and-drop.
The asset is created as: <asset path="Asset_Location">.
-
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 can't 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.
To add an asset to the project, click Add Files or
Add Folders.
To delete an asset from the project, click Remove.
Note:
Hide assets common to all configurations
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.
Note:
Related Settings
Provides a direct link to the C/C++ Build Settings, which
are critical to the generation of the assets included in the package.