mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Combine batch files.
This commit is contained in:
parent
addc5f7151
commit
8a53343d1d
49
build_helpers.bat
Normal file
49
build_helpers.bat
Normal file
@ -0,0 +1,49 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
|
||||
PUSHD %~dp0
|
||||
|
||||
IF /I "%~1" == "lang" GOTO UpdateLanguageFiles
|
||||
IF /I "%~1" == "rev" GOTO UpdateAssemblyInfo
|
||||
|
||||
|
||||
:END
|
||||
POPD
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
|
||||
:UpdateLanguageFiles
|
||||
IF NOT EXIST "src\UpdateLanguageFiles\bin\Release\UpdateLanguageFiles.exe" IF NOT EXIST "src\UpdateLanguageFiles\bin\Debug\UpdateLanguageFiles.exe" (
|
||||
ECHO Compile Subtitle Edit first!
|
||||
GOTO END
|
||||
)
|
||||
|
||||
IF EXIST "src\UpdateLanguageFiles\bin\Release\UpdateLanguageFiles.exe" (
|
||||
"src\UpdateLanguageFiles\bin\Release\UpdateLanguageFiles.exe" "LanguageMaster.xml" "src\Logic\LanguageDeserializer.cs"
|
||||
) ELSE (
|
||||
"src\UpdateLanguageFiles\bin\Debug\UpdateLanguageFiles.exe" "LanguageMaster.xml" "src\Logic\LanguageDeserializer.cs"
|
||||
)
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO ERROR: Something went wrong when generating the language files...
|
||||
)
|
||||
GOTO END
|
||||
|
||||
|
||||
:UpdateAssemblyInfo
|
||||
IF NOT EXIST "src\UpdateAssemblyInfo\bin\Release\UpdateAssemblyInfo.exe" IF NOT EXIST "src\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe" (
|
||||
ECHO Compile Subtitle Edit first!
|
||||
GOTO END
|
||||
)
|
||||
|
||||
IF EXIST "src\UpdateAssemblyInfo\bin\Release\UpdateAssemblyInfo.exe" (
|
||||
"src\UpdateAssemblyInfo\bin\Release\UpdateAssemblyInfo.exe" "src\Properties\AssemblyInfo.cs.template" "src\Properties\AssemblyInfo.cs"
|
||||
) ELSE (
|
||||
"src\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe" "src\Properties\AssemblyInfo.cs.template" "src\Properties\AssemblyInfo.cs"
|
||||
)
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO ERROR: Something went wrong when generating the revision number...
|
||||
)
|
||||
GOTO END
|
@ -1906,14 +1906,14 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>"$(ProjectDir)..\update_rev.bat"
|
||||
<PreBuildEvent>"$(ProjectDir)..\build_helpers.bat" rev
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>COPY /Y /V "$(ProjectDir)Dlls\Hunspellx86.dll" "$(TargetDir)"
|
||||
COPY /Y /V "$(ProjectDir)Dlls\Hunspellx64.dll" "$(TargetDir)"
|
||||
COPY /Y /V "$(ProjectDir)Dlls\Interop.QuartzTypeLib.dll" "$(TargetDir)"
|
||||
"$(ProjectDir)..\update_lang.bat"</PostBuildEvent>
|
||||
"$(ProjectDir)..\build_helpers.bat" lang</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -1,26 +0,0 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
|
||||
PUSHD %~dp0
|
||||
|
||||
IF NOT EXIST "src\UpdateLanguageFiles\bin\Release\UpdateLanguageFiles.exe" IF NOT EXIST "src\UpdateLanguageFiles\bin\Debug\UpdateLanguageFiles.exe" (
|
||||
ECHO Compile Subtitle Edit first!
|
||||
GOTO END
|
||||
)
|
||||
|
||||
IF EXIST "src\UpdateLanguageFiles\bin\Release\UpdateLanguageFiles.exe" (
|
||||
"src\UpdateLanguageFiles\bin\Release\UpdateLanguageFiles.exe" "LanguageMaster.xml" "src\Logic\LanguageDeserializer.cs"
|
||||
) ELSE (
|
||||
"src\UpdateLanguageFiles\bin\Debug\UpdateLanguageFiles.exe" "LanguageMaster.xml" "src\Logic\LanguageDeserializer.cs"
|
||||
)
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO SubError
|
||||
|
||||
|
||||
:END
|
||||
POPD
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
:SubError
|
||||
ECHO ERROR: Something went wrong when generating the language files...
|
||||
EXIT /B
|
@ -1,26 +0,0 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
|
||||
PUSHD %~dp0
|
||||
|
||||
IF NOT EXIST "src\UpdateAssemblyInfo\bin\Release\UpdateAssemblyInfo.exe" IF NOT EXIST "src\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe" (
|
||||
ECHO Compile Subtitle Edit first!
|
||||
GOTO END
|
||||
)
|
||||
|
||||
IF EXIST "src\UpdateAssemblyInfo\bin\Release\UpdateAssemblyInfo.exe" (
|
||||
"src\UpdateAssemblyInfo\bin\Release\UpdateAssemblyInfo.exe" "src\Properties\AssemblyInfo.cs.template" "src\Properties\AssemblyInfo.cs"
|
||||
) ELSE (
|
||||
"src\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe" "src\Properties\AssemblyInfo.cs.template" "src\Properties\AssemblyInfo.cs"
|
||||
)
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO SubError
|
||||
|
||||
|
||||
:END
|
||||
POPD
|
||||
ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
:SubError
|
||||
ECHO ERROR: Something went wrong when generating the revision number...
|
||||
EXIT /B
|
Loading…
Reference in New Issue
Block a user