Permalink
Browse files

Updated build scripts to match the structural changes that have been …

…done to native components
  • Loading branch information...
1 parent e6c8c3a commit 35635e27fcea70f82abf1d4f65e9e81c1cb8b834 @tourettes tourettes committed Jan 16, 2013
View
@@ -15,7 +15,6 @@ set progpath=%ProgramFiles%
if not "%ProgramFiles(x86)%".=="". set progpath=%ProgramFiles(x86)%
REM Select Visual Studio version
-set vsver=10.0
REM set other MP related paths
set GIT_ROOT=..
@@ -43,7 +42,5 @@ echo. >> %log%
echo. >> %log%
echo Using following environment variables: >> %log%
-echo DSHOW_BASE = %DSHOW_BASE% >> %log%
echo DXSDK_DIR = %DXSDK_DIR% >> %log%
-echo WINDOWS_SDK = %WINDOWS_SDK% >> %log%
echo. >> %log%
@@ -10,9 +10,13 @@ echo Writing GIT revision assemblies...
rem %DeployVersionGIT% /git="%GIT_ROOT%" /path="%MediaPortal%" >> %log%
%DeployVersionGIT% /git="%GIT_ROOT%" /path="%CommonMPTV%" >> %log%
+echo.
+echo Building native components...
+call VS_Rebuild_Debug_DirectShowFilters.bat
+
echo.
echo Building MediaPortal...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%MediaPortal%\MediaPortal.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%MediaPortal%\MediaPortal.sln" >> %log%
echo.
echo Reverting assemblies...
@@ -10,9 +10,13 @@ echo Writing GIT revision assemblies...
rem %DeployVersionGIT% /git="%GIT_ROOT%" /path="%MediaPortal%" >> %log%
%DeployVersionGIT% /git="%GIT_ROOT%" /path="%CommonMPTV%" >> %log%
+echo.
+echo Building native components...
+call VS_Rebuild_Release_DirectShowFilters.bat
+
echo.
echo Building MediaPortal...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%MediaPortal%\MediaPortal.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%MediaPortal%\MediaPortal.sln" >> %log%
echo.
echo Reverting assemblies...
@@ -44,10 +48,10 @@ rem %DeployVersionGIT% /git="%GIT_ROOT%" /path="%TVLibrary%" >> %log%
echo.
echo Building TV Server...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvLibrary.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvLibrary.sln" >> %log%
echo.
echo Building TV Client plugin...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvPlugin\TvPlugin.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvPlugin\TvPlugin.sln" >> %log%
echo.
echo Reverting assemblies...
@@ -12,7 +12,7 @@ rem %DeployVersionGIT% /git="%GIT_ROOT%" /path="%MediaPortal%" >> %log%
echo.
echo Building MediaPortal...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%MediaPortal%\MediaPortal.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%MediaPortal%\MediaPortal.sln" >> %log%
echo.
echo Reverting assemblies...
@@ -12,10 +12,10 @@ rem %DeployVersionGIT% /git="%GIT_ROOT%" /path="%TVLibrary%" >> %log%
echo.
echo Building TV Server...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvLibrary.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvLibrary.sln" >> %log%
echo.
echo Building TV Client plugin...
-"%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvPlugin\TvPlugin.sln" >> %log%
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=%BUILD_TYPE%;Platform=x86 "%TVLibrary%\TvPlugin\TvPlugin.sln" >> %log%
echo.
echo Reverting assemblies...
@@ -0,0 +1,3 @@
+@echo off
+
+call "VS_build_DirectShowFilters.bat" debug build
@@ -0,0 +1,3 @@
+@echo off
+
+call "VS_build_DirectShowFilters.bat" release build
@@ -1,3 +0,0 @@
-@ECHO OFF
-
-call "VS_Rebuild_Release_AudioRenderer.bat" Debug
@@ -1,3 +0,0 @@
-@echo off
-
-call "VS_Rebuild_Release_Corecpp.bat" Debug
@@ -1,3 +1,3 @@
@echo off
-call "VS_Rebuild_Release_DirectShowFilters.bat" Debug
+call "VS_build_DirectShowFilters.bat" debug rebuild
@@ -1,3 +0,0 @@
-@echo off
-
-call "VS_Rebuild_Release_MPC_HC_subs.bat" Debug
@@ -1,3 +0,0 @@
-@echo off
-
-call "VS_Rebuild_Release_Win7RefreshRateHelper.bat" Debug
@@ -1,10 +0,0 @@
-@ECHO OFF
-
-rem build init
-set project=AudioRenderer
-call BuildInit.bat %1
-
-rem build
-echo.
-echo Building MPAudioRenderer...
-"%progpath%\Microsoft Visual Studio %vsver%\Common7\IDE\devenv.com" "..\DirectShowFilters\MPAudioRenderer\AudioRenderer.sln" /ReBuild "%BUILD_TYPE% unicode" >> %log%
@@ -1,10 +0,0 @@
-@ECHO OFF
-
-rem build init
-set project=Corecpp
-call BuildInit.bat %1
-
-rem build
-echo.
-echo Building %project%
-"%progpath%\Microsoft Visual Studio %vsver%\Common7\IDE\devenv.com" "..\mediaportal\Core.cpp\Core.cpp.sln" /Rebuild "%BUILD_TYPE%" >> %log%
@@ -1,10 +1,3 @@
-@ECHO OFF
+@echo off
-rem build init
-set project=DirectShowFilters
-call BuildInit.bat %1
-
-rem build
-echo.
-echo Building %project%
-"%progpath%\Microsoft Visual Studio %vsver%\Common7\IDE\devenv.com" "..\DirectShowFilters\Filters.sln" /Rebuild "%BUILD_TYPE%" >> %log%
+call "VS_build_DirectShowFilters.bat" release rebuild
@@ -1,10 +0,0 @@
-@ECHO OFF
-
-rem build init
-set project=MPC_HC_subs
-call BuildInit.bat %1
-
-rem build
-echo.
-echo Building %project%
-"%progpath%\Microsoft Visual Studio %vsver%\Common7\IDE\devenv.com" "..\mediaportal\Core.cpp\mpc-hc_subs.sln" /Rebuild "%BUILD_TYPE%" >> %log%
@@ -1,10 +0,0 @@
-@ECHO OFF
-
-rem build init
-set project=Win7RefreshRateHelper
-call BuildInit.bat %1
-
-rem build
-echo.
-echo Building %project%
-"%progpath%\Microsoft Visual Studio %vsver%\Common7\IDE\devenv.com" "..\mediaportal\Core.cpp\Win7RefreshRateHelper\Win7RefreshRateHelper.sln" /Rebuild "%BUILD_TYPE%" >> %log%
@@ -0,0 +1,42 @@
+@ECHO OFF
+REM check parameters
+
+if /I not %1==debug if /I not %1==rebuild if /I not %1==release if /I not %1==build goto ERROR_IN_PARAMETERS
+if /I not %2==debug if /I not %2==rebuild if /I not %2==release if /I not %2==build goto ERROR_IN_PARAMETERS
+
+set BUILD_TYPE=Release
+set BUILD_MODE=build
+
+if %1==debug set BUILD_TYPE=Debug
+if %2==debug set BUILD_TYPE=Debug
+
+if %1==rebuild set BUILD_MODE=rebuild
+if %2==rebuild set BUILD_MODE=rebuild
+
+if not [%3]==[] set PRJ=/project %3
+
+REM build init
+set project=DirectShowFilters
+call BuildInit.bat %BUILD_TYPE%
+
+REM build
+echo.
+echo Building %project%
+
+if not [%3]==[] goto BUILD_PRJ
+goto BUILD rem full build
+
+:BUILD_PRJ
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /target:%BUILD_MODE% /property:Configuration=%BUILD_TYPE% "..\DirectShowFilters\Filters.sln" %PRJ% >> %log%
+goto DONE
+
+:BUILD
+"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /target:%BUILD_MODE% /property:Configuration=%BUILD_TYPE% "..\DirectShowFilters\Filters.sln" >> %log%
+goto DONE
+
+:ERROR_IN_PARAMETERS
+echo.
+echo "Error in given parameters. Valid options [build|rebuild] [release|debug] and optional [project name]. For example to rebuild release mode binaries use 'rebuild release' or to build only TsReader in debug mode 'build debug TsReader'"
+echo.
+
+:DONE
@@ -41,12 +41,13 @@
!endif
!ifdef BUILD_MediaPortal
-!system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_MP}\MediaPortal.sln"' = 0
+!system '"$%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /target:rebuild /property:Configuration=Release ${git_DirectShowFilters}\Filters.sln' = 0
+!system '"$%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_MP}\MediaPortal.sln"' = 0
!endif
!ifdef BUILD_TVServer
-!system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_TVServer}\TvLibrary.sln"' = 0
-!system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_TVServer}\TvPlugin\TvPlugin.sln"' = 0
+!system '"$%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_TVServer}\TvLibrary.sln"' = 0
+!system '"$%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_TVServer}\TvPlugin\TvPlugin.sln"' = 0
!endif
!if ${VER_BUILD} != 0
@@ -56,7 +57,7 @@
!endif
!ifdef BUILD_DeployTool
-!system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /p:ALToolPath="${ALToolPath}" /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_DeployTool}\MediaPortal.DeployTool.sln"' = 0
+!system '"$%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /tv:3.5 /p:TargetFrameworkVersion=v3.5 /p:ALToolPath="${ALToolPath}" /target:Rebuild /property:Configuration=Release;Platform=x86 "${git_DeployTool}\MediaPortal.DeployTool.sln"' = 0
!endif
!ifdef BUILD_Installer
Oops, something went wrong.

0 comments on commit 35635e2

Please sign in to comment.