[mojosetup] Plans for adding system menu entries
Ole Jacob
ojt at gexcon.com
Tue Dec 4 07:22:34 EST 2007
Thanks for this! Seems usefull!
One thing: What if the user installs as root instead of normal user. Then I
would like to have the application menu entry end up in something
like "/usr/local/share/applications". I know absolutely noting about lua. Is
there a way to detect if installation is done as root and install
the .desktop file in the right place depending on this?
Regards,
Ole Jacob
On Tuesday 27 November 2007 14:30, Nemo Der wrote:
> I wrote a quick and dirty postinstall function to create a freedesktop
> compliant menu item for my installer:
>
> local function post()
> os.execute("mkdir -p " .. MojoSetup.info.homedir ..
> "/.local/share/applications/")
> io.output(MojoSetup.info.homedir ..
> "/.local/share/applications/spring.desktop")
> io.write("[Desktop Entry]\n")
> io.write("Name=Spring\n")
> io.write("Comment=An open source RTS game like TA\n")
> io.write("Exec=" .. MojoSetup.destination .. "/springstart.sh\n")
> io.write("Icon=" .. MojoSetup.destination .. "/spring.png\n")
> io.write("Terminal=false\n")
> io.write("Type=Application\n")
> io.write("Categories=Applicatoin;Game;StrategyGame;\n")
> end
>
> Setup.Package
> {
>
> id = "Spring",
> description = "Spring RTS",
> version = "0.75b2",
> splash = "springlogo.bmp",
> superuser = false,
> recommended_destinations =
> {
> MojoSetup.info.homedir,
> "/opt/games",
> "/usr/local/games"
> },
> postinstall=post,
>
> ..etc..
>
> Doing it this way requires changing the make.sh to compile with the
> Lua IO and OS functions though.
>
> On Nov 27, 2007 2:05 AM, Ole Jacob <ojt at gexcon.com> wrote:
> > Hi,
> >
> > Are there any plans for adding application menu entries in som automatic
> > fasion? I seem to remember that this was one of the shortcomings in Loki
> > Setup.
> >
> > What about uninstall and upgrade features?
> >
> > Regards,
> > Ole Jacob
> >
> > ---
> > To unsubscribe, send a blank email to mojosetup-unsubscribe at icculus.org
> > Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?61
>
> ---
> To unsubscribe, send a blank email to mojosetup-unsubscribe at icculus.org
> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?61
More information about the mojosetup
mailing list