2014-09-11 07:08:05 +02:00
|
|
|
@ECHO OFF
|
|
|
|
SETLOCAL
|
|
|
|
PUSHD %~dp0
|
2015-08-29 08:46:26 +02:00
|
|
|
SET "ConfigurationName=%~2"
|
2014-09-11 07:08:05 +02:00
|
|
|
|
2020-11-19 22:14:25 +01:00
|
|
|
ECHO %cd%
|
|
|
|
|
2015-10-26 04:11:50 +01:00
|
|
|
IF /I "%~1" == "rsrc" GOTO UpdateResourceScript
|
2014-09-11 07:08:05 +02:00
|
|
|
IF /I "%~1" == "lang" GOTO UpdateLanguageFiles
|
|
|
|
IF /I "%~1" == "rev" GOTO UpdateAssemblyInfo
|
|
|
|
|
|
|
|
:END
|
|
|
|
POPD
|
|
|
|
ENDLOCAL
|
|
|
|
EXIT /B
|
|
|
|
|
|
|
|
|
2015-10-26 04:11:50 +01:00
|
|
|
:UpdateResourceScript
|
|
|
|
SET "ToolPath=src\UpdateResourceScript\bin\%ConfigurationName%\UpdateResourceScript.exe"
|
|
|
|
IF NOT EXIST "%ToolPath%" (
|
2020-11-19 22:10:59 +01:00
|
|
|
ECHO Compile Subtitle Edit first!
|
2015-10-26 04:11:50 +01:00
|
|
|
GOTO END
|
|
|
|
)
|
|
|
|
|
2020-11-19 20:53:49 +01:00
|
|
|
"%ToolPath%" "src\Win32Resources\Resources.rc.template" "src\ui\bin\%ConfigurationName%\SubtitleEdit.exe"
|
2015-10-26 04:11:50 +01:00
|
|
|
|
|
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
|
|
ECHO ERROR: Something went wrong when generating the resource script...
|
|
|
|
)
|
|
|
|
GOTO END
|
|
|
|
|
2020-11-19 22:10:59 +01:00
|
|
|
|
2014-09-11 07:08:05 +02:00
|
|
|
:UpdateLanguageFiles
|
2015-10-26 04:11:50 +01:00
|
|
|
SET "ToolPath=src\UpdateLanguageFiles\bin\%ConfigurationName%\UpdateLanguageFiles.exe"
|
|
|
|
IF NOT EXIST "%ToolPath%" (
|
2020-11-19 22:10:59 +01:00
|
|
|
ECHO Compile Subtitle Edit first!
|
2014-09-11 07:08:05 +02:00
|
|
|
GOTO END
|
|
|
|
)
|
|
|
|
|
2021-08-10 20:38:09 +02:00
|
|
|
"%ToolPath%" "LanguageMaster.xml" "src\ui\Logic\LanguageDeserializer.cs"
|
2014-09-11 07:08:05 +02:00
|
|
|
|
|
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
|
|
ECHO ERROR: Something went wrong when generating the language files...
|
|
|
|
)
|
|
|
|
GOTO END
|
|
|
|
|
|
|
|
|
|
|
|
:UpdateAssemblyInfo
|
2015-10-26 04:11:50 +01:00
|
|
|
SET "ToolPath=src\UpdateAssemblyInfo\bin\%ConfigurationName%\UpdateAssemblyInfo.exe"
|
|
|
|
IF NOT EXIST "%ToolPath%" (
|
2020-11-19 22:10:59 +01:00
|
|
|
ECHO Compile Subtitle Edit first!
|
2014-09-11 07:08:05 +02:00
|
|
|
GOTO END
|
|
|
|
)
|
|
|
|
|
2020-11-19 22:28:23 +01:00
|
|
|
"%ToolPath%" "src\ui\Properties\AssemblyInfo.cs.template" "src\libse\Properties\AssemblyInfo.cs.template"
|
2014-09-11 07:08:05 +02:00
|
|
|
|
|
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
|
|
ECHO ERROR: Something went wrong when generating the revision number...
|
|
|
|
)
|
2015-08-29 08:46:26 +02:00
|
|
|
GOTO END
|