Adding Things to Apps

Sometimes you need other stuff in your applications like a third-party library, some data files, a script or a legacy program built on another system.

To add other files to applications, you add other sections to your application's ".adef" file.

Here's a sample of how to add an audio file and a third-party library:

files:

    [r]     audio/alert.wav     /usr/share/sounds/

    [r]     third-party/foo/lib/foo.so.1 /lib

The "files:" section will get the file ./audio/alert.wav from the build host's file system (relative to the current working directory in which mkapp is run), and list it under /usr/share/sounds (from the application's point-of-view when it runs on the target).

The letter inside the square brackets (e.g., [r]) contain the permissions flags for the file on the target:

  • 'r' = readable
  • 'w' = writeable but changes will be discarded on reset
  • 'x' = executable

If you want to have a script or other executable run when the application starts, add that file to

  • the "files:" section (with the executable flag [x] set), and
  • the list of executables in the processes section, "run:" subsection.
files:

    [x]     otherProject/bin/bar    /usr/bin/bar

processes:

run: (/usr/bin/bar)

This grabs ./otherProject/bin/bar (relative to the directory where mkapp is run), displays it in the application sandbox's /usr/bin/bar directory, and starts one instance of it when the application starts.


Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines