Subversion Repositories Projects

Rev

Rev 495 | Rev 501 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
456 cascade 1
#!/bin/sh
2
#/****************************************************************************
3
# *   Copyright (C) 2009 by Claas Anders "CaScAdE" Rathje                    *
4
# *   admiralcascade@gmail.com                                               *
5
# *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
6
# *                                                                          *
7
# *   This program is free software; you can redistribute it and/or modify   *
8
# *   it under the terms of the GNU General Public License as published by   *
9
# *   the Free Software Foundation; either version 2 of the License.         *
10
# *                                                                          *
11
# *   This program is distributed in the hope that it will be useful,        *
12
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
13
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
14
# *   GNU General Public License for more details.                           *
15
# *                                                                          *
16
# *   You should have received a copy of the GNU General Public License      *
17
# *   along with this program; if not, write to the                          *
18
# *   Free Software Foundation, Inc.,                                        *
19
# *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
20
# ****************************************************************************/
21
 
22
DATE=`date +%Y%m%d-%H%M`
498 cascade 23
#DATE="20090604-1330"
495 cascade 24
REVISION=`svn info .. | awk '$1 == "Revision:" {print $2}'`
456 cascade 25
 
498 cascade 26
#NCMODES=`find ../ -name osd_ncmode_\*.c| sed 's/..\///g'`
27
#FCMODES=`find ../ -name osd_fcmode_\*.c| sed 's/..\///g'`
28
#
495 cascade 29
# build all the NCMODE files
498 cascade 30
#for CURRMODE in $NCMODES; do
31
#       CURRSHORTMODE=`echo $CURRMODE | sed -e 's/osd_ncmode_//g' -e 's/.c//g'`
32
#       
33
#       # build pal hex
34
#       export CFLAGS="-DBUILDDATE=\\\"${DATE}\\\" -DOSD_NCMODE=\\\"${CURRMODE}\\\""
35
#       make clean
36
#       make
37
#       mv C-OSD.hex C-OSD-${DATE}-$CURRSHORTMODE-pal.hex
38
#
39
#       # build ntsc hex
40
#       export CFLAGS="-DNTSC=1 -DBUILDDATE=\\\"${DATE}\\\" -DOSD_NCMODE=\\\"${CURRMODE}\\\""
41
#       make clean
42
#       make
43
#       mv C-OSD.hex C-OSD-${DATE}-$CURRSHORTMODE-ntsc.hex
44
#done
45
#
46
# build all the FCMODE files
47
#for CURRMODE in $FCMODES; do
48
#       CURRSHORTMODE=`echo $CURRMODE | sed -e 's/osd_fcmode_//g' -e 's/.c//g'`
49
#
50
#       #build pal hex FCONLY
51
#       export CFLAGS="-DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" -DOSD_FCMODE=\\\"${CURRMODE}\\\""
52
#       make clean
53
#       make
54
#       mv C-OSD.hex C-OSD-${DATE}-$CURRSHORTMODE-pal-fconly.hex
55
#
56
#       # build ntsc hex FCONLY
57
#       export CFLAGS="-DNTSC=1 -DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" -DOSD_FCMODE=\\\"${CURRMODE}\\\""
58
#       make clean
59
#       make
60
#       mv C-OSD.hex C-OSD-${DATE}-$CURRSHORTMODE-ntsc-fconly.hex
61
#done
456 cascade 62
 
498 cascade 63
# build pal hex
64
export CFLAGS="-DBUILDDATE=\\\"${DATE}\\\" "
65
make clean
66
make
67
mv C-OSD.hex C-OSD-${DATE}-pal.hex
456 cascade 68
 
498 cascade 69
# build ntsc hex
70
export CFLAGS="-DNTSC=1 -DBUILDDATE=\\\"${DATE}\\\" "
71
make clean
72
make
73
mv C-OSD.hex C-OSD-${DATE}-ntsc.hex
456 cascade 74
 
498 cascade 75
#build pal hex FCONLY
76
export CFLAGS="-DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
77
make clean
78
make
79
mv C-OSD.hex C-OSD-${DATE}-pal-fconly.hex
495 cascade 80
 
498 cascade 81
# build ntsc hex FCONLY
82
export CFLAGS="-DNTSC=1 -DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
83
make clean
84
make
85
mv C-OSD.hex C-OSD-${DATE}-ntsc-fconly.hex
495 cascade 86
 
498 cascade 87
 
456 cascade 88
# buil all character files
89
CHARFILES="112 128 136 144 152 160 168 176 184 192 200 208 216 224 232"
90
for i in $CHARFILES; do
91
        make clean
461 cascade 92
        export CFLAGS="-DWRITECHARS=${i} -DBUILDDATE=\\\"${DATE}\\\" "
456 cascade 93
        make
94
        TILL=`echo $i + 7 | bc`
95
        mv C-OSD.hex C-OSD-characters-${i}-${TILL}.hex
96
done
97
 
457 cascade 98
# clean up
99
make clean
100
 
456 cascade 101
md5sum *.hex
102
 
103
# pack all stuff
104
mkdir C-OSD-${DATE}
105
mv *.hex C-OSD-${DATE}
106
cp ../CHANGE.LOG C-OSD-${DATE}
107
cp ../LICENSE.TXT C-OSD-${DATE}
108
cp ../README.TXT C-OSD-${DATE}
109
zip -r -9 -q C-OSD-${DATE}.zip C-OSD-${DATE}
495 cascade 110
rm -rf C-OSD-${DATE}
456 cascade 111
 
112
du -h C-OSD-${DATE}.zip
495 cascade 113
echo "building based on revision $REVISION is now DONE..."