-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenres.sh
60 lines (49 loc) · 2.64 KB
/
genres.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
baseDir="$PWD"
svgDir="$baseDir/assets/svg"
pngDir="$baseDir/assets/png"
bmpDir="$baseDir/assets/bmp"
icoDir="$baseDir/assets/ico"
resDir="$baseDir/res"
mkdir -p "$bmpDir"
mkdir -p "$pngDir"
mkdir -p "$icoDir"
gen_icon() {
convert -background none -density 48 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none -density 96 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none -density 144 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none -density 768 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none \
"$pngDir/[email protected]" \
"$pngDir/[email protected]" \
"$pngDir/[email protected]" \
"$pngDir/[email protected]" \
"$icoDir/$1.ico"
cp "$icoDir/$1.ico" "$resDir/"
}
gen_strip() {
convert -background none -density 96 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none -density 144 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none -density 192 "$svgDir/$1.svg" "$pngDir/[email protected]"
convert -background none "$pngDir/[email protected]" -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
convert -background none "$pngDir/[email protected]" -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
convert -background none "$pngDir/[email protected]" -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
cp "$bmpDir/[email protected]" "$resDir/"
cp "$bmpDir/[email protected]" "$resDir/"
cp "$bmpDir/[email protected]" "$resDir/"
convert -background none "$pngDir/[email protected]" -modulate 100,130,100 -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
convert -background none "$pngDir/[email protected]" -modulate 100,130,100 -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
convert -background none "$pngDir/[email protected]" -modulate 100,130,100 -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
cp "$bmpDir/[email protected]" "$resDir/"
cp "$bmpDir/[email protected]" "$resDir/"
cp "$bmpDir/[email protected]" "$resDir/"
convert -background none "$pngDir/[email protected]" -colorspace Gray -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
convert -background none "$pngDir/[email protected]" -colorspace Gray -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
convert -background none "$pngDir/[email protected]" -colorspace Gray -define bmp:format=bmp3 -define bmp3:alpha=true "$bmpDir/[email protected]"
cp "$bmpDir/[email protected]" "$resDir/"
cp "$bmpDir/[email protected]" "$resDir/"
cp "$bmpDir/[email protected]" "$resDir/"
}
gen_icon "ApplicationIcon"
gen_icon "ApplicationIconDebug"
gen_strip "toolbar"