Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Icons support #3

@MisterDA

Description

@MisterDA

Soo... about icons...
For now, the script supports four different plateforms, each one having its own way to deal with icons.

Let's start with this. The developer/graphist has made some PNGs files, each one with differents resolutions. Where does it stores them ? Let's ask with a --icon option that leads to the directory where theses files are stored.

  • For Windows, the files must be packed into a .ico
  • For OS X, the files must be packed into a .icns
  • For Linux and Android, the files must be moved in a specific location depending of their resolution.

OS X

Now, OS X imposes its naming scheme. There is no way to generate a valid .icns icon than to follow this.

Filename Size of canvas (in pixels)
icon_512x512@2x 1024 x 1024
icon_512x512 512 x 512
icon_256x256@2x 512 x 512
icon_256x256 256 x 256
icon_128x128@2x 256 x 256
icon_128x128 128 x 128
icon_32x32@2x 64 x 64
icon_32x32 32 x 32
icon_16x16@2x 32 x 32
icon_16x16 16 x 16

Linux

In the meantime, Linux says that every PNG image should be named the same, and moved to a specific directory in /usr/share/icons/hicolor/YYxYY/apps, YY being the size of the canvas.

Size Scalable (SVG)
16x16 22x22 24x24 32x32 36x36 48x48 64x64 scalable
72x72 96x96 128x128 192x192 256x256 512x512

Android

While for android, you simply replace the following images in the res folder with PNG's of the same size:

Filename Size
drawable-mdpi/ic_launcher.png 42x42
drawable-hdpi/ic_launcher.png 72x72
drawable-xhdpi/ic_launcher.png 96x96
drawable-xxhdpi/ic_launcher.png 144x144

OUYA

There are two icons that they OUYA system uses:

  • Coverflow image in the PLAY section (You should locat this file at res/drawable-xhdpi/ouya_icon.png, the size should be 732x412px)
  • System icon (drawable-xhdpi/ic_launcher.png)

Windows

And finally, Windows...
name_A_BBxBBxC.png where A is the counter of the PNGs, 1 for the lowest quality, BB the size of the canvas and C the image bitdepth (I guess).
You can go further than 48x48, it's just an example.

game_1_16x16x4.png
game_2_32x32x4.png
game_3_48x48x4.png
game_4_16x16x8.png
game_5_32x32x8.png
game_6_48x48x8.png
game_7_16x16x32.png
game_8_32x32x32.png
game_9_48x48x32.png

So... We have to find a way to make every thing work together.
For now, if you put a ${PROJECT_NAME}.ico or a ${PROJECT_NAME}.icns, the script will use them.

The idea here is to put the PNGs files in one location, to find a common naming scheme and to let the script handles everything for every plateform.

The roadmap:

  1. Different options.
    • find a common naming scheme for PNGs files or for subdirs where they could be placed.
    • say "give me the highest resolution you can make, and I'll use something like ImageMacgick or GIMP to resize"
    • SVGs ?
  2. Write the process. What bothers me the most is that the user has to install a lot of stuff.
    • .icns: needs to detect if running OS X, then use iconutil, else use libicns.
    • .ico: needs to detect if running Bash in Windows.
    • Debian, just move the PNGs in the appropriate directory
    • Android. As it is released separately from the others, it can be done more easely.

So... We're discussing (1) now !

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions