forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-logo.sh
executable file
·64 lines (52 loc) · 3.14 KB
/
create-logo.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
61
62
63
64
#!/bin/bash
file=codelite-logo.svg
filename=codelite-logo
mkdir -p ../bitmaps/osx/icon.iconset
os_name=`uname -s`
if [ "${os_name}" != "Darwin" ]; then
file=codelite-logo-low-res.svg
## 16x16 version
inkscape $file --without-gui --export-png=../bitmaps/16-${filename}.png --export-width=16 --export-height=16
inkscape $file --without-gui --export-png=../bitmaps/16-${filename}@2x.png --export-width=32 --export-height=32
cp ../bitmaps/16-${filename}.png ../bitmaps/osx/icon.iconset/icon_16x16.png
cp ../bitmaps/16-${filename}@2x.png ../bitmaps/osx/icon.iconset/[email protected]
## 24x24 version, not needed for OSX
inkscape $file --without-gui --export-png=../bitmaps/24-${filename}.png --export-width=24 --export-height=24
inkscape $file --without-gui --export-png=../bitmaps/24-${filename}@2x.png --export-width=48 --export-height=48
## 32x32 version
inkscape $file --without-gui --export-png=../bitmaps/32-${filename}.png --export-width=32 --export-height=32
inkscape $file --without-gui --export-png=../bitmaps/32-${filename}@2x.png --export-width=64 --export-height=64
cp ../bitmaps/32-${filename}.png ../bitmaps/osx/icon.iconset/icon_32x32.png
cp ../bitmaps/32-${filename}@2x.png ../bitmaps/osx/icon.iconset/[email protected]
## 64x64 version
inkscape $file --without-gui --export-png=../bitmaps/64-${filename}.png --export-width=64 --export-height=64
inkscape $file --without-gui --export-png=../bitmaps/64-${filename}@2x.png --export-width=128 --export-height=128
## Use the hi-res image from hereon
## 128x128 version
file=codelite-logo.svg
inkscape $file --without-gui --export-png=../bitmaps/128-${filename}.png --export-width=128 --export-height=128
inkscape $file --without-gui --export-png=../bitmaps/128-${filename}@2x.png --export-width=256 --export-height=256
cp ../bitmaps/128-${filename}.png ../bitmaps/osx/icon.iconset/icon_128x128.png
cp ../bitmaps/128-${filename}@2x.png ../bitmaps/osx/icon.iconset/[email protected]
## 256x256 version
inkscape $file --without-gui --export-png=../bitmaps/256-${filename}.png --export-width=256 --export-height=256
inkscape $file --without-gui --export-png=../bitmaps/256-${filename}@2x.png --export-width=512 --export-height=512
cp ../bitmaps/256-${filename}.png ../bitmaps/osx/icon.iconset/icon_256x256.png
cp ../bitmaps/256-${filename}@2x.png ../bitmaps/osx/icon.iconset/[email protected]
## 512x512 version
inkscape $file --without-gui --export-png=../bitmaps/512-${filename}.png --export-width=512 --export-height=512
inkscape $file --without-gui --export-png=../bitmaps/512-${filename}@2x.png --export-width=1024 --export-height=1024
cp ../bitmaps/512-${filename}.png ../bitmaps/osx/icon.iconset/icon_512x512.png
cp ../bitmaps/512-${filename}@2x.png ../bitmaps/osx/icon.iconset/[email protected]
fi
cd ../bitmaps
##
## Create a zip file named codelite-bitmaps.zip
##
rm -f ../Runtime/codelite-bitmaps.zip
zip ../Runtime/codelite-bitmaps.zip *.png
if [ "${os_name}" == "Darwin" ]; then
cd osx
echo iconutil -c icns icon.iconset/
iconutil -c icns icon.iconset/
fi