From 56df788a4b511800b95a5f85af0da47af92474f0 Mon Sep 17 00:00:00 2001 From: chefkoch Date: Fri, 14 May 2010 23:33:18 +0000 Subject: [PATCH] fixes/changes for the DeployToolUnpacker install- and prebuild-script - requested by chemelli --- .../DeployToolUnPacker.nsi | 43 ++++++++++++------- .../include-MP-PreBuild.bat | 2 +- .../include-MP-PreBuild.nsh | 23 +++++----- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/Tools/InstallationScripts/DeployToolUnPacker.nsi b/Tools/InstallationScripts/DeployToolUnPacker.nsi index fd8fa48efb5..dfbf43d20b3 100644 --- a/Tools/InstallationScripts/DeployToolUnPacker.nsi +++ b/Tools/InstallationScripts/DeployToolUnPacker.nsi @@ -39,17 +39,6 @@ Name "MediaPortal Unpacker" !define svn_DeployVersionSVN "${svn_ROOT}\Tools\Script & Batch tools\DeployVersionSVN" -#--------------------------------------------------------------------------- -# BUILD sources -#--------------------------------------------------------------------------- -; comment one of the following lines to disable the preBuild -!define BUILD_MediaPortal -!define BUILD_TVServer -!define BUILD_DeployTool -!define BUILD_Installer - -!include "include-MP-PreBuild.nsh" - #--------------------------------------------------------------------------- # UNPACKER script #--------------------------------------------------------------------------- @@ -60,15 +49,35 @@ Name "MediaPortal Unpacker" !define VER_MAJOR 1 !define VER_MINOR 0 !define VER_REVISION 7 -!ifdef VER_BUILD +!ifdef VER_BUILD ; means !build_release was used !undef VER_BUILD + + !system 'include-MP-PreBuild.bat' + !include "version.txt" + !delfile "version.txt" + !if ${VER_BUILD} == 0 + !warning "It seems there was an error, reading the svn revision. 0 will be used." + !endif +!else + !define VER_BUILD 0 !endif -!define VER_BUILD 0 -;!define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}" ;this is for display purposes !define VERSION "1.1.0 RC3" + +#--------------------------------------------------------------------------- +# BUILD sources +#--------------------------------------------------------------------------- +; comment one of the following lines to disable the preBuild +!define BUILD_MediaPortal +!define BUILD_TVServer +!define BUILD_DeployTool +!define BUILD_Installer + +!include "include-MP-PreBuild.nsh" + + #--------------------------------------------------------------------------- # INCLUDE FILES #--------------------------------------------------------------------------- @@ -82,7 +91,11 @@ Name "MediaPortal Unpacker" #--------------------------------------------------------------------------- Icon "${svn_DeployTool}\Install.ico" !define /date buildTIMESTAMP "%Y-%m-%d-%H-%M" -OutFile "MediaPortalSetup_1.1.0_SVN${SVN_REVISION}_${buildTIMESTAMP}.exe" +!if ${VER_BUILD} == 0 + OutFile "MediaPortalSetup_${VERSION}_${buildTIMESTAMP}.exe" +!else + OutFile "MediaPortalSetup_${VERSION}_SVN${VER_BUILD}_${buildTIMESTAMP}.exe" +!endif InstallDir "$TEMP\MediaPortal Installation" CRCCheck on diff --git a/Tools/InstallationScripts/include-MP-PreBuild.bat b/Tools/InstallationScripts/include-MP-PreBuild.bat index a348c3fe3df..f61e7e78575 100644 --- a/Tools/InstallationScripts/include-MP-PreBuild.bat +++ b/Tools/InstallationScripts/include-MP-PreBuild.bat @@ -7,4 +7,4 @@ rem is not able to write the exit code (%errorlevel%) to a variable. rem It is only available to compare the exit code. "..\Script & Batch tools\DeployVersionSVN\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /GetVersion /svn=%cd% -echo !define SVN_REVISION %errorlevel% > version.txt +echo !define VER_BUILD %errorlevel% > version.txt diff --git a/Tools/InstallationScripts/include-MP-PreBuild.nsh b/Tools/InstallationScripts/include-MP-PreBuild.nsh index 638c9f763f1..4703fc6c373 100644 --- a/Tools/InstallationScripts/include-MP-PreBuild.nsh +++ b/Tools/InstallationScripts/include-MP-PreBuild.nsh @@ -33,30 +33,27 @@ ;!define BUILD_DeployTool ;!define BUILD_Installer -# GetVersion by exeuting DeployVersionSVN.exe /GetVersion -;!system '"$%ProgramFiles%\TortoiseSVN\bin\SubWCRev.exe" "${svn_ROOT}" RevisionInfoTemplate.nsh version.txt' = 0 -!system 'include-MP-PreBuild.bat' -;!define SVN_REVISION "$WCREV$" ; that's the string in version txt, after SubWCRev has been launched -!include "version.txt" -!delfile "version.txt" -!if ${SVN_REVISION} == 0 - !warning "It seems there was an error, reading the svn revision. 0 will be used." -!endif +!if ${VER_BUILD} != 0 +!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_MP}"' = 0 +!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_TVServer}"' = 0 !system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_ROOT}\Common-MP-TVE3"' = 0 +!endif + !ifdef BUILD_MediaPortal -!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_MP}"' = 0 !system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;Platform=x86 "${svn_MP}\MediaPortal.sln"' = 0 -!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_MP}" /revert' = 0 !endif !ifdef BUILD_TVServer -!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_TVServer}"' = 0 !system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;Platform=x86 "${svn_TVServer}\TvLibrary.sln"' = 0 !system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;Platform=x86 "${svn_TVServer}\TvPlugin\TvPlugin.sln"' = 0 -!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_TVServer}" /revert' = 0 !endif + +!if ${VER_BUILD} != 0 +!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_MP}" /revert' = 0 +!system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_TVServer}" /revert' = 0 !system '"${svn_DeployVersionSVN}\DeployVersionSVN\bin\Release\DeployVersionSVN.exe" /svn="${svn_ROOT}\Common-MP-TVE3" /revert' = 0 +!endif !ifdef BUILD_DeployTool !system '"$%WINDIR%\Microsoft.NET\Framework\v3.5\MSBUILD.exe" /p:ALToolPath="${ALToolPath}" /target:Rebuild /property:Configuration=Release;Platform=x86 "${svn_DeployTool}\MediaPortal.DeployTool.sln"' = 0