diff options
author | davilla <davilla@xbmc.org> | 2013-04-11 13:58:38 -0700 |
---|---|---|
committer | davilla <davilla@xbmc.org> | 2013-04-11 13:58:38 -0700 |
commit | 9ad174340fa459090f4fb0c59ad1b7718a59846c (patch) | |
tree | da034e64e5259347c34b16bfe88faf7d45f8261c /project | |
parent | 8a45973783e792051eaa809085ddc98ffa04e3ac (diff) | |
parent | e85eb148ae642ff75835b55242a815fa5e24a194 (diff) |
Merge pull request #2554 from FlyingRat/ffmpeg-n1.2
[FFmpeg] version bump to n1.2 (rev e820e3a)
Diffstat (limited to 'project')
-rw-r--r-- | project/Win32BuildSetup/BuildSetup.bat | 572 | ||||
-rw-r--r-- | project/Win32BuildSetup/buildmingwlibs.sh | 98 |
2 files changed, 359 insertions, 311 deletions
diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat index ef1dc2a5f3..6e58f58d17 100644 --- a/project/Win32BuildSetup/BuildSetup.bat +++ b/project/Win32BuildSetup/BuildSetup.bat @@ -1,296 +1,311 @@ @ECHO OFF -rem ----Usage---- -rem BuildSetup [gl|dx] [clean|noclean] -rem vs2010 for compiling with visual studio 2010 -rem gl for opengl build (default) -rem dx for directx build -rem clean to force a full rebuild -rem noclean to force a build without clean -rem noprompt to avoid all prompts -rem nomingwlibs to skip building all libs built with mingw +@setlocal + +rem +rem BuildSetup.sh (v1.1) +rem +rem PURPOSE - BuildSetup creates a complete XBMC installer package +rem +rem Usage: +rem BuildSetup [options] - Default options: dx noclean vs2010 errpromp mingwlibs +rem +rem Option Explanation +rem --------- ----------------------------------------------- +rem dx Build for DirectX (default) +rem noclean Build without clean (default) +rem vs2010 Compile with Visual Studio 2010 (default) +rem errprompt Only pause or prompt on error (default) +rem mingwlibs Build or rebuil mingwlibs only when neccesary (default) +rem +rem gl Build for OpenGL (not supported) +rem clean Force a full rebuild i.e. rebuilds everything +rem prompt Always prompt +rem noprompt Avoid all prompts +rem nomingwlibs Skip nomingwlibs + + CLS COLOR 1B TITLE XBMC for Windows Build Script -rem ----PURPOSE---- -rem - Create a working XBMC build with a single click -rem ------------------------------------------------------------- -rem Config -rem If you get an error that Visual studio was not found, SET your path for VSNET main executable. -rem ------------------------------------------------------------- -rem CONFIG START + +:: +:: Set default options +:: + SET comp=vs2010 -SET target=dx -SET buildmode=ask -SET promptlevel=prompt +SET graphics=dx +SET buildmode=noclean +SET promptlevel=errprompt SET buildmingwlibs=true SET exitcode=0 -SET useshell=rxvt -FOR %%b in (%1, %2, %3, %4, %5) DO ( + +:: +:: Check command line options +:: +FOR %%b in (%*) DO ( IF %%b==vs2010 SET comp=vs2010 - IF %%b==dx SET target=dx - IF %%b==gl SET target=gl + IF %%b==dx SET videmode=dx + IF %%b==gl echo "%0%: option gl currently not supported" IF %%b==clean SET buildmode=clean - IF %%b==noclean SET buildmode=noclean IF %%b==noprompt SET promptlevel=noprompt + IF %%b==prompt SET promptlevel=prompt IF %%b==nomingwlibs SET buildmingwlibs=false - IF %%b==sh SET useshell=sh ) -SET buildconfig=Release (DirectX) -IF %target%==gl SET buildconfig=Release (OpenGL) +:: +:: Clean up section +:: + +IF EXIST buildlog.html del buildlog.html /q +IF EXIST errormingw del errormingw /q +IF EXIST prompt del prompt /q +IF EXIST makeclean del makeclean /q + +:: +:: Check for Visual Studio and select solution target +:: IF %comp%==vs2010 ( IF "%VS100COMNTOOLS%"=="" ( - set NET="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" - ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" ( - set NET="%VS100COMNTOOLS%\..\IDE\VCExpress.exe" - ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\devenv.exe" ( - set NET="%VS100COMNTOOLS%\..\IDE\devenv.exe" + set VS_EXE="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" + ) ELSE IF EXIST "%VS100COMNTOOLS%..\IDE\devenv.exe" ( + SET VS_EXE="%VS100COMNTOOLS%..\IDE\devenv.exe" + ) ELSE IF EXIST "%VS100COMNTOOLS%..\IDE\VCExpress.exe" ( + SET VS_EXE="%VS100COMNTOOLS%..\IDE\VCExpress.exe" + ) + + IF NOT EXIST %VS_EXE% ( + SET DIETEXT="Visual Studio 2010 Express not installed" + goto DIE + ) +) ELSE ( + SET DIETEXT="Unsupported Compiler: %comp%" + GOTO DIE +) + +:: +:: Check for existing xbcmc.exe +:: + +IF %graphics%==dx SET RELEASE=Release (DirectX) +IF %graphics%==gl SET RELEASE=Release (OpenGL) + +set XBMC_EXE="..\VS2010Express\XBMC\%RELEASE%\XBMC.exe" +set XBMC_PDB="..\VS2010Express\XBMC\%RELEASE%\XBMC.pdb" + +IF EXIST %XBMC_EXE% IF "%promptlevel%"=="prompt" ( + ECHO ------------------------------------------------------------ + ECHO Found a previous Compiled XBMC.EXE + ECHO 1. Rebuild changed files only. [default] + ECHO 2. Force rebuild everything. + ECHO ------------------------------------------------------------ + SET ANSWER=1 + set /P ANSWER="Compile mode: 1/2? [1]:" + + if /I "%ANSWER%" EQU 2 ( + set buildmode=clean + ) else ( + set buildmode=noclean ) ) - IF NOT EXIST %NET% ( - set DIETEXT=Visual Studio .NET 2010 Express was not found. - goto DIE - ) - - set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /build "%buildconfig%" - set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /clean "%buildconfig%" - set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe" - set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb" - - rem CONFIG END - rem ------------------------------------------------------------- - - echo : - echo ::: - echo :::: - echo :::: - echo ::::::: ::::::::::::::::: :::::: :::::: ::::::: - echo ::::::::: :::::::::::::::::::: :::::::::: :::::::::: ::::::::: - echo ::::::::: :::::::::::::::::::::: :::::::::::::::::::::::: ::::::::: - echo ::::::::: ::: ::::: ::::: :::::::: :::: ::::: - echo :::::: :::: :::: :::: ::::: ::::::: - echo ::::: :::: ::::::: ::::: :::::: - echo ::::: ::: :::::: ::: :::::: - echo :::: ::: :::::: :::: :::::: - echo :::: ::: ::::::: :::: :::::: - echo ::::: :::: ::::::: :::: :::::: - echo ::::::: :::: :::::::: ::: ::::::: - echo ::::::::::::::: ::::: ::::: ::: ::: ::::::::: - echo ::::::::: ::::::::: ::::::::::: ::: ::: ::: ::::::::: - echo :::::::: ::::::::: ::::::::: ::: ::: ::: :::::::: - echo :::::: ::::::: ::::: : :: :: :::::: - goto EXE_COMPILE - -:EXE_COMPILE - IF EXIST buildlog.html del buildlog.html /q - IF %buildmode%==clean goto COMPILE_EXE - IF %buildmode%==noclean goto COMPILE_NO_CLEAN_EXE - rem --------------------------------------------- - rem check for existing exe - rem --------------------------------------------- - - IF EXIST %EXE% ( - goto EXE_EXIST - ) - goto COMPILE_EXE -:EXE_EXIST - IF %promptlevel%==noprompt goto COMPILE_EXE - ECHO ------------------------------------------------------------ - ECHO Found a previous Compiled WIN32 EXE! - ECHO [1] a NEW EXE will be compiled for the BUILD_WIN32 - ECHO [2] existing EXE will be updated (quick mode compile) for the BUILD_WIN32 - ECHO ------------------------------------------------------------ - set /P XBMC_COMPILE_ANSWER=Compile a new EXE? [1/2]: - if /I %XBMC_COMPILE_ANSWER% EQU 1 goto COMPILE_EXE - if /I %XBMC_COMPILE_ANSWER% EQU 2 goto COMPILE_NO_CLEAN_EXE - -:COMPILE_EXE - ECHO Wait while preparing the build. - ECHO ------------------------------------------------------------ - ECHO Cleaning Solution... - %NET% %CLEAN_EXE% - ECHO Compiling XBMC... - %NET% %OPTS_EXE% - IF NOT EXIST %EXE% ( - set DIETEXT="XBMC.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - IF %promptlevel%==noprompt ( - type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" +:: +:: Build MinGWlibs +:: + +IF %buildmingwlibs%==true ( + IF %buildmode%==clean ( + echo Force rebuild of MinGWlibs + ) else IF EXIST mingwlibsok ( + :: echo MinGWlibs already exists [skipping...] + SET buildmingwlibs=false ) +) + +IF %buildmingwlibs%==true ( + ECHO ------------------------------------------------------------ + ECHO Compiling MinGWlibs libraries... + + IF %buildmode%==clean ECHO makeclean>makeclean + IF %promptlevel%==prompt ECHO prompt>prompt + + call buildmingwlibs.bat + + IF NOT EXIST mingwlibsok ( + set DIETEXT="failed to build mingw libs" goto DIE ) - ECHO Done! - ECHO ------------------------------------------------------------ - set buildmode=clean - GOTO MAKE_BUILD_EXE - -:COMPILE_NO_CLEAN_EXE - ECHO Wait while preparing the build. - ECHO ------------------------------------------------------------ - ECHO Compiling Solution... - %NET% %OPTS_EXE% - IF NOT EXIST %EXE% ( - set DIETEXT="XBMC.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - IF %promptlevel%==noprompt ( - type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - ) + + IF EXIST errormingw ( + set DIETEXT="failed to build mingw libs" goto DIE ) - ECHO Done! - ECHO ------------------------------------------------------------ - GOTO MAKE_BUILD_EXE - -:MAKE_BUILD_EXE - IF %buildmingwlibs%==true ( - ECHO Compiling mingw libs - ECHO bla>noprompt - IF EXIST errormingw del errormingw > NUL - IF %buildmode%==clean ( - ECHO bla>makeclean +) + +:: +:: Build the XBMC solution with Visual Studio command line +:: + +IF %buildmode%==clean ( + set BUILDFLAG=/rebuild +) else ( + set BUILDFLAG=/build +) + +ECHO ------------------------------------------------------------ +ECHO Compiling XBMC %BUILDFLAG% %RELEASE% ... + +%VS_EXE% "..\VS2010Express\XBMC for Windows.sln" %BUILDFLAG% "%RELEASE%" + +:: +:: Check that target exists +:: + +IF NOT EXIST %XBMC_EXE% ( + set DIETEXT="XBMC.EXE failed to build! See %CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log" + IF %promptlevel%==noprompt ( + type "%CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log" ) - rem only use sh to please jenkins - IF %useshell%==sh ( - call buildmingwlibs.bat sh - ) ELSE ( - call buildmingwlibs.bat - ) - IF EXIST errormingw ( - set DIETEXT="failed to build mingw libs" - goto DIE - ) - ) - - ECHO Copying files... - IF EXIST BUILD_WIN32 rmdir BUILD_WIN32 /S /Q - - Echo .svn>exclude.txt - Echo CVS>>exclude.txt - Echo Thumbs.db>>exclude.txt - Echo Desktop.ini>>exclude.txt - Echo dsstdfx.bin>>exclude.txt - Echo exclude.txt>>exclude.txt - rem and exclude potential leftovers - Echo mediasources.xml>>exclude.txt - Echo advancedsettings.xml>>exclude.txt - Echo guisettings.xml>>exclude.txt - Echo profiles.xml>>exclude.txt - Echo sources.xml>>exclude.txt - Echo userdata\cache\>>exclude.txt - Echo userdata\database\>>exclude.txt - Echo userdata\playlists\>>exclude.txt - Echo userdata\script_data\>>exclude.txt - Echo userdata\thumbnails\>>exclude.txt - rem UserData\visualisations contains currently only xbox visualisationfiles - Echo userdata\visualisations\>>exclude.txt - rem other platform stuff - Echo lib-osx>>exclude.txt - Echo players\mplayer>>exclude.txt - Echo FileZilla Server.xml>>exclude.txt - Echo asound.conf>>exclude.txt - Echo voicemasks.xml>>exclude.txt - Echo Lircmap.xml>>exclude.txt - - md BUILD_WIN32\Xbmc - - xcopy %EXE% BUILD_WIN32\Xbmc > NUL - xcopy ..\..\userdata BUILD_WIN32\Xbmc\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL - copy ..\..\copying.txt BUILD_WIN32\Xbmc > NUL - copy ..\..\LICENSE.GPL BUILD_WIN32\Xbmc > NUL - copy ..\..\known_issues.txt BUILD_WIN32\Xbmc > NUL - xcopy dependencies\*.* BUILD_WIN32\Xbmc /Q /I /Y /EXCLUDE:exclude.txt > NUL - copy sources.xml BUILD_WIN32\Xbmc\userdata > NUL - - xcopy ..\..\language BUILD_WIN32\Xbmc\language /E /Q /I /Y /EXCLUDE:exclude.txt > NUL - xcopy ..\..\addons BUILD_WIN32\Xbmc\addons /E /Q /I /Y /EXCLUDE:exclude.txt > NUL - xcopy ..\..\system BUILD_WIN32\Xbmc\system /E /Q /I /Y /EXCLUDE:exclude.txt > NUL - xcopy ..\..\media BUILD_WIN32\Xbmc\media /E /Q /I /Y /EXCLUDE:exclude.txt > NUL - xcopy ..\..\sounds BUILD_WIN32\Xbmc\sounds /E /Q /I /Y /EXCLUDE:exclude.txt > NUL + goto DIE +) + +:: +:: Copy installer package files +:: + +ECHO ------------------------------------------------------------ +ECHO Copying files... +( + echo .svn + echo CVS + echo Thumbs.db + echo Desktop.ini + echo dsstdfx.bin + echo exclude.txt + :: and exclude potential leftovers + echo mediasources.xml + echo advancedsettings.xml + echo guisettings.xml + echo profiles.xml + echo sources.xml + echo userdata\cache\ + echo userdata\database\ + echo userdata\playlists\ + echo userdata\script_data\ + echo userdata\thumbnails\ + :: UserData\visualisations contains currently only xbox visualisationfiles + echo userdata\visualisations\ + :: other platform stuff + echo lib-osx + echo players\mplayer + echo FileZilla Server.xml + echo asound.conf + echo voicemasks.xml + echo Lircmap.xml + +) > exclude.txt + +IF EXIST BUILD_WIN32 rmdir BUILD_WIN32 /S /Q +md BUILD_WIN32\Xbmc + +xcopy %XBMC_EXE% BUILD_WIN32\Xbmc > NUL +xcopy ..\..\userdata BUILD_WIN32\Xbmc\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL +copy ..\..\copying.txt BUILD_WIN32\Xbmc > NUL +copy ..\..\LICENSE.GPL BUILD_WIN32\Xbmc > NUL +copy ..\..\known_issues.txt BUILD_WIN32\Xbmc > NUL +xcopy dependencies\*.* BUILD_WIN32\Xbmc /Q /I /Y /EXCLUDE:exclude.txt > NUL +copy sources.xml BUILD_WIN32\Xbmc\userdata > NUL + +xcopy ..\..\language BUILD_WIN32\Xbmc\language /E /Q /I /Y /EXCLUDE:exclude.txt > NUL +xcopy ..\..\addons BUILD_WIN32\Xbmc\addons /E /Q /I /Y /EXCLUDE:exclude.txt > NUL +xcopy ..\..\system BUILD_WIN32\Xbmc\system /E /Q /I /Y /EXCLUDE:exclude.txt > NUL +xcopy ..\..\media BUILD_WIN32\Xbmc\media /E /Q /I /Y /EXCLUDE:exclude.txt > NUL +xcopy ..\..\sounds BUILD_WIN32\Xbmc\sounds /E /Q /I /Y /EXCLUDE:exclude.txt > NUL + +ECHO ------------------------------------------------------------ +ECHO Building PVR add ons... +call buildpvraddons.bat %NET% - ECHO ------------------------------------------------------------ - call buildpvraddons.bat %NET% +IF EXIST error.log del /q error.log 2> NUL +SET build_path=%CD% +ECHO ------------------------------------------------------------ +ECHO Building Confluence Skin... +cd ..\..\addons\skin.confluence +call build.bat 2>&1 > NUL +cd %build_path% +:: restore color and title, some scripts mess these up +COLOR 1B +TITLE XBMC for Windows Build Script + +IF EXIST exclude.txt del exclude.txt 2> NUL +del /s /q /f BUILD_WIN32\Xbmc\*.so 2> NUL +del /s /q /f BUILD_WIN32\Xbmc\*.h 2> NUL +del /s /q /f BUILD_WIN32\Xbmc\*.cpp 2> NUL +del /s /q /f BUILD_WIN32\Xbmc\*.exp 2> NUL +del /s /q /f BUILD_WIN32\Xbmc\*.lib 2> NUL + +ECHO ------------------------------------------------------------ +ECHO Creating installer includes, deploy dependencies and git info +call genNsisIncludes.bat +call getdeploydependencies.bat +call extract_git_rev.bat > NUL +ECHO ------------------------------------------------------------ +SET XBMC_SETUPFILE=XBMCSetup-%GIT_REV%-%graphics%.exe +SET XBMC_PDBFILE=XBMCSetup-%GIT_REV%-%target%.pdb +ECHO Generating XBMC package installer: %XBMC_SETUPFILE%... + + +IF EXIST %XBMC_SETUPFILE% del %XBMC_SETUPFILE% > NUL +:: get path to makensis.exe from registry, first try tab delim +FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B + +IF NOT EXIST "%NSISExePath%" ( + :: try with space delim instead of tab + FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B +) - IF EXIST error.log del error.log > NUL - SET build_path=%CD% - ECHO ------------------------------------------------------------ - ECHO Building Confluence Skin... - cd ..\..\addons\skin.confluence - call build.bat > NUL - cd %build_path% - rem restore color and title, some scripts mess these up - COLOR 1B - TITLE XBMC for Windows Build Script - - IF EXIST exclude.txt del exclude.txt > NUL - del /s /q /f BUILD_WIN32\Xbmc\*.so > NUL - del /s /q /f BUILD_WIN32\Xbmc\*.h > NUL - del /s /q /f BUILD_WIN32\Xbmc\*.cpp > NUL - del /s /q /f BUILD_WIN32\Xbmc\*.exp > NUL - del /s /q /f BUILD_WIN32\Xbmc\*.lib > NUL - - ECHO ------------------------------------------------------------ - ECHO Build Succeeded! - GOTO NSIS_EXE +IF NOT EXIST "%NSISExePath%" ( + :: fails on localized windows (Default) becomes (Par D�faut) + FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B +) -:NSIS_EXE - ECHO ------------------------------------------------------------ - ECHO Generating installer includes... - call genNsisIncludes.bat - ECHO ------------------------------------------------------------ - call getdeploydependencies.bat - CALL extract_git_rev.bat > NUL - SET XBMC_SETUPFILE=XBMCSetup-%GIT_REV%-%target%.exe - SET XBMC_PDBFILE=XBMCSetup-%GIT_REV%-%target%.pdb - ECHO Creating installer %XBMC_SETUPFILE%... - IF EXIST %XBMC_SETUPFILE% del %XBMC_SETUPFILE% > NUL - rem get path to makensis.exe from registry, first try tab delim - FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B - - IF NOT EXIST "%NSISExePath%" ( - rem try with space delim instead of tab - FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B - ) - - IF NOT EXIST "%NSISExePath%" ( - rem fails on localized windows (Default) becomes (Par Défaut) - FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B - ) +IF NOT EXIST "%NSISExePath%" ( + FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B +) - IF NOT EXIST "%NSISExePath%" ( - FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B - ) - - rem proper x64 registry checks - IF NOT EXIST "%NSISExePath%" ( - ECHO using x64 registry entries - FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B - ) - IF NOT EXIST "%NSISExePath%" ( - rem try with space delim instead of tab - FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B - ) - IF NOT EXIST "%NSISExePath%" ( - rem on win 7 x64, the previous fails - FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B - ) - IF NOT EXIST "%NSISExePath%" ( - rem try with space delim instead of tab - FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B - ) +:: proper x64 registry checks +IF NOT EXIST "%NSISExePath%" ( + ECHO using x64 registry entries + FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B +) +IF NOT EXIST "%NSISExePath%" ( + :: try with space delim instead of tab + FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B +) +IF NOT EXIST "%NSISExePath%" ( + :: on win 7 x64, the previous fails + FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B +) +IF NOT EXIST "%NSISExePath%" ( + :: try with space delim instead of tab + FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B +) - SET NSISExe=%NSISExePath%\makensis.exe - "%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dxbmc_root="%CD%\BUILD_WIN32" /Dxbmc_revision="%GIT_REV%" /Dxbmc_target="%target%" "XBMC for Windows.nsi" - IF NOT EXIST "%XBMC_SETUPFILE%" ( +SET NSISExe=%NSISExePath%\makensis.exe +"%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dxbmc_root="%CD%\BUILD_WIN32" /Dxbmc_revision="%GIT_REV%" /Dxbmc_target="%graphics%" "XBMC for Windows.nsi" +IF NOT EXIST "%XBMC_SETUPFILE%" ( set DIETEXT=Failed to create %XBMC_SETUPFILE%. NSIS installed? goto DIE - ) - copy %PDB% %XBMC_PDBFILE% > nul - ECHO ------------------------------------------------------------ - ECHO Done! - ECHO Setup is located at %CD%\%XBMC_SETUPFILE% - ECHO ------------------------------------------------------------ - GOTO VIEWLOG_EXE +) + +:: pdb file needed by Jenkins +copy %XBMC_PDB% %XBMC_PDBFILE% > nul + +ECHO Done! +ECHO Setup is located at: %CD%\%XBMC_SETUPFILE% +ECHO ------------------------------------------------------------ +GOTO VIEWLOG_EXE :DIE ECHO ------------------------------------------------------------ @@ -303,26 +318,27 @@ IF %comp%==vs2010 ( ECHO ------------------------------------------------------------ :VIEWLOG_EXE - SET log="%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" - IF NOT EXIST %log% goto END - - copy %log% ./buildlog.html > NUL + SET log="%CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log" - IF %promptlevel%==noprompt ( - goto END - ) + IF EXIST %log% ( + echo "Log: %log%" - set /P XBMC_BUILD_ANSWER=View the build log in your HTML browser? [y/n] - if /I %XBMC_BUILD_ANSWER% NEQ y goto END - - SET log="%CD%\..\vs2010express\XBMC\%buildconfig%\objs\" XBMC.log - - start /D%log% - goto END + IF "%promptlevel%"=="prompt" ( + + set /P XBMC_BUILD_ANSWER=View the build log in your HTML browser? y/n? [n]: + if /I "%XBMC_BUILD_ANSWER%"=="y" ( + copy %log% buildlog.html > NUL + set log=buildlog.html + + start /D%log% + ) + ) + :END - IF %promptlevel% NEQ noprompt ( - ECHO Press any key to exit... - pause > NUL + IF "%promptlevel%"=="prompt" ( + ECHO Press any key to exit... + pause > NUL ) - EXIT /B %exitcode%
\ No newline at end of file + ENDLOCAL + EXIT /B %exitcode% diff --git a/project/Win32BuildSetup/buildmingwlibs.sh b/project/Win32BuildSetup/buildmingwlibs.sh index 6fdb9a521f..8043734f89 100644 --- a/project/Win32BuildSetup/buildmingwlibs.sh +++ b/project/Win32BuildSetup/buildmingwlibs.sh @@ -1,47 +1,62 @@ +# +# buildmingwlibs.sh (v1.1) - updated to support ffmpeg bump to 1.2 +# + +WIN32SETUP=/xbmc/project/Win32BuildSetup +ERRORFILE=$WIN32SETUP/errormingw +PROMPTFILE=$WIN32SETUP/noprompt +MAKECLEANFILE=$WIN32SETUP/makeclean +MINGWLIBSOK=$WIN32SETUP/mingwlibsok -ERRORFILE=/xbmc/project/Win32BuildSetup/errormingw -NOPFILE=/xbmc/project/Win32BuildSetup/noprompt -MAKECLEANFILE=/xbmc/project/Win32BuildSetup/makeclean TOUCH=/bin/touch RM=/bin/rm -NOPROMPT=0 +PROMPT=0 MAKECLEAN="" MAKEFLAGS="" +# +# Function declarations. (start) +# + function throwerror () { - $TOUCH $ERRORFILE - echo failed to compile $1 - if [ $NOPROMPT == 0 ]; then + echo failed to compile $FILEPATH/$1 | tee -a $ERRORFILE + + if [ $PROMPT == 1 ]; then read fi } -function setfilepath () -{ - FILEPATH=$1 -} - function checkfiles () { - for i in $@; do - FILE=$FILEPATH/$i - if [ ! -f $FILE ]; then - throwerror "$FILE" - exit 1 - fi + for FILE in $@ + do + if [ ! -f $FILE ]; then + rm -f $MINGWLIBSOK + throwerror "$FILE" + exit 1 + fi done } +# +# Function declarations. (end) +# + + + +# +# Main... +# # cleanup if [ -f $ERRORFILE ]; then $RM $ERRORFILE fi -# check for noprompt -if [ -f $NOPFILE ]; then - $RM $NOPFILE - NOPROMPT=1 +# check for prompt file +if [ -f $PROMPTFILE ]; then + $RM $PROMPTFILE + PROMPT=1 fi if [ -f $MAKECLEANFILE ]; then @@ -56,28 +71,43 @@ fi # compile our mingw dlls echo "################################" echo "## compiling mingw libs" -echo "## NOPROMPT = $NOPROMPT" +echo "## PROMPT = $PROMPT" echo "## MAKECLEAN = $MAKECLEAN" echo "################################" echo "##### building ffmpeg dlls #####" -cd /xbmc/lib/ffmpeg/ -sh ./build_xbmc_win32.sh $MAKECLEAN -setfilepath /xbmc/system/players/dvdplayer -checkfiles avcodec-53.dll avformat-53.dll avutil-51.dll postproc-52.dll swscale-2.dll avfilter-2.dll swresample-0.dll -echo "##### building of ffmpeg dlls done #####" +cd /xbmc/lib/ffmpeg +if sh ./build_xbmc_win32.sh $MAKECLEAN +then + echo "##### building of ffmpeg dlls done #####" +else + throwerror "building the ffmpeg dlls failed!" + exit 1 +fi + +cd /xbmc/system/players/dvdplayer + +LIBAVCODEC=$(set -- avcodec-[0-9]*.dll; echo $1) +LIBAVFORMAT=$(set -- avformat-[0-9]*.dll; echo $1) +LIBAVUTIL=$(set -- avutil-[0-9]*.dll; echo $1) +LIBAVFILTER=$(set -- avfilter-[0-9]*.dll; echo $1) +LIBPOSTPROC=$(set -- postproc-[0-9]*.dll; echo $1) +LIBSWSCALE=$(set -- swscale-[0-9]*.dll; echo $1) +LIBSWRESAMPLE=$(set -- swresample-[0-9]*.dll; echo $1) + +checkfiles $LIBAVCODEC $LIBAVFORMAT $LIBAVUTIL $LIBAVFILTER $LIBPOSTPROC $LIBSWSCALE $LIBSWRESAMPLE echo "##### building libdvd dlls #####" cd /xbmc/lib/libdvd/ sh ./build-xbmc-win32.sh $MAKECLEAN -setfilepath /xbmc/system/players/dvdplayer +cd /xbmc/system/players/dvdplayer checkfiles libdvdcss-2.dll libdvdnav.dll echo "##### building of libdvd dlls done #####" echo "##### building libmpeg2 dlls #####" cd /xbmc/lib/libmpeg2/ sh ./make-xbmc-lib-win32.sh $MAKECLEAN -setfilepath /xbmc/system/players/dvdplayer +cd /xbmc/system/players/dvdplayer checkfiles libmpeg2-0.dll echo "##### building of libmpeg2 dlls done #####" @@ -87,19 +117,21 @@ if [ "$MAKECLEAN" == "clean" ]; then make -f Makefile.win32 clean fi make -f Makefile.win32 $MAKEFLAGS -setfilepath /xbmc/system/players/paplayer +cd /xbmc/system/players/paplayer checkfiles timidity.dll echo "##### building of timidity dlls done #####" echo "##### building asap dlls #####" cd /xbmc/lib/asap/win32 sh ./build_xbmc_win32.sh $MAKECLEAN -setfilepath /xbmc/system/players/paplayer +cd /xbmc/system/players/paplayer checkfiles xbmc_asap.dll echo "##### building of asap dlls done #####" +touch $MINGWLIBSOK + # wait for key press -if [ $NOPROMPT == 0 ]; then +if [ $PROMPT == 1 ]; then echo press a key to close the window read fi |