Skip to content

Commit

Permalink
fixes/changes for the DeployToolUnpacker install- and prebuild-script…
Browse files Browse the repository at this point in the history
… - requested by chemelli
  • Loading branch information
chefkoch committed May 14, 2010
1 parent fbdf880 commit 56df788
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 29 deletions.
43 changes: 28 additions & 15 deletions Tools/InstallationScripts/DeployToolUnPacker.nsi
Expand Up @@ -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
#---------------------------------------------------------------------------
Expand All @@ -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
#---------------------------------------------------------------------------
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tools/InstallationScripts/include-MP-PreBuild.bat
Expand Up @@ -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
23 changes: 10 additions & 13 deletions Tools/InstallationScripts/include-MP-PreBuild.nsh
Expand Up @@ -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
Expand Down

0 comments on commit 56df788

Please sign in to comment.