# Can I add a top-level directory for data dependencies?

**URL:** <https://discourse.appimage.org/t/can-i-add-a-top-level-directory-for-data-dependencies/175>\
**Category:** Creating AppImages\
**Created:** [April 7, 2017, 1:24am UTC](https://discourse.appimage.org/t/can-i-add-a-top-level-directory-for-data-dependencies/175 "2017-04-07T01:24:52Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [April 7, 2017, 10:48pm UTC](https://discourse.appimage.org/t/can-i-add-a-top-level-directory-for-data-dependencies/175/6 "2017-04-07T22:48:03Z")

</div>

> AppRun.c sets it up this way, doing a chdir(usr/).

Correct. But you don’t _have_ to use this `AppRun`, you could also use your own script or even a link to your binary in its place. A safer method would be to find out the absolute path to your main executable, and calculate an absolute path to your data based on that, e.g., using the information from `/proc/self/exe`.

---

_[View the full topic](https://discourse.appimage.org/t/can-i-add-a-top-level-directory-for-data-dependencies/175)._
