Package creators (dotpup and pupget) - Please read this !

Talk about and post software packages known to work or packaged for Puppy.
Post Reply
Message
Author
User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

Package creators (dotpup and pupget) - Please read this !

#1 Post by rarsa »

For puppy 1.0.9 we are implementing a menu system that does not depend on updating the menu files manually. It greatelly simplifies adding apps to the menu without worrying what Window manager is being used. Or what menu structure is used.

This is, you don't add your application to a specific submenu. Instead you specify categories for your application and the menu system decides where to put it.

The only thing you have to do when preparing a package is to include a file named after your application with a .desktop extension. and save it to

/usr/share/applications

For example Abiword-wordprocessor.desktop

If you are just repackaging an application that already has a .desktop file, just make sure that .desktop file gets copied to the appropriate location (/usr/share/applications).

If you are packaging an application that does not provide its own .desktop file, then create one. The format of the file is very simple. Use the following example as a template. (Note that this file is Case sensitive)

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Abiword wordprocessor
Icon=abiword_16.xpm
Comment=Abiword wordprocessor is a light but full featured word processor
Exec=abiword
Terminal=false
Type=Application
Categories=WordProcessor;Office;TextEditor
GenericName=Wordprocessor
Hidden=true
Here is the quick explanation for each parameter:

Encoding ---> Always leave it as UTF-8 for now
Name ---> Name that will appear in the Menu
Icon --> Icon file that will appear in the Menu. It can be a full path.
Comment --> A comment that may appear as a hint in the right WM.
Exec --> command to execute the application
Terminal --> dfoes the app run in a terminal?
Type --> Always "Application"
Categories --> a semicolon (;) separated list of categories. Read this for a full list of registered categories. An application can belong to multiple categories.
GenericName ---> A generic name, also used by some window managers to better qualify the menu entry. (e.g. some put the generic name in brackets beside the app name)


The full specification for .desktop files is here http://standards.freedesktop.org/deskto ... 01s04.html. You don't really need to read it unless you are really curious.
Last edited by rarsa on Wed 24 May 2006, 13:47, edited 3 times in total.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

PeterSieg
Posts: 363
Joined: Wed 04 May 2005, 16:06
Location: Germany, 37603
Contact:

Then please update MU's dotpup wizard!!

#2 Post by PeterSieg »

Hi. I am using MU's dotpup wizard -06 for this...

So the appropiate way would be if someone, preferable Mark (MU) is so kind
to update this wizard...

PS
Have fun :)

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#3 Post by rarsa »

I've talked to Mark about this. There are still several issues:

* Mark does not know if he will be able to modify the utility in time for 1.0.9.
* Not everyone uses Mark's utility. (many pre-date Mark's utility)
* Some packages already include a .desktop file, it's just a matter of putting them in the rigth folder. I guess that Mu's utility could ask if there is already a .desktop file and add the commands in the script to copy it to the right location instead of creating it.

I agree that Mark's utility could help the user create the desktop file for packages that don't already have one. Meanwhile it's just a matter of adding another file to the package.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#4 Post by Dougal »

The other place the .desktop files go is /usr/local/share/applications.
Why not just (i) add that path to your menu program or (ii) create it as a link to /usr/share/applications?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#5 Post by rarsa »

There are several other locations that 'could' be used.

I am asking developers to use a single folder for simplicity and standardization purposes.

If packagers start installing to all the different valid locations, it may make it marginaly simpler for them but all the other users will have to deal with .desktop files all over the place.

For the XDG tool it's the same (Except when there are conflicts and certain rules apply based on some path variables which makes it even more complex for the users)

With my recommendation, the package developer only needs to care about ONE .desktop file under this scenario and users will know where their .desktop files are.

So, I really favour one tiny extra step for one person (the packager) that will simplify the lives of all the users. And really, copying a file to a standard place wouldn't be that much of an inconvinience, would it?
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#6 Post by Nathan F »

I second everything in Rarsa's last post. It's not too much to ask that we keep them all in one place, other distros and Unix varients have certain preferred locations for certain system files, and this is no different.

For instance, when using FreeBSD all graphical applications are compiled for the prefix /usr/X11R6, which used to be a common Unix convention. It is quite easy and will work just fine if you compile for /usr or /usr/local or even /opt, but they just don't do it and the entire system stays much more organized because of it. To their way of thinking /bin for basic system utilities, /usr/bin for cli programs, and /usr/X11R6 for graphical programs.

So to recap, please just go along with this so we can get the feature implemented as smoothly as possible with the least headaches.

Nathan
Bring on the locusts ...

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#7 Post by Flash »

Perhaps a suggested 'check list' for package developers, prominently posted in the several Puppy websites where developers might read it, would be a good idea.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

XDG is in 2.14 as is a new package management system
http://puppylinux.org/wikka/Puppy214
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Getnikar
Posts: 143
Joined: Sat 17 Jun 2006, 02:34
Location: Gold Coast, Australia

Re: Package creators (dotpup and pupget) - Please read this

#9 Post by Getnikar »

rarsa wrote:The only thing you have to do when preparing a package is to include a file named after your application with a .desktop extension. and save it to

/usr/share/applications
Why? What does this achieve?
Where/when do .desktop files get picked up?
Is this request still current?
Does this include rox apps when packaged into a DotPup?

Thanks.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#10 Post by GuestToo »

"What does this achieve? "

.desktop files, if they are configured properly, will get added to the window manager's (jwm, icewm, etc) menu when fixmenus is run

if the file is deleted, it will be removed from the menu when fixmenus is run

so basically it is a way to add your application to the menu without needing to edit the menu configuration files directly from an installer script, for example, by using sed

"when do .desktop files get picked up?"

when fixmenus is run

"Is this request still current?"

Puppy 216 uses the .desktop files in /usr/share/applications to generate it's menus dynamically, so yes, if you want to add your application to the menu, it would be the way to do it ... if you make a package for a command line program, and you do not want to have a menu item to start the program in an rxvt window, then you would not need a .desktop file

"Does this include rox apps"

if you like ... if you want the application to appear in the menu, you would install a .desktop file that can start your application ... a Rox application directory can usually be made so that it can be moved anywhere and it will run where ever it is put, but a .desktop file could be installed that points to the location where it was installed ... a roxapp could be run like this:

rox /root/my-roxapps/Xmix

or like this:

/root/my-roxapps/Xmix/AppRun

or there could be a wrapper script somewhere in the PATH to start the application, like this:

#!/bin/sh
exec /root/my-roxapps/Xmix/AppRun

or:

#!/bin/sh
rox /root/my-roxapps/Xmix

so the .desktop file might start the roxapp by running the wrapper script "xmix"

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Package creators (dotpup and pupget) - Please read this

#11 Post by WhoDo »

Getnikar wrote:
rarsa wrote:The only thing you have to do when preparing a package is to include a file named after your application with a .desktop extension. and save it to

/usr/share/applications
Why? What does this achieve?
Where/when do .desktop files get picked up?
Is this request still current?
Does this include rox apps when packaged into a DotPup?
Why? Because the Puppy XDG menu system uses .desktop files to specify menu entries and the icons and executables that go with them.

The files are "picked up" each time PETget is run to add an application, and whenever fixmenus is run from a console.

The request is still current and applies to both dotpups and dotpets when a menu entry is needed in the XDG menu system.

IMHO it is preferrable for developers to create dotpets rather than dotpups. Although MU has developed the dotpup wizard, there are fewer steps in creating a dotpet and it is generally easier to get things installed where you want.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
Getnikar
Posts: 143
Joined: Sat 17 Jun 2006, 02:34
Location: Gold Coast, Australia

Re: Package creators (dotpup and pupget) - Please read this

#12 Post by Getnikar »

Many thanks Guest2 and Whodo.
WhoDo wrote:IMHO it is preferrable for developers to create dotpets rather than dotpups. Although MU has developed the dotpup wizard, there are fewer steps in creating a dotpet and it is generally easier to get things installed where you want.
In this regard, I have just created a MakeDotPup that is a wizard-style gui. Its focussed on rox apps, but is OK for anything. It is attached for anyone interested.

I need to hack it into a MakeDotPet, to either run (as per http://www.puppylinux.com/development/createpet.htm)

Code: Select all

/usr/bin/new2dir dotpuprox.sh `pwd`/${vAppname}-${vVersion}.pup
/usr/bin/dir2pet ${vAppname}-${vVersion}-${vPlatform}
, or maybe I might rip the relevant code out of those scripts and merge it in ... when I get time ...

Makes dot pups nicely. Install it and its help will pop up, and an initial setup is run. This needs to be morphed into a MakeDotPet.
Attachments
MakeDotPup.pup
Makes dot pups nicely. Install it and its help will pop up, and an initial setup is run. This needs to be morphed into a MakeDotPet.
(21.23 KiB) Downloaded 3040 times

User avatar
droope
Posts: 801
Joined: Fri 01 Aug 2008, 00:17
Location: Uruguay, Mercedes

#13 Post by droope »

Hi, I need a hand.


I want to translate the menu, but I can only traslate aplicattions 'name' on the menu.

How do I traslate, for example, the shutdown item? Or setup, persay.

Sorry to disturb.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#14 Post by MU »

categories:
see:
http://murga-linux.com/puppy/viewtopic.php?t=25925

shutdown:
edit the files in:
/etc/xdg/templates/

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Post Reply