Fix git-version-gen.cmd to handle even releases (git describe outputs a simpler format). Update lang.

This commit is contained in:
Henrik Rydgard 2015-10-04 17:21:25 +02:00
parent 2eec3a2d99
commit fa50afa056
2 changed files with 8 additions and 5 deletions

View File

@ -73,7 +73,7 @@ if "%GIT_MISSING%" == "1" (
echo WARNING: Unable to update git-version.cpp, git not found.
echo If you don't want to add it to your path, set the GIT environment variable.
echo // This is a generated file. > "%GIT_VERSION_FILE%"
echo // This is a generated file, by git-version-gen.cmd. > "%GIT_VERSION_FILE%"
echo. >> "%GIT_VERSION_FILE%"
echo // ERROR: Unable to determine version - git not on path. > "%GIT_VERSION_FILE%"
echo const char *PPSSPP_GIT_VERSION = "unknown"; >> "%GIT_VERSION_FILE%"
@ -88,7 +88,7 @@ if exist "%GIT_VERSION_FILE%" (
)
)
echo // This is a generated file. > "%GIT_VERSION_FILE%"
echo // This is a generated file, by git-version-gen.cmd. > "%GIT_VERSION_FILE%"
echo. >> "%GIT_VERSION_FILE%"
echo const char *PPSSPP_GIT_VERSION = "%GIT_VERSION%"; >> "%GIT_VERSION_FILE%"
echo. >> "%GIT_VERSION_FILE%"
@ -108,7 +108,7 @@ if exist "%WIN_VERSION_FILE%" (
if "%GIT_MISSING%" == "1" (
echo WARNING: Unable to update Windows/win-version.h, git not found.
echo // This is a generated file. > "%WIN_VERSION_FILE%"
echo // This is a generated file, by git-version-gen.cmd. > "%WIN_VERSION_FILE%"
echo. >> "%WIN_VERSION_FILE%"
echo // ERROR: Unable to determine version - git not on path. > "%WIN_VERSION_FILE%"
echo #define PPSSPP_WIN_VERSION_STRING "unknown" > "%WIN_VERSION_FILE%"
@ -125,10 +125,13 @@ if exist "%WIN_VERSION_FILE%" (
)
)
set WIN_RELEASE_VERSION=0
set WIN_BUILD_NUMBER=0
for /f "tokens=1 delims=-" %%a in ("%GIT_VERSION:~1%") do set WIN_RELEASE_VERSION=%%a
for /f "tokens=2 delims=-" %%a in ("%GIT_VERSION%") do set WIN_BUILD_NUMBER=%%a
echo // This is a generated file. > "%WIN_VERSION_FILE%"
echo // This is a generated file, by git-version-gen.cmd. > "%WIN_VERSION_FILE%"
echo // GIT_VERSION=%GIT_VERSION% >> "%WIN_VERSION_FILE%"
echo. >> "%WIN_VERSION_FILE%"
echo #define PPSSPP_WIN_VERSION_STRING "%GIT_VERSION%" >> "%WIN_VERSION_FILE%"
echo #define PPSSPP_WIN_VERSION_COMMA %WIN_RELEASE_VERSION:.=,%,%WIN_BUILD_NUMBER% >> "%WIN_VERSION_FILE%"

2
lang

@ -1 +1 @@
Subproject commit fa6ccb25089781a165c711595c2dcf070ada6fbb
Subproject commit 684946aee1670677a864f2e00f56ad2f02961c08