Subversion Repositories eduke32

Rev

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

Rev Author Line No. Line
2685 hendricks2 1
@echo off
2
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
3
 
3582 hendricks2 4
set targets=eduke32 mapster32
2685 hendricks2 5
set PATH=C:\devkitPro\devkitPPC\bin;C:\devkitPro\msys\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH%
4818 hendricks2 6
set DEVKITPPC=C:/devkitPro/devkitPPC
7
set DEVKITPRO=C:/devkitPro
2685 hendricks2 8
 
3554 hendricks2 9
pushd "%~dp0.."
10
set wiidir=platform\Wii
11
 
2685 hendricks2 12
:: Detect versioning systems and pull the revision number:
4103 hendricks2 13
for /f "delims=" %%G in ('svn info 2^>^&1 ^| grep Revision ^| cut -d " " -f 2') do @set rev=%%G
2685 hendricks2 14
if not "%rev%"=="" set vc=svn
4103 hendricks2 15
if "%rev%"=="" for /f "delims=" %%G in ('git svn info 2^>^&1 ^| grep Revision ^| cut -d " " -f 2') do @set rev=%%G
2685 hendricks2 16
if not "%rev%"=="" set vc=git
17
if "%rev%"=="" set vc=none
4103 hendricks2 18
if "%rev%"=="" set rev=XXXX
2685 hendricks2 19
 
20
:: Get the current date:
21
for /f "delims=" %%G in ('"C:\MinGW\msys\1.0\bin\date.exe" +%%Y%%m%%d') do @set currentdate=%%G
22
 
23
:: Build:
4818 hendricks2 24
set commandline=make PLATFORM=WII %* STRIP=""
4512 hendricks2 25
echo %commandline%
26
%commandline%
2685 hendricks2 27
 
3495 hendricks2 28
for %%G in (%targets%) do if not exist "%%~G.elf" goto end
2728 hendricks2 29
 
4818 hendricks2 30
:: Strip:
31
for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" copy /y "%%~G%%~H" "%%~G-unstripped%%~H"
32
for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" powerpc-eabi-strip "%%~G%%~H"
33
 
2685 hendricks2 34
:: Package data:
3495 hendricks2 35
if not exist apps mkdir apps
3554 hendricks2 36
for %%G in (%targets%) do xcopy /e /q /y %wiidir%\apps\%%~G apps\%%~G\
3495 hendricks2 37
for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" move /y "%%~G%%~H" "apps\%%~G\boot%%~H"
38
for %%G in (%targets%) do for %%H in (.elf.map) do if exist "%%~G%%~H" del /f /q "%%~G%%~H"
4103 hendricks2 39
for %%G in (%targets%) do "echo.exe" -e "    <version>r%rev%</version>\n    <release_date>%currentdate%</release_date>" | "cat.exe" "%wiidir%\%%~G_meta_1.xml" - "%wiidir%\%%~G_meta_2.xml" >"apps\%%~G\meta.xml"
3495 hendricks2 40
 
4512 hendricks2 41
xcopy /e /q /y /EXCLUDE:%wiidir%\xcopy_exclude.txt package\common apps\eduke32\
3495 hendricks2 42
 
4512 hendricks2 43
xcopy /e /q /y /EXCLUDE:%wiidir%\xcopy_exclude.txt package\common apps\mapster32\
44
xcopy /e /q /y /EXCLUDE:%wiidir%\xcopy_exclude.txt package\sdk apps\mapster32\
3495 hendricks2 45
 
2685 hendricks2 46
"ls.exe" -l -R apps
4103 hendricks2 47
7z.exe a -mx9 -t7z eduke32-wii-r%rev%.7z apps -xr!*.svn*
2685 hendricks2 48
 
2728 hendricks2 49
:end
50
 
2685 hendricks2 51
endlocal
3495 hendricks2 52
goto :eof