forked from SubtitleEdit/subtitleedit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_helpers.bat
43 lines (33 loc) · 966 Bytes
/
build_helpers.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@ECHO OFF
SETLOCAL
PUSHD %~dp0
SET "ConfigurationName=%~2"
ECHO %cd%
IF /I "%~1" == "lang" GOTO UpdateLanguageFiles
IF /I "%~1" == "rev" GOTO UpdateAssemblyInfo
:END
POPD
ENDLOCAL
EXIT /B
:UpdateLanguageFiles
SET "ToolPath=src\UpdateLanguageFiles\bin\%ConfigurationName%\UpdateLanguageFiles.exe"
IF NOT EXIST "%ToolPath%" (
ECHO Compile Subtitle Edit first!
GOTO END
)
"%ToolPath%" "LanguageBaseEnglish.xml" "src\ui\Logic\LanguageDeserializer.cs"
IF %ERRORLEVEL% NEQ 0 (
ECHO ERROR: Something went wrong when generating the language files...
)
GOTO END
:UpdateAssemblyInfo
SET "ToolPath=src\UpdateAssemblyInfo\bin\%ConfigurationName%\UpdateAssemblyInfo.exe"
IF NOT EXIST "%ToolPath%" (
ECHO Compile Subtitle Edit first!
GOTO END
)
"%ToolPath%" "src\ui\Properties\AssemblyInfo.cs.template" "src\libse\Properties\AssemblyInfo.cs.template"
IF %ERRORLEVEL% NEQ 0 (
ECHO ERROR: Something went wrong when generating the revision number...
)
GOTO END