<page xmlns="http://projectmallard.org/1.0/" type="guide" id="data">
<info>
    <link type="guide" xref="index#recipes"/>
</info>

<title>Application Data</title>

<p>
<em>Application data</em> is non-executable files that are used by your project.
Data can include things like configuration, UI definition, images and documentation.
</p>
<p>
Data is defined using <code>data</code> <link xref="variables">variables</link>.
The files that make up the data is set using the <code>data.<em>name</em>.files</code> variable where <em>name</em> is a name for the data collection.
Each collection has its files installed to <code>data.<em>name</em>.install-directory</code>.
You need to define multiple collections if files are to be installed into different directories.
</p>
<example>
<p>
For example, the foo project can specify images that are required to be installed with:
</p>
<code>
data.images {
  files = image1.png
  install-directory = $(options.project-data-directory)/images
}
</code>
<p>
When running the install rule Bake will copy these files to <code>/usr/share/foo/images</code>.
</p>
</example>
</page>
