# BinDeps for an executable

**URL:** <https://discourse.julialang.org/t/bindeps-for-an-executable/3161>\
**Category:** General Usage\
**Created:** [April 11, 2017, 9:02am UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161 "2017-04-11T09:02:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [April 11, 2017, 9:02am UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161/1 "2017-04-11T09:02:57Z")

</div>

I need to include an executable in my package (in my case it’s `exiftool`). I managed to get `BinDeps.jl` to download it and extract it to a `src` folder in my `deps` folder. But it’s riddled with problems (doesn’t work in Windows, works in unix only if I wrap stuff in `try` blocks). [Here](https://github.com/yakir12/Associations.jl/blob/master/deps/build.jl) is my attempt. Could some good soul please take a look and show me how to accomplish this?  
Ultimately, I’d like for users of my package to be able to call on `exiftool`. I assume it’s just easier to download and extract the executable instead of installing it on their system.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [April 11, 2017, 3:02pm UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161/2 "2017-04-11T15:02:39Z")

</div>

BinDeps is mostly designed for handling libraries. There have been some attempts and work in progress pull requests on adding functionality to depend on executables, but not finished.

If you compile exiftool, does it happen to create any shared libraries along the way that you could at least get BinDeps to look at to tell whether or not it succeeded in compiling something?

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [April 11, 2017, 4:24pm UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161/3 "2017-04-11T16:24:08Z")

</div>

Another option would be to use the low-level build steps (which automate things like downloading and unzipping files) from BinDeps without actually using the full dependency handling tools (which, as @tkelman says, are only designed for libraries).

I ran into the same problem when trying to require the cmake executable, and I ended up creating a simple package [https://github.com/rdeits/CMakeWrapper.jl](https://github.com/rdeits/CMakeWrapper.jl) that handles the cmake download and compilation on all platforms using the low-level BinDeps tools: [https://github.com/rdeits/CMakeWrapper.jl/blob/master/deps/build.jl#L64](https://github.com/rdeits/CMakeWrapper.jl/blob/master/deps/build.jl#L64)

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [April 11, 2017, 5:34pm UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161/4 "2017-04-11T17:34:40Z")

</div>

I see. I have no idea how to programatically install something on windows (I only know `apt-get` in linux)…  
I’ll look into your package, thanks!!!

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [April 11, 2017, 8:18pm UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161/5 "2017-04-11T20:18:34Z")

</div>

Wah! that function you pointed to solved all my problems! Awesome. Thanks a bunch!

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [April 11, 2017, 9:04pm UTC](https://discourse.julialang.org/t/bindeps-for-an-executable/3161/6 "2017-04-11T21:04:55Z")

</div>

Hooray!
