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:
authorXhmikosR <xhmikosr@users.sourceforge.net>2012-05-05 19:03:55 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2012-05-05 19:03:55 +0400
commit31e4959ca2d87dc8593f1c41c4f7cf37e552f4f4 (patch)
treea58b8d594f8211ec1d2bbdc82a63d36f4da1b4f8 /update_version.bat
parentba8fa5ef2e9efb2c0732f68a894baf7323d2e64f (diff)
update_version.bat: minor improvements
patch by kasper93 git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4597 10f7b99b-c216-0410-bff0-8a66a9350fd8
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