Subversion Repositories Projects

Rev

Rev 2041 | Rev 2075 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

@echo off
:: /****************************************************************************
::  *   Copyright (C) 2010-2014 by Claas Anders "CaScAdE" Rathje               *
::  *   admiralcascade@gmail.com                                               *
::  *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
::  *                                                                          *
::  *   This program is free software; you can redistribute it and/or modify   *
::  *   it under the terms of the GNU General Public License as published by   *
::  *   the Free Software Foundation; either version 2 of the License.         *
::  *                                                                          *
::  *   This program is distributed in the hope that it will be useful,        *
::  *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
::  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
::  *   GNU General Public License for more details.                           *
::  *                                                                          *
::  *   You should have received a copy of the GNU General Public License      *
::  *   along with this program; if not, write to the                          *
::  *   Free Software Foundation, Inc.,                                        *
::  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
::  ****************************************************************************/

set OSDBUILDDATE=%DATE:~-4,4%%DATE:~-7,2%%DATE:~0,2%-%TIME:~0,2%%TIME:~3,2%
set OSDBUILDDATE=20140415-2130
echo "Building: %OSDBUILDDATE%"

:: date /T


:: clean up first

del *.hex

:: build pal hex

set CFLAGS=-DNTSC=0 -DBUILDOSDBUILDDATE=\"%OSDBUILDDATE%\"
make clean
make
move C-OSD.hex C-OSD-%OSDBUILDDATE%-pal.hex


:: build ntsc hex

set CFLAGS=-DNTSC=1 -DBUILDOSDBUILDDATE=\"%OSDBUILDDATE%\"
make clean
make
move C-OSD.hex C-OSD-%OSDBUILDDATE%-ntsc.hex

:: build pal hex FCONLY

set CFLAGS=-DNTSC=0 -DFCONLY=1 -DBUILDOSDBUILDDATE=\"%OSDBUILDDATE%\"
make clean
make
move C-OSD.hex C-OSD-%OSDBUILDDATE%-pal-fconly.hex

:: build ntsc hex FCONLY

set CFLAGS=-DNTSC=1 -DFCONLY=1 -DBUILDOSDBUILDDATE=\"%OSDBUILDDATE%\"
make clean
make
move C-OSD.hex C-OSD-%OSDBUILDDATE%-ntsc-fconly.hex


:: build character files

:: PAL
set CFLAGS=-DNTSC=0 -DWRITECHARS=1 -DBUILDOSDBUILDDATE=\"%OSDBUILDDATE%\"
make clean
make
move C-OSD.hex C-OSD-characters-pal.hex

:: and NTSC as well

set CFLAGS=-DNTSC=1 -DWRITECHARS=1 -DBUILDOSDBUILDDATE=\"%OSDBUILDDATE%\"
make clean
make
move C-OSD.hex C-OSD-characters-ntsc.hex

:: clean up

make clean

:: show stats  f.e. http://etree.org/cgi-bin/counter.cgi/software/md5sum.exe

md5sum *.hex
::dir /A *.hex

:: pack all stuff

mkdir C-OSD-%OSDBUILDDATE%
move *.hex C-OSD-%OSDBUILDDATE%
copy ..\CHANGE.LOG C-OSD-%OSDBUILDDATE%
copy ..\LICENSE.TXT C-OSD-%OSDBUILDDATE%
copy ..\README.TXT C-OSD-%OSDBUILDDATE%
copy flash-usbasp.bat C-OSD-%OSDBUILDDATE%
:: 7zip command line version from http://www.7-zip.org
7za a -tzip  C-OSD-%OSDBUILDDATE%.zip C-OSD-%OSDBUILDDATE%

rmdir /S /Q C-OSD-%OSDBUILDDATE%

dir /A C-OSD-%OSDBUILDDATE%.zip

::echo "building based on revision $REVISION is now DONE..."