<blockquote>
<p>There are <a href="https://github.com/probonopd/AppImageKit/issues/267">a couple of options</a> for that.</p>
</blockquote>

<p>Nice :)</p>

<blockquote>
<p>But wouldn't it be the cleanest solution to solve it right in the source code from the beginning, by not using absolute paths? (How is it done for macOS)?</p>
</blockquote>

<p>Well.  We do use <a href="https://github.com/geany/geany/blob/master/src/utils.c#L2092">dynamic paths</a> indeed to support Windows and OSX, and as said we do have <a href="https://github.com/geany/geany/blob/master/src/prefix.c">binary relocation support already</a>.  But one tricky part is finding out what the installation path is, and that code is copied from somewhere ages ago, and I have no idea how portable it is -- not really something I'm terribly happy with.<br>
Also, it doesn't solve looking for libraries, where we currently use <code>-rpath='$ORIGIN/../lib'</code>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1303#issuecomment-260739481">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ7sYrls0_3ntfTGLv57KHsRS4Zz3ks5q-gZUgaJpZM4KyPT8">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_P6ielWerG9OIuxkmjWcesGMAELks5q-gZUgaJpZM4KyPT8.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1303#issuecomment-260739481"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@b4n in #1303: \u003e There are [a couple of options](https://github.com/probonopd/AppImageKit/issues/267) for that.\r\n\r\nNice :)\r\n\r\n\u003e But wouldn't it be the cleanest solution to solve it right in the source code from the beginning, by not using absolute paths? (How is it done for macOS)?\r\n\r\nWell.  We do use [dynamic paths](https://github.com/geany/geany/blob/master/src/utils.c#L2092) indeed to support Windows and OSX, and as said we do have [binary relocation support already](https://github.com/geany/geany/blob/master/src/prefix.c).  But one tricky part is finding out what the installation path is, and that code is copied from somewhere ages ago, and I have no idea how portable it is -- not really something I'm terribly happy with.\r\nAlso, it doesn't solve looking for libraries, where we currently use `-rpath='$ORIGIN/../lib'`."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1303#issuecomment-260739481"}}}</script>