Hacking:Pixmaps vs Icons

From ParabolaWiki
Jump to: navigation, search

So you're packaging a piece of software, and need to decide where to put the program icon. /usr/share/pixmaps or /usr/share/icons?

This is a surprisingly tricky question! So I made this handy decision tree to help you out! The relevant source document is the [freedesktop Icon Theme Specification].

First of all, the acceptable icon types are .png, .svg, and .xpm. If multiple image formats are part of the upstream package, they should all be included.

  • Does make install (or equivalent) install them, or do you have to put extra commands for them in package()?
    • make install installs them: Just let the upstream developers decide, and don't mess with it.
    • I have to put commands in package(): Does the package directly or indirectly depend on hicolor-icon-theme (fltk, gtk2, gtk3, and qt4 all depend on it, so odds are good that your package does through them)?
      • No, my package can be installed without {{ic|hicolor-icon-theme}: Put the icons in /usr/share/pixmaps.
      • Yes, my package (eventually) depends on hicolor-icon-theme: Are there multiple styles or themes of icons? Different icons for different themes? Note that a single low-color version does not count as a separate theme (see the "symbolic" icons in the mpv package, or Arch's firefox package for examples of what I'm talking about). This also does not refer to having the same theme icon in different resolutions (possibly simplified at lower resolutions).
        • Different icons for different themes: Put them in /usr/share/icons... you'll figure out which sub-directories are appropriate.
        • Just one version of the icons (with the mentioned exceptions): Are there images for different resolutions? This may include vector images that while they can be rendered at any resolution, have versions for different sizes; more details for larger versions. It may be a single size in multiple formats (png/xpm/svg).
          • Multiple sizes: Put them in the appropriate /usr/share/icons/hicolor/SIZE/apps/ directories; do not create new directories that are not part of the hicolor-icon-theme package; if there isn't an exact match, chose the closest size; use your best judgment.
          • Just one size: Are there rasters, or just SVG?
            • Just SVG: Put the image in /usr/share/icons/hicolor/scalable/apps/.
            • There are rasters (PNG/XPM): Are they one of the sizes in /usr/share/icons/hicolor/ or a multiple of one of them?
              • They are a multiple of one of the hicolor sizes: Put them /usr/share/icons/hicolor/SIZE/apps/ for the largest SIZE that they are a multiple of.
              • They are not an even multiple of one of the hicolor sizes: Put them in /usr/share/pixmaps.