Remove Inkscape dependency for ICO creation

Just use Imagemagick. Fixes #743.
This commit is contained in:
Oliver Hamlet
2017-01-06 09:36:58 +00:00
parent bee0aa7562
commit 5a1ccb159d
3 changed files with 10 additions and 10 deletions
+9 -8
View File
@@ -6,6 +6,9 @@ const svgPath = path.join('resources', 'icon.svg');
const buildDirectory = path.join('build', 'icon');
const outputPath = path.join(buildDirectory, 'icon.ico');
const svgSize = 192;
const svgDPI = 90;
const sizes = [16, 20, 24, 30, 32, 36, 40, 48, 60, 64, 72, 80, 96, 128, 256];
fs.mkdirsSync(buildDirectory);
@@ -15,15 +18,13 @@ sizes.forEach((size) => {
const pngFile = path.join(buildDirectory, `icon-${size}.png`);
convertArgs.push(pngFile);
helpers.safeExecFileSync('inkscape', [
'-z',
'-e',
pngFile,
'-w',
size,
'-h',
size,
helpers.safeExecFileSync('convert', [
'-density',
(size / svgSize) * svgDPI,
'-background',
'none',
svgPath,
pngFile,
]);
});