Subversion Repositories eduke32

Rev

Rev 2728 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2685 hendricks2 1
@echo off
2
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
3
 
4
set PATH=C:\devkitPro\devkitPPC\bin;C:\devkitPro\msys\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH%
5
 
6
:: Detect versioning systems and pull the revision number:
7
for /f "delims=" %%G in ('svn info 2^>^&1 ^| grep Revision ^| cut -d " " -f 2') do @set rev=r%%G
8
if not "%rev%"=="" set vc=svn
9
if "%rev%"=="" for /f "delims=" %%G in ('git svn info 2^>^&1 ^| grep Revision ^| cut -d " " -f 2') do @set rev=r%%G
10
if not "%rev%"=="" set vc=git
11
if "%rev%"=="" set vc=none
12
if not "%rev%"=="" echo const char *s_buildRev = "%rev%";>source\rev.h
13
if "%rev%"=="" set rev=rXXXX
14
 
15
:: Get the current date:
16
for /f "delims=" %%G in ('"C:\MinGW\msys\1.0\bin\date.exe" +%%Y%%m%%d') do @set currentdate=%%G
17
 
18
:: Build:
19
set buildparameters=PLATFORM=WII %*
20
 
21
make veryclean %buildparameters%
22
make OPTLEVEL=2 LTO=0 %buildparameters%
23
 
24
:: Package data:
25
xcopy /e /q /y Wii\apps apps\
26
for %%G in (eduke32) do for %%H in (.elf) do if exist "%%~G%%~H" move /y "%%~G%%~H" "apps\%%~G\boot%%~H"
27
for %%G in (eduke32) do for %%H in (.elf.map) do if exist "%%~G%%~H" del /f /q "%%~G%%~H"
28
"echo.exe" -e "    <version>%rev%</version>\n    <release_date>%currentdate%</release_date>" | "cat.exe" Wii\meta_1.xml - Wii\meta_2.xml >"apps\eduke32\meta.xml"
29
if exist "*.txt" copy /y "*.txt" "apps\eduke32\"
30
"ls.exe" -l -R apps
31
 
32
:: Clean up revision number:
33
if "%vc%"=="svn" svn revert source\rev.h
34
if "%vc%"=="git" git checkout source\rev.h
35
 
36
endlocal