aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorwsoltys <wiso@no.way>2013-04-13 12:40:02 +0200
committerwsoltys <wiso@no.way>2013-04-13 12:40:02 +0200
commitda73f7a88b26c6f78222ae3aade656fb5cb15679 (patch)
treec541fa83139f9215a6c71d7fb67b3ae2694d9fb5 /project
parente5a5c848e48daf1fd938353eda0b4e2b4c96cebd (diff)
[WIN32] fixed build setup by reverting to the old scripts.
Diffstat (limited to 'project')
-rw-r--r--project/Win32BuildSetup/BuildSetup.bat569
-rw-r--r--project/Win32BuildSetup/buildmingwlibs.sh98
2 files changed, 308 insertions, 359 deletions
diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat
index b444b8179e..c502d88ce0 100644
--- a/project/Win32BuildSetup/BuildSetup.bat
+++ b/project/Win32BuildSetup/BuildSetup.bat
@@ -1,314 +1,296 @@
@ECHO OFF
-@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
-
-
+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
CLS
COLOR 1B
TITLE XBMC for Windows Build Script
-
-::
-:: Set default options
-::
-
+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 comp=vs2010
-SET graphics=dx
-SET buildmode=noclean
-SET promptlevel=errprompt
+SET target=dx
+SET buildmode=ask
+SET promptlevel=prompt
SET buildmingwlibs=true
SET exitcode=0
SET useshell=rxvt
-
-::
-:: Check command line options
-::
-FOR %%b in (%*) DO (
+FOR %%b in (%1, %2, %3, %4, %5) DO (
IF %%b==vs2010 SET comp=vs2010
- IF %%b==dx SET videmode=dx
- IF %%b==gl echo "%0%: option gl currently not supported"
+ IF %%b==dx SET target=dx
+ IF %%b==gl SET target=gl
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
)
-::
-:: 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
-::
+SET buildconfig=Release (DirectX)
+IF %target%==gl SET buildconfig=Release (OpenGL)
IF %comp%==vs2010 (
IF "%VS100COMNTOOLS%"=="" (
- 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
-)
-
-::
-:: 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
+ 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"
)
)
-
-::
-:: 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
-
- rem only use sh to please jenkins
- IF %useshell%==sh (
- call buildmingwlibs.bat sh
- ) ELSE (
- call buildmingwlibs.bat
+ IF NOT EXIST %NET% (
+ set DIETEXT=Visual Studio .NET 2010 Express was not found.
+ goto DIE
)
-
- IF NOT EXIST mingwlibsok (
- set DIETEXT="failed to build mingw libs"
- 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
- IF EXIST errormingw (
- set DIETEXT="failed to build mingw libs"
+: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"
+ )
goto DIE
)
-)
-
-::
-:: 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"
+ 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\%RELEASE%\objs\XBMC.log"
+ type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
)
- 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%
+ 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
+ )
+ 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
+ )
+ )
-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
-)
+ 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
+
+ ECHO ------------------------------------------------------------
+ call buildpvraddons.bat %NET%
-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
-)
+ 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%" (
- 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
+ )
-:: 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
-)
+ 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
+ )
-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 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 DIETEXT=Failed to create %XBMC_SETUPFILE%. NSIS installed?
goto DIE
-)
-
-:: 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
+ )
+ copy %PDB% %XBMC_PDBFILE% > nul
+ ECHO ------------------------------------------------------------
+ ECHO Done!
+ ECHO Setup is located at %CD%\%XBMC_SETUPFILE%
+ ECHO ------------------------------------------------------------
+ GOTO VIEWLOG_EXE
:DIE
ECHO ------------------------------------------------------------
@@ -321,27 +303,26 @@ GOTO VIEWLOG_EXE
ECHO ------------------------------------------------------------
:VIEWLOG_EXE
- SET log="%CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log"
-
- IF EXIST %log% (
- echo "Log: %log%"
-
- 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
+ SET log="%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+ IF NOT EXIST %log% goto END
+
+ copy %log% ./buildlog.html > NUL
- start /D%log%
- )
+ IF %promptlevel%==noprompt (
+ goto END
)
-
+
+ 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
:END
- IF "%promptlevel%"=="prompt" (
- ECHO Press any key to exit...
- pause > NUL
+ IF %promptlevel% NEQ noprompt (
+ ECHO Press any key to exit...
+ pause > NUL
)
- ENDLOCAL
EXIT /B %exitcode%
diff --git a/project/Win32BuildSetup/buildmingwlibs.sh b/project/Win32BuildSetup/buildmingwlibs.sh
index 8043734f89..41b740d9b7 100644
--- a/project/Win32BuildSetup/buildmingwlibs.sh
+++ b/project/Win32BuildSetup/buildmingwlibs.sh
@@ -1,62 +1,47 @@
-#
-# 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
-PROMPT=0
+NOPROMPT=0
MAKECLEAN=""
MAKEFLAGS=""
-#
-# Function declarations. (start)
-#
-
function throwerror ()
{
- echo failed to compile $FILEPATH/$1 | tee -a $ERRORFILE
-
- if [ $PROMPT == 1 ]; then
+ $TOUCH $ERRORFILE
+ echo failed to compile $1
+ if [ $NOPROMPT == 0 ]; then
read
fi
}
+function setfilepath ()
+{
+ FILEPATH=$1
+}
+
function checkfiles ()
{
- for FILE in $@
- do
- if [ ! -f $FILE ]; then
- rm -f $MINGWLIBSOK
- throwerror "$FILE"
- exit 1
- fi
+ for i in $@; do
+ FILE=$FILEPATH/$i
+ if [ ! -f $FILE ]; then
+ throwerror "$FILE"
+ exit 1
+ fi
done
}
-#
-# Function declarations. (end)
-#
-
-
-
-#
-# Main...
-#
# cleanup
if [ -f $ERRORFILE ]; then
$RM $ERRORFILE
fi
-# check for prompt file
-if [ -f $PROMPTFILE ]; then
- $RM $PROMPTFILE
- PROMPT=1
+# check for noprompt
+if [ -f $NOPFILE ]; then
+ $RM $NOPFILE
+ NOPROMPT=1
fi
if [ -f $MAKECLEANFILE ]; then
@@ -71,43 +56,28 @@ fi
# compile our mingw dlls
echo "################################"
echo "## compiling mingw libs"
-echo "## PROMPT = $PROMPT"
+echo "## NOPROMPT = $NOPROMPT"
echo "## MAKECLEAN = $MAKECLEAN"
echo "################################"
echo "##### building ffmpeg dlls #####"
-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
+cd /xbmc/lib/ffmpeg/
+sh ./build_xbmc_win32.sh $MAKECLEAN
+setfilepath /xbmc/system/players/dvdplayer
+checkfiles avcodec-54.dll avformat-54.dll avutil-52.dll postproc-52.dll swscale-2.dll avfilter-3.dll swresample-0.dll
+echo "##### building of ffmpeg dlls done #####"
echo "##### building libdvd dlls #####"
cd /xbmc/lib/libdvd/
sh ./build-xbmc-win32.sh $MAKECLEAN
-cd /xbmc/system/players/dvdplayer
+setfilepath /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
-cd /xbmc/system/players/dvdplayer
+setfilepath /xbmc/system/players/dvdplayer
checkfiles libmpeg2-0.dll
echo "##### building of libmpeg2 dlls done #####"
@@ -117,21 +87,19 @@ if [ "$MAKECLEAN" == "clean" ]; then
make -f Makefile.win32 clean
fi
make -f Makefile.win32 $MAKEFLAGS
-cd /xbmc/system/players/paplayer
+setfilepath /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
-cd /xbmc/system/players/paplayer
+setfilepath /xbmc/system/players/paplayer
checkfiles xbmc_asap.dll
echo "##### building of asap dlls done #####"
-touch $MINGWLIBSOK
-
# wait for key press
-if [ $PROMPT == 1 ]; then
+if [ $NOPROMPT == 0 ]; then
echo press a key to close the window
read
fi