-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppIconMaker
172 lines (146 loc) · 9.57 KB
/
AppIconMaker
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#!bin/bash
# make app icons for Xcode iOS app
echo Enter the icon file name
read Input
base=${Input##*/}
path=${Input%/*}
IconName=${base%.*}
ext=${base##*.}
cd $path
mkdir AppIcon.appiconset
touch AppIcon.appiconset/Contents.json
#sleep 0.5
echo "{" >> $path/AppIcon.appiconset/Contents.json
echo " \"images\" : [" >> $path/AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 40x40 AppIcon.appiconset/$IconName-0.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-0.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"20x20\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 60x60 AppIcon.appiconset/$IconName-1.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-1.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"3x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"20x20\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 58x58 AppIcon.appiconset/$IconName-2.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-2.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"29x29\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 87x87 AppIcon.appiconset/$IconName-3.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-3.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"3x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"29x29\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 80x80 AppIcon.appiconset/$IconName-4.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-4.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"40x40\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 120x120 AppIcon.appiconset/$IconName-5.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-5.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"3x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"40x40\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 120x120 AppIcon.appiconset/$IconName-6.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-6.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"60x60\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 180x180 AppIcon.appiconset/$IconName-7.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-7.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"iphone\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"3x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"60x60\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 20x20 AppIcon.appiconset/$IconName-8.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-8.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"1x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"20x20\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 40x40 AppIcon.appiconset/$IconName-9.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-9.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"20x20\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 29x29 AppIcon.appiconset/$IconName-10.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-10.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"1x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"29x29\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 58x58 AppIcon.appiconset/$IconName-11.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-11.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"29x29\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 40x40 AppIcon.appiconset/$IconName-12.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-12.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"1x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"40x40\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 80x80 AppIcon.appiconset/$IconName-13.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-13.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"40x40\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 76x76 AppIcon.appiconset/$IconName-14.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-14.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"1x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"76x76\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 152x152 AppIcon.appiconset/$IconName-15.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-15.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"76x76\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 167x167 AppIcon.appiconset/$IconName-16.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName-16.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ipad\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"2x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"83.5x83.5\"" >> AppIcon.appiconset/Contents.json
echo " }," >> AppIcon.appiconset/Contents.json
magick convert $IconName.$ext -resize 1024x1024 AppIcon.appiconset/$IconName.$ext
echo " {" >> AppIcon.appiconset/Contents.json
echo " \"filename\" : \"$IconName.$ext\"," >> AppIcon.appiconset/Contents.json
echo " \"idiom\" : \"ios-marketing\"," >> AppIcon.appiconset/Contents.json
echo " \"scale\" : \"1x\"," >> AppIcon.appiconset/Contents.json
echo " \"size\" : \"1024x1024\"" >> AppIcon.appiconset/Contents.json
echo " }" >> AppIcon.appiconset/Contents.json
echo " ]," >> AppIcon.appiconset/Contents.json
echo " \"info\" : {" >> AppIcon.appiconset/Contents.json
echo " \"author\" : \"xcode\"," >> AppIcon.appiconset/Contents.json
echo " \"version\" : 1" >> AppIcon.appiconset/Contents.json
echo " }" >> AppIcon.appiconset/Contents.json
echo "}" >> AppIcon.appiconset/Contents.json