Randomize some more.
[mplayer-setup-win32.git] / !_Build.bat
blob8d4618a0651c4f8b9ca3ff35ffd873a2aa515714
1 @echo off
3 REM Build Number and other version info
4 set "BUILD_NO=106"
5 set "MPLAYER_REVISION=35917"
6 set "SMPLAYER_VERSION=0.8.3 (SVN-r5072)"
7 set "MPUI_VERSION=1.2-pre3 (Build 38)"
8 set "CODECS_DATE=2011-01-31"
10 REM Path to NSIS, Unicode version highly recommended!
11 set "MAKE_NSIS=D:\NSIS\_Unicode\makensis.exe"
13 REM Path to UPX executable compressor program
14 set "UPX_PATH=%~dp0\Utils\UPX.exe"
16 REM --------------------------------------------------------------------------
17 REM Do NOT modify any lines below!
18 REM --------------------------------------------------------------------------
20 REM Get current Date
21 set ISO_DATE=
22 for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\Utils\Date.exe" +ISODATE:%%Y-%%m-%%d') do (
23         if "%%a"=="ISODATE" set "ISO_DATE=%%b"
26 REM Check for MakeNSIS
27 if not exist "%MAKE_NSIS%" (
28         echo MAKENSIS.EXE not found, check path!
29         pause
30         goto:eof
33 REM Print some Info
34 echo Build #%BUILD_NO%, Date: %ISO_DATE%
35 echo.
37 REM Create outputfolder, if not exists yet
38 mkdir "%~dp0\.Compile" 2> NUL
39 mkdir "%~dp0\.Release" 2> NUL
41 REM Build update tool
42 "%MAKE_NSIS%" "/DMPLAYER_BUILDNO=%BUILD_NO%" "/DMPLAYER_DATE=%ISO_DATE%" "/DUPX_PATH=%UPX_PATH%" "/DMPLAYER_OUTFILE=%~dp0\.Compile\Updater.exe" "%~dp0\MPUI_Updater.nsi"
43 if errorlevel 1 (
44         pause
45         goto:eof
48 REM Build main installer
49 "%MAKE_NSIS%" "/DMPLAYER_BUILDNO=%BUILD_NO%" "/DMPLAYER_DATE=%ISO_DATE%" "/DMPLAYER_REVISION=%MPLAYER_REVISION%" "/DSMPLAYER_VERSION=%SMPLAYER_VERSION%" "/DMPUI_VERSION=%MPUI_VERSION%" "/DCODECS_DATE=%CODECS_DATE%" "/DUPX_PATH=%UPX_PATH%" "/DMPLAYER_OUTFILE=%~dp0\.Release\MPUI.%ISO_DATE%.sfx" "%~dp0\MPUI_Setup.nsi"
50 if errorlevel 1 (
51         pause
52         goto:eof
55 REM Build installer wrapper
56 "%MAKE_NSIS%" "/DMPLAYER_BUILDNO=%BUILD_NO%" "/DMPLAYER_DATE=%ISO_DATE%" "/DMPLAYER_REVISION=%MPLAYER_REVISION%" "/DUPX_PATH=%UPX_PATH%" "/DMPLAYER_SRCFILE=%~dp0\.Release\MPUI.%ISO_DATE%.sfx" "/DMPLAYER_OUTFILE=%~dp0\.Release\MPUI.%ISO_DATE%.exe" "%~dp0\MPUI_Wrapper.nsi"
57 if errorlevel 1 (
58         pause
59         goto:eof
62 pause