<div class="gmail_quote">On Thu, Oct 13, 2011 at 6:45 AM, Kristen Eisenberg <span dir="ltr">&lt;<a href="mailto:kristen.eisenberg@yahoo.com">kristen.eisenberg@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hello,<br><br>When clicking on the icon in the application menu, it uses a default working<br>path. For my program, I need a specific working path.<br>
There&#39;s &quot;Path&quot; variable in .desktop to setup the working path, it works fine<br>if i manually put the path but i find no way to specify the path in the<br>config.lua.<br>Is it possible to add Path in the Setup.DesktopMenuItem?<br>
I tried to append the Path in the postinstall function but it doesn&#39;t work,<br>i think the postinstall is called before the creation of the .desktop and<br>anyway, it&#39;ll require to execute the update of the menu after.<br>
<br>Have you another idea to do that?</div></div></div></blockquote><div><br>I worked around this with a bit of a hack:<br>
<br>local function postinst()<br>
    io.output(MojoSetup.destination .. &quot;/gamestart.sh&quot;)<br>
    io.write(&quot;cd &quot; .. MojoSetup.destination .. &quot;/game/\n&quot;)<br>
    io.write(&quot;./gamebinary \&quot;$@\&quot;\n&quot;)<br>
    os.execute(&quot;chmod u+x &quot; .. MojoSetup.destination .. &quot;/gamestart.sh&quot;)<br>end<br><br>then for DesktopMenuItem i set:<br>commandline = &quot;%0/gamestart.sh&quot;,<br></div></div>