<div class="gmail_quote">On Thu, Oct 13, 2011 at 6:45 AM, Kristen Eisenberg <span dir="ltr"><<a href="mailto:kristen.eisenberg@yahoo.com">kristen.eisenberg@yahoo.com</a>></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's "Path" 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't work,<br>i think the postinstall is called before the creation of the .desktop and<br>anyway, it'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 .. "/gamestart.sh")<br>
io.write("cd " .. MojoSetup.destination .. "/game/\n")<br>
io.write("./gamebinary \"$@\"\n")<br>
os.execute("chmod u+x " .. MojoSetup.destination .. "/gamestart.sh")<br>end<br><br>then for DesktopMenuItem i set:<br>commandline = "%0/gamestart.sh",<br></div></div>