File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ :: Assume that ImageMagick already installed by installation script.
4+ set PATH = %TEMP% \imagemagick;%PATH%
5+
6+ echo Searching for imagemagik executables in PATH...
7+ where magick.exe
8+ if errorlevel 1 (
9+ echo File 'magick.exe' not found. Please install imagemagik on system and add the directory to PATH.
10+ exit /B %errorlevel%
11+ )
12+ echo Found imagemagik directory.
13+ echo .
14+
15+ call :process_file " 0.2.0.svg"
16+ pause
17+ goto :eof
18+
19+
20+ :process_file
21+ echo Generate pngs...
22+ magick -background none -size 16x16 " %~1 " " %~dpn1 -16.png"
23+ magick -background none -size 32x32 " %~1 " " %~dpn1 -32.png"
24+ magick -background none -size 48x48 " %~1 " " %~dpn1 -48.png"
25+ magick -background none -size 64x64 " %~1 " " %~dpn1 -64.png"
26+
27+ echo Override generated 16x16 icon with the legacy 16x16 icon.
28+ magick -background none " 0.2.0-16x16-legacy.ico" " %~dpn1 -16.png"
29+
30+ echo Generate ico...
31+ set png_files =
32+ set png_files = %png_files% " %~dpn1 -16.png"
33+ set png_files = %png_files% " %~dpn1 -32.png"
34+ set png_files = %png_files% " %~dpn1 -48.png"
35+ set png_files = %png_files% " %~dpn1 -64.png"
36+ magick %png_files% " %~dpn1 .ico"
37+
38+ echo Generated " %~dpn1 .ico" .
39+ echo .
40+
41+ echo Deleting png (intermediate files).
42+ del %png_files%
43+
44+ goto :eof
45+
46+ :eof
You can’t perform that action at this time.
0 commit comments