Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 23:18
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
Package creators (dotpup and pupget) - Please read this !
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Wed 26 Apr 2006, 10:56    Post subject:  Package creators (dotpup and pupget) - Please read this !  

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:

[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/desktop-entry-spec/latest/ar01s04.html. You don't really need to read it unless you are really curious.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to

Last edited by rarsa on Wed 24 May 2006, 09:47; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
PeterSieg

Joined: 04 May 2005
Posts: 361
Location: Germany, 37603

PostPosted: Wed 26 Apr 2006, 11:15    Post subject: Then please update MU's dotpup wizard!!  

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 Smile
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Wed 26 Apr 2006, 11:24    Post subject:  

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.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Thu 27 Apr 2006, 07:51    Post subject:  

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?
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Thu 27 Apr 2006, 11:45    Post subject:  

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?

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Sat 29 Apr 2006, 18:03    Post subject:  

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 ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11131
Location: Arizona USA

PostPosted: Sun 30 Apr 2006, 00:02    Post subject:  

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.
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Thu 25 Jan 2007, 03:37    Post subject:  

XDG is in 2.14 as is a new package management system
http://puppylinux.org/wikka/Puppy214

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
Getnikar


Joined: 16 Jun 2006
Posts: 143
Location: Gold Coast, Australia

PostPosted: Wed 13 Jun 2007, 23:16    Post subject: Re: Package creators (dotpup and pupget) - Please read this  

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.
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Wed 13 Jun 2007, 23:55    Post subject:  

"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"
Back to top
View user's profile Send private message 
WhoDo


Joined: 11 Jul 2006
Posts: 4441
Location: Lake Macquarie NSW Australia

PostPosted: Thu 14 Jun 2007, 00:03    Post subject: Re: Package creators (dotpup and pupget) - Please read this  

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.

_________________
Actions speak louder than words ... and they usually work when words don't!
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
Back to top
View user's profile Send private message 
Getnikar


Joined: 16 Jun 2006
Posts: 143
Location: Gold Coast, Australia

PostPosted: Thu 14 Jun 2007, 00:51    Post subject: Re: Package creators (dotpup and pupget) - Please read this  

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:
/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.
MakeDotPup.pup
Description  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.
pup

 Download 
Filename  MakeDotPup.pup 
Filesize  21.23 KB 
Downloaded  1904 Time(s) 
Back to top
View user's profile Send private message 
droope


Joined: 31 Jul 2008
Posts: 814
Location: Uruguay, Mercedes

PostPosted: Mon 06 Oct 2008, 20:59    Post subject:  

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.
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 06 Oct 2008, 21:27    Post subject:  

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

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

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1062s ][ Queries: 13 (0.0165s) ][ GZIP on ]