mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
Added UpdateResourceScript tool to build_helpers.bat
This commit is contained in:
parent
18f313c37b
commit
d0fab82fb3
@ -3,6 +3,7 @@ SETLOCAL
|
|||||||
PUSHD %~dp0
|
PUSHD %~dp0
|
||||||
SET "ConfigurationName=%~2"
|
SET "ConfigurationName=%~2"
|
||||||
|
|
||||||
|
IF /I "%~1" == "rsrc" GOTO UpdateResourceScript
|
||||||
IF /I "%~1" == "lang" GOTO UpdateLanguageFiles
|
IF /I "%~1" == "lang" GOTO UpdateLanguageFiles
|
||||||
IF /I "%~1" == "rev" GOTO UpdateAssemblyInfo
|
IF /I "%~1" == "rev" GOTO UpdateAssemblyInfo
|
||||||
|
|
||||||
@ -12,13 +13,29 @@ ENDLOCAL
|
|||||||
EXIT /B
|
EXIT /B
|
||||||
|
|
||||||
|
|
||||||
:UpdateLanguageFiles
|
:UpdateResourceScript
|
||||||
IF NOT EXIST "src\UpdateLanguageFiles\bin\%ConfigurationName%\UpdateLanguageFiles.exe" (
|
SET "ToolPath=src\UpdateResourceScript\bin\%ConfigurationName%\UpdateResourceScript.exe"
|
||||||
|
IF NOT EXIST "%ToolPath%" (
|
||||||
ECHO Compile Subtitle Edit first!
|
ECHO Compile Subtitle Edit first!
|
||||||
GOTO END
|
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 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
ECHO ERROR: Something went wrong when generating the language files...
|
ECHO ERROR: Something went wrong when generating the language files...
|
||||||
@ -27,12 +44,13 @@ GOTO END
|
|||||||
|
|
||||||
|
|
||||||
:UpdateAssemblyInfo
|
: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!
|
ECHO Compile Subtitle Edit first!
|
||||||
GOTO END
|
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 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
ECHO ERROR: Something went wrong when generating the revision number...
|
ECHO ERROR: Something went wrong when generating the revision number...
|
||||||
|
Loading…
Reference in New Issue
Block a user