Rev 501 | Rev 735 | 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 |
514 | cascade | 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. * |
||
456 | cascade | 20 | # ****************************************************************************/ |
21 | |||
22 | DATE=`date +%Y%m%d-%H%M` |
||
514 | cascade | 23 | #DATE="20090604-1350" |
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'` |
||
514 | cascade | 32 | # |
498 | cascade | 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 | |
514 | cascade | 88 | # buil character files |
89 | # PAL |
||
90 | make clean |
||
91 | export CFLAGS="-DWRITECHARS=1 -DBUILDDATE=\\\"${DATE}\\\" " |
||
92 | make |
||
93 | mv C-OSD.hex C-OSD-characters-pal.hex |
||
501 | cascade | 94 | |
514 | cascade | 95 | # and NTSC as well |
96 | make clean |
||
97 | export CFLAGS="-DNTSC=1 -DWRITECHARS=1 -DBUILDDATE=\\\"${DATE}\\\" " |
||
98 | make |
||
99 | mv C-OSD.hex C-OSD-characters-ntsc.hex |
||
501 | cascade | 100 | |
456 | cascade | 101 | |
514 | cascade | 102 | |
457 | cascade | 103 | # clean up |
104 | make clean |
||
105 | |||
456 | cascade | 106 | md5sum *.hex |
107 | |||
108 | # pack all stuff |
||
109 | mkdir C-OSD-${DATE} |
||
110 | mv *.hex C-OSD-${DATE} |
||
111 | cp ../CHANGE.LOG C-OSD-${DATE} |
||
112 | cp ../LICENSE.TXT C-OSD-${DATE} |
||
113 | cp ../README.TXT C-OSD-${DATE} |
||
114 | zip -r -9 -q C-OSD-${DATE}.zip C-OSD-${DATE} |
||
495 | cascade | 115 | rm -rf C-OSD-${DATE} |
456 | cascade | 116 | |
117 | du -h C-OSD-${DATE}.zip |
||
495 | cascade | 118 | echo "building based on revision $REVISION is now DONE..." |