Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update_version.bat')
-rw-r--r--update_version.bat27
1 files changed, 17 insertions, 10 deletions
diff --git a/update_version.bat b/update_version.bat
index c7507e18e..e5b305390 100644
--- a/update_version.bat
+++ b/update_version.bat
@@ -1,28 +1,35 @@
@ECHO OFF
SETLOCAL
-SET "SUBWCREV=SubWCRev.exe"
-
PUSHD %~dp0
+IF EXIST "SubWCRev.exe" SET "SUBWCREV=SubWCRev.exe"
+FOR %%A IN (SubWCRev.exe) DO (SET SUBWCREV=%%~$PATH:A)
+IF NOT DEFINED SUBWCREV GOTO SubNoSubWCRev
+
"%SUBWCREV%" . "include\Version_rev.h.in" "include\Version_rev.h" -f
-IF %ERRORLEVEL% NEQ 0 GOTO NoSubWCRev
+IF %ERRORLEVEL% NEQ 0 GOTO SubError
"%SUBWCREV%" . "src\apps\mplayerc\res\mpc-hc.exe.manifest.conf" "src\apps\mplayerc\res\mpc-hc.exe.manifest" -f >NUL
-IF %ERRORLEVEL% NEQ 0 GOTO NoSubWCRev
+IF %ERRORLEVEL% NEQ 0 GOTO SubError
-GOTO END
+:END
+POPD
+ENDLOCAL
+EXIT /B
-:NoSubWCRev
+:SubNoSubWCRev
ECHO. & ECHO SubWCRev, which is part of TortoiseSVN, wasn't found!
ECHO You should (re)install TortoiseSVN.
+GOTO SubCommon
+
+:SubError
+ECHO Something went wrong when generating the revision number.
+
+:SubCommon
ECHO I'll use MPC_VERSION_REV=0 for now.
ECHO #define MPC_VERSION_REV 0 > "include\Version_rev.h"
TYPE "src\apps\mplayerc\res\mpc-hc.exe.manifest.template" > "src\apps\mplayerc\res\mpc-hc.exe.manifest"
-
-:END
-POPD
-ENDLOCAL
EXIT /B