You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, April 24th 2005, 1:20am

Individual file icons

I'm working on a package manager that will sort-of emulate MacOS behavior (i.e. drop in the file to install, delete it to uninstall) and as a part of this, I'm looking for a way to make Konqueror display each package's own icon.

Essentially the top level is just an uncompressed tar file containing:
payload.tar.bz2
package.pds
icon.png

Basically I'm wondering if there's a simple config trick that would make KDE use an icon from within a tar file as the icon for that tar file, and fall back on the default if it doesn't exist.
Where are the zeros of zeta of s?
G.F.B. Riemann has made a good guess,
They're all on the critical line said he,
And their density's one over 2pi log t.
--Tom Apostol

2

Sunday, April 24th 2005, 2:00am

RE: Individual file icons

Well the mac style doesn't use any sort of archive (it uses folders with ".app" at the end of the name). AFAIK I don't think you can make Konqueror do something like that. What may work better is to go the OS X style and at the top of the folder do something like:

Create a file in the top director of the folder called ".directory" and in that file it says something like:

Source code

1
2
[Desktop Entry]
Icon=./icon.png
You would name the icon file "icon.png" (I think this would work, but I don't know if Konqueror will do relative paths for the icons).

Maybe doing what OS X does and give the folder the extension ".app" and create a mime-type for it that will associate w/ all ".app" things which will launch a program that will then process some file in the app (maybe it will execute "./run.sh"?).

Oh and just so you know, when the binaries are linked it would be good if you set them up in a way that they can check if the libraries exist (preferably after it checks the normal places, so if locally you have it installed it can use that version and any bugfixes instead) in a path relative to them (I read once how to do it, hopefully you can find it on google with some searching). That way they can have their own libraries and use them if they don't exist on the local system.

Maybe also you could do some weird hackish stuff so it will chroot the program to it's ".app" folder so it will store all its local settings inside the .app file and you can have as many different version setup as you want. Though if they run in X you would have to do some stuff like set up a sym link so it can talk to X, and also so its runs as the current user, not root, in the chrooted folder.

Wow... that kinda went a bit longer than I planned to, good luck with your package manager!

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

3

Sunday, April 24th 2005, 11:50am

For a single file you would need a MIME type association and some thumbnail plugin for Konqueror which would "create" the thumbnail by accessing the archive contents and reading the icon.

Cheers,
_
Qt/KDE Developer
Debian User