mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove Inkscape dependency for ICO creation
Just use Imagemagick. Fixes #743.
This commit is contained in:
@@ -23,7 +23,6 @@ addons:
|
||||
- libasound2-dev
|
||||
- libxtst-dev
|
||||
# Scripting dependencies
|
||||
- inkscape
|
||||
- imagemagick
|
||||
|
||||
cache:
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ environment:
|
||||
secure: fBQJmUDK/EgEUWjjbo6bWcitczeFTJZT4OZ3ZZ4FoUT6soBsTWPQJnr8YEVMFhGP
|
||||
|
||||
install:
|
||||
- choco install -y doxygen.portable InnoSetup inkscape imagemagick.tool
|
||||
- choco install -y doxygen.portable InnoSetup imagemagick.tool
|
||||
- python -m pip install sphinx breathe sphinx_rtd_theme
|
||||
- npm install
|
||||
- .\node_modules\.bin\bower install
|
||||
|
||||
@@ -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,
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user