hydrogen-music/hydrogen — pull request #163 by elpescado (2014-04-07 20:38:28+00:00)
Title: Updated OSX icon file to support high resolution assets

I have updated `icon.icns` file with high resolution images (up to 1024x1024 pixels).

![hydrogen-crop](https://cloud.githubusercontent.com/assets/1619113/2636661/13c3c648-be94-11e3-9aaa-47b17d19f8e4.png)

Here's script I used to create icon file:

#!/usr/bin/env perl
use strict;
use warnings;

my @sizes = qw/128 256 512/;
my $out = "icon";

mkdir("$out.iconset");
for my $size (@sizes) {
system ("rsvg-convert --width=$size -o $out.iconset/icon_${size}x${size}.png icon.svg");
my $size2x = $size*2;
system ("rsvg-convert --width=$size2x -o $out.iconset/icon_${size}x${size}\@2x.png icon.svg");
}

my %e = (
'16x16' => 'icon16.png',
'16x16@2x' => 'icon32.png',
'32x32' => 'icon32.png',
'32x32@2x' => 'icon64.png',
);

for my $dest (keys %e) {
my $src = $e{$dest};
system('cp', $src, "$out.iconset/icon_$dest.png");
}

system("iconutil -c icns $out.iconset/");