From d0fab82fb368b92270432ddb990cffa9d6e10bbc Mon Sep 17 00:00:00 2001 From: Waldi Ravens Date: Mon, 26 Oct 2015 05:11:50 +0200 Subject: [PATCH] Added UpdateResourceScript tool to build_helpers.bat --- build_helpers.bat | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/build_helpers.bat b/build_helpers.bat index 2847061ce..12c9a4651 100644 --- a/build_helpers.bat +++ b/build_helpers.bat @@ -3,6 +3,7 @@ SETLOCAL PUSHD %~dp0 SET "ConfigurationName=%~2" +IF /I "%~1" == "rsrc" GOTO UpdateResourceScript IF /I "%~1" == "lang" GOTO UpdateLanguageFiles IF /I "%~1" == "rev" GOTO UpdateAssemblyInfo @@ -12,13 +13,29 @@ ENDLOCAL EXIT /B -:UpdateLanguageFiles -IF NOT EXIST "src\UpdateLanguageFiles\bin\%ConfigurationName%\UpdateLanguageFiles.exe" ( +:UpdateResourceScript +SET "ToolPath=src\UpdateResourceScript\bin\%ConfigurationName%\UpdateResourceScript.exe" +IF NOT EXIST "%ToolPath%" ( ECHO Compile Subtitle Edit first! GOTO END ) -"src\UpdateLanguageFiles\bin\%ConfigurationName%\UpdateLanguageFiles.exe" "LanguageMaster.xml" "libse\LanguageDeserializer.cs" +"%ToolPath%" "src\Win32Resources\Resources.rc.template" "src\bin\%ConfigurationName%\SubtitleEdit.exe" + +IF %ERRORLEVEL% NEQ 0 ( + ECHO ERROR: Something went wrong when generating the resource script... +) +GOTO END + + +:UpdateLanguageFiles +SET "ToolPath=src\UpdateLanguageFiles\bin\%ConfigurationName%\UpdateLanguageFiles.exe" +IF NOT EXIST "%ToolPath%" ( + ECHO Compile Subtitle Edit first! + GOTO END +) + +"%ToolPath%" "LanguageMaster.xml" "libse\LanguageDeserializer.cs" IF %ERRORLEVEL% NEQ 0 ( ECHO ERROR: Something went wrong when generating the language files... @@ -27,12 +44,13 @@ GOTO END :UpdateAssemblyInfo -IF NOT EXIST "src\UpdateAssemblyInfo\bin\%ConfigurationName%\UpdateAssemblyInfo.exe" ( +SET "ToolPath=src\UpdateAssemblyInfo\bin\%ConfigurationName%\UpdateAssemblyInfo.exe" +IF NOT EXIST "%ToolPath%" ( ECHO Compile Subtitle Edit first! GOTO END ) -"src\UpdateAssemblyInfo\bin\%ConfigurationName%\UpdateAssemblyInfo.exe" "src\Properties\AssemblyInfo.cs.template" "libse\Properties\AssemblyInfo.cs.template" +"%ToolPath%" "src\Properties\AssemblyInfo.cs.template" "libse\Properties\AssemblyInfo.cs.template" IF %ERRORLEVEL% NEQ 0 ( ECHO ERROR: Something went wrong when generating the revision number...