diff options
-rw-r--r-- | src/apps/mplayerc/mplayerc.vcproj | 8 | ||||
-rw-r--r-- | src/filters/transform/vsfilter/VSFilter.vcproj | 8 | ||||
-rw-r--r-- | update_version.bat | 27 |
3 files changed, 35 insertions, 8 deletions
diff --git a/src/apps/mplayerc/mplayerc.vcproj b/src/apps/mplayerc/mplayerc.vcproj index 324fcc54f..636a6b95e 100644 --- a/src/apps/mplayerc/mplayerc.vcproj +++ b/src/apps/mplayerc/mplayerc.vcproj @@ -31,7 +31,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\include\Version.h

:End
"
+ CommandLine="cd ..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -124,7 +124,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\include\Version.h

:End
"
+ CommandLine="cd ..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -215,7 +215,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\include\Version.h

:End
"
+ CommandLine="cd ..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -302,7 +302,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\.. ..\..\..\include\SubWCRev.conf ..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\include\Version.h
echo. >>..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\include\Version.h

:End
"
+ CommandLine="cd ..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
diff --git a/src/filters/transform/vsfilter/VSFilter.vcproj b/src/filters/transform/vsfilter/VSFilter.vcproj index ff112ec0d..4ff6a0c5b 100644 --- a/src/filters/transform/vsfilter/VSFilter.vcproj +++ b/src/filters/transform/vsfilter/VSFilter.vcproj @@ -28,7 +28,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\..\include\Version.h

:End

if exist ..\..\..\..\include\UserConfig.h goto SpecificConfig
echo #pragma once >..\..\..\..\include\UserConfig.h
echo //#ifdef ENABLE_MINIDUMP >>..\..\..\..\include\UserConfig.h

:SpecificConfig
"
+ CommandLine="cd ..\..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -102,7 +102,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\..\include\Version.h

:End

if exist ..\..\..\..\include\UserConfig.h goto SpecificConfig
echo #pragma once >..\..\..\..\include\UserConfig.h
echo //#ifdef ENABLE_MINIDUMP >>..\..\..\..\include\UserConfig.h

:SpecificConfig
"
+ CommandLine="cd ..\..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -174,7 +174,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\..\include\Version.h

:End

if exist ..\..\..\..\include\UserConfig.h goto SpecificConfig
echo #pragma once >..\..\..\..\include\UserConfig.h
echo //#ifdef ENABLE_MINIDUMP >>..\..\..\..\include\UserConfig.h

:SpecificConfig
"
+ CommandLine="cd ..\..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -256,7 +256,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto x64
"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:x64
if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto NoChrisWillem
"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" ..\..\..\.. ..\..\..\..\include\SubWCRev.conf ..\..\..\..\include\Version.h
goto End

:NoChrisWillem
echo #pragma once >..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define DO_MAKE_STR(x) #x >>..\..\..\..\include\Version.h
echo #define MAKE_STR(x) DO_MAKE_STR(x) >>..\..\..\..\include\Version.h
echo. >>..\..\..\..\include\Version.h
echo #define VERSION_MAJOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_MINOR 1 >>..\..\..\..\include\Version.h
echo #define VERSION_REV 666 >>..\..\..\..\include\Version.h
echo #define VERSION_PATCH 0 >>..\..\..\..\include\Version.h

:End

if exist ..\..\..\..\include\UserConfig.h goto SpecificConfig
echo #pragma once >..\..\..\..\include\UserConfig.h
echo //#ifdef ENABLE_MINIDUMP >>..\..\..\..\include\UserConfig.h

:SpecificConfig
"
+ CommandLine="cd ..\..\..\..\
update_version.bat"
/>
<Tool
Name="VCCustomBuildTool"
diff --git a/update_version.bat b/update_version.bat new file mode 100644 index 000000000..ad5d4d172 --- /dev/null +++ b/update_version.bat @@ -0,0 +1,27 @@ +@if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto :x64
+
+@"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" .\ include\SubWCRev.conf include\version.h
+@if %ERRORLEVEL%==6 goto :NoSubWCRev
+@if %ERRORLEVEL%==10 goto :NoSubWCRev
+@goto :eof
+
+:x64
+@if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto :NoSubWCRev
+
+@"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" .\ include\SubWCRev.conf include\version.h
+@if %ERRORLEVEL%==6 goto :NoSubWCRev
+@if %ERRORLEVEL%==10 goto :NoSubWCRev
+@goto :eof
+
+:NoSubWCRev
+@echo NoSubWCRev
+@if exist include\version.h del include\version.h
+echo #pragma once >> include\version.h
+echo. >> include\Version.h
+echo #define DO_MAKE_STR(x) #x >> include\Version.h
+echo #define MAKE_STR(x) DO_MAKE_STR(x) >> include\Version.h
+echo. >> include\Version.h
+@echo #define VERSION_MAJOR 1 >> include\version.h
+@echo #define VERSION_MINOR 3 >> include\version.h
+@echo #define VERSION_REV 0 >> include\version.h
+@echo #define VERSION_PATCH 0 >> include\version.h
|