From kristen.eisenberg at yahoo.com Thu Oct 13 09:45:14 2011 From: kristen.eisenberg at yahoo.com (Kristen Eisenberg) Date: Thu, 13 Oct 2011 06:45:14 -0700 (PDT) Subject: [mojosetup] set the working path for the desktop entry Message-ID: <1318513514.77391.YahooMailNeo@web122314.mail.ne1.yahoo.com> Hello, When clicking on the icon in the application menu, it uses a default working path. For my program, I need a specific working path. There's "Path" variable in .desktop to setup the working path, it works fine if i manually put the path but i find no way to specify the path in the config.lua. Is it possible to add Path in the Setup.DesktopMenuItem? I tried to append the Path in the postinstall function but it doesn't work, i think the postinstall is called before the creation of the .desktop and anyway, it'll require to execute the update of the menu after. Have you another idea to do that? Kristen Eisenberg Billige Fl?ge Marketing GmbH Emanuelstr. 3, 10317 Berlin Deutschland Telefon: +49 (33) 5310967 Email: utebachmeier at gmail.com Site: http://flug.airego.de - Billige Fl?ge vergleichen -------------- next part -------------- An HTML attachment was scrubbed... URL: From nemoder at gmail.com Thu Oct 13 16:18:54 2011 From: nemoder at gmail.com (Nemo Der) Date: Thu, 13 Oct 2011 13:18:54 -0700 Subject: [mojosetup] set the working path for the desktop entry In-Reply-To: <1318513514.77391.YahooMailNeo@web122314.mail.ne1.yahoo.com> References: <1318513514.77391.YahooMailNeo@web122314.mail.ne1.yahoo.com> Message-ID: On Thu, Oct 13, 2011 at 6:45 AM, Kristen Eisenberg < kristen.eisenberg at yahoo.com> wrote: > Hello, > > When clicking on the icon in the application menu, it uses a default > working > path. For my program, I need a specific working path. > There's "Path" variable in .desktop to setup the working path, it works > fine > if i manually put the path but i find no way to specify the path in the > config.lua. > Is it possible to add Path in the Setup.DesktopMenuItem? > I tried to append the Path in the postinstall function but it doesn't work, > i think the postinstall is called before the creation of the .desktop and > anyway, it'll require to execute the update of the menu after. > > Have you another idea to do that? > I worked around this with a bit of a hack: local function postinst() io.output(MojoSetup.destination .. "/gamestart.sh") io.write("cd " .. MojoSetup.destination .. "/game/\n") io.write("./gamebinary \"$@\"\n") os.execute("chmod u+x " .. MojoSetup.destination .. "/gamestart.sh") end then for DesktopMenuItem i set: commandline = "%0/gamestart.sh", -------------- next part -------------- An HTML attachment was scrubbed... URL: