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@yahoo.com>2012-07-22 13:44:57 +0400
committerxhmikosr <xhmikosr@yahoo.com>2012-07-25 19:46:22 +0400
commit733eef367970f65f6df8c4e16a13643697acc064 (patch)
tree2fdedf6d469300164e43b4d8fd3c3155a2c6e334 /update_version.bat
parent5ced55574959d02cc4622e22ad34275160b4ca96 (diff)
first script to get the revision. Heavily based on a patch by demi_alucard
Diffstat (limited to 'update_version.bat')
-rw-r--r--update_version.bat36
1 files changed, 15 insertions, 21 deletions
diff --git a/update_version.bat b/update_version.bat
index f61fbc965..9ff5725d4 100644
--- a/update_version.bat
+++ b/update_version.bat
@@ -21,15 +21,17 @@ SETLOCAL
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
+IF EXIST "build.user.bat" (
+ CALL "build.user.bat"
+) ELSE (
+ IF DEFINED GIT (SET MPCHC_GIT=%GIT%) ELSE (GOTO MissingVar)
+ IF DEFINED MSYS (SET MPCHC_MSYS=%MSYS%) ELSE (GOTO MissingVar)
+)
-"%SUBWCREV%" . "include\Version_rev.h.in" "include\Version_rev.h" -f
-IF %ERRORLEVEL% NEQ 0 GOTO SubError
+SET PATH=%MPCHC_GIT%\cmd;%PATH%
-"%SUBWCREV%" . "src\mpc-hc\res\mpc-hc.exe.manifest.conf" "src\mpc-hc\res\mpc-hc.exe.manifest" -f >NUL
-IF %ERRORLEVEL% NEQ 0 GOTO SubError
+sh ./version.sh
+TYPE "src\mpc-hc\res\mpc-hc.exe.manifest.template" > "src\mpc-hc\res\mpc-hc.exe.manifest"
:END
POPD
@@ -37,17 +39,9 @@ ENDLOCAL
EXIT /B
-: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\mpc-hc\res\mpc-hc.exe.manifest.template" > "src\mpc-hc\res\mpc-hc.exe.manifest"
-GOTO END
+:MissingVar
+ECHO Not all build dependencies were found.
+ECHO.
+ECHO See "docs\Compilation.txt" for more information.
+ENDLOCAL
+EXIT /B 1