title: How can I load an image from a changing path environment after building an .app with cargo-bundle?
body: <p>I'm using <a href="https://github.com/burtonageo/cargo-bundle" rel="nofollow noreferrer">cargo-bundle</a> to create an .app bundle for my Rust application built with fltk-rs.
  There are assets in the application like images. While I'm developing, accessing these assets is no problem.</p>
  <p>main.rs:</p>
  <pre class="lang-rust prettyprint-override"><code>let mut my_img = SharedImage::load(&quot;imgs/smiley.png&quot;).unwrap();
  </code></pre>
  <pre class="lang-none prettyprint-override"><code>.
  ├── Cargo.lock
  ├── Cargo.toml
  ├── app_icon_design.psd
  ├── imgs
  │   └── smiley.PNG &lt;--get this image
  ├── src
  │   ├── app_icon.png
  │   ├── app_icon@2x.png
  │   ├── icon32x32.png
  │   └── main.rs
  └── target
      ├── CACHEDIR.TAG
      ├── debug
      └── release
  </code></pre>
  <p>I then bundle to an .app with <code>cargo build --release</code> which gives me the following directory structure inside of my .app:</p>
  <pre class="lang-none prettyprint-override"><code>.
  ├── Info.plist
  ├── MacOS
  │   └── build_to_app_bundle &lt;--my executable
  └── Resources
      └── imgs
          └── smiley.PNG&lt;--get this image now
  </code></pre>
  <p>Now my application needs to get the image file from the <code>/Resources</code> folder:</p>
  <pre class="lang-rust prettyprint-override"><code>println!(&quot;my resources folder is: {:?}&quot;, std::env::current_exe().unwrap().parent().unwrap().join(Path::new(&quot;Resources&quot;)));
  let my_resources_path = std::env::current_exe().unwrap().parent().unwrap().join(Path::new(&quot;Resources&quot;));
  </code></pre>
  <p>How can I make it so that every time I want to load an image from a path I do not need to explicitly reference the <code>Resources</code> value?</p>