Added MPlayer logo to resources.
[mplayer-setup-win32.git] / !_Build.bat
blob1a6fdb1075b418488c764c361ca42b0d33112c4d
1 @echo off
3 REM Build Number and other version info
4 set "BUILD_NO=120"
5 set "MPLAYER_REVISION=36541"
6 set "SMPLAYER_VERSION=0.8.6 (SVN-r5940)"
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 echo ---------------------------------------------------------
21 echo BUILD_NO: %BUILD_NO%
22 echo MPLAYER_REVISION: %MPLAYER_REVISION%
23 echo SMPLAYER_VERSION: %SMPLAYER_VERSION%
24 echo MPUI_VERSION: %MPUI_VERSION%
25 echo CODECS_DATE: %CODECS_DATE%
26 echo ---------------------------------------------------------
28 REM Get current Date
29 set ISO_DATE=
30 for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\Utils\Date.exe" +ISODATE:%%Y-%%m-%%d') do (
31         if "%%a"=="ISODATE" set "ISO_DATE=%%b"
34 REM Check for MakeNSIS
35 if not exist "%MAKE_NSIS%" (
36         echo MAKENSIS.EXE not found, check path!
37         pause
38         goto:eof
41 REM Print some Info
42 echo Build #%BUILD_NO%, Date: %ISO_DATE%
43 echo.
45 REM Create outputfolder, if not exists yet
46 mkdir "%~dp0\.Compile" 2> NUL
47 mkdir "%~dp0\.Release" 2> NUL
49 REM Build update tool
50 "%MAKE_NSIS%" "/DMPLAYER_BUILDNO=%BUILD_NO%" "/DMPLAYER_DATE=%ISO_DATE%" "/DUPX_PATH=%UPX_PATH%" "/DMPLAYER_OUTFILE=%~dp0\.Compile\Updater.exe" "%~dp0\MPUI_Updater.nsi"
51 if errorlevel 1 (
52         pause
53         goto:eof
56 REM Build main installer
57 "%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"
58 if errorlevel 1 (
59         pause
60         goto:eof
63 REM Build installer wrapper
64 "%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"
65 if errorlevel 1 (
66         pause
67         goto:eof
70 pause