OSDN Git Service

binding with libharu.
[putex/putex.git] / src / texsourc / lib / libhpdf / script / makeres.sh
1 #!/bin/sh
2 #
3 # make resource files for each platforms
4 #
5
6 _VERSION2=$(grep VERSION include/hpdf_consts.h | awk '{print $3}' | sed 's/"//g')".0"
7 _VERSION1=$(grep VERSION include/hpdf_consts.h | awk '{print $3}' | sed 's/"//g;s/\./,/g')",0"
8 _COMPILER=""
9
10 which windres
11 if [ $? -ne 0 ]; then
12         echo "windres does not exist."
13         exit 1
14 fi
15
16 echo "create .res file for haru$_VERSION1"
17
18 # for mingw
19
20 _COMPILER="MinGW"
21 cat win32/libhpdf.rc.template | sed "s/_VERSION1/$_VERSION1/g;s/_VERSION2/$_VERSION2/g;s/_COMPILER/$_COMPILER/g" > win32/mingw/libhpdf_mingw.rc
22
23 windres -O coff win32/mingw/libhpdf_mingw.rc win32/mingw/libhpdf_mingw.res
24
25 # for cygwin
26
27 _COMPILER="cygwin"
28 cat win32/libhpdf.rc.template | sed "s/_VERSION1/$_VERSION1/g;s/_VERSION2/$_VERSION2/g;s/_COMPILER/$_COMPILER/g" > win32/mingw/libhpdf_cygwin.rc
29
30 windres -O coff win32/mingw/libhpdf_cygwin.rc win32/mingw/libhpdf_cygwin.res
31
32
33 # for bcc32
34
35 _COMPILER="bcc32"
36 cat win32/libhpdf.rc.template | sed "s/_VERSION1/$_VERSION1/g;s/_VERSION2/$_VERSION2/g;s/_COMPILER/$_COMPILER/g" > win32/bcc32/libhpdf.rc
37
38 windres win32/bcc32/libhpdf.rc win32/bcc32/libhpdf.res
39
40 # for msvc
41
42 _COMPILER="msvc"
43 cat win32/libhpdf.rc.template | sed "s/_VERSION1/$_VERSION1/g;s/_VERSION2/$_VERSION2/g;s/_COMPILER/$_COMPILER/g" > win32/msvc/libhpdf.rc
44
45 windres win32/msvc/libhpdf.rc win32/msvc/libhpdf.res
46