mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Make the gitversion script work automatically with msysgit without setting global PATH.
This commit is contained in:
parent
b781c8deb5
commit
020e505e74
1 changed files with 12 additions and 1 deletions
|
@ -23,6 +23,17 @@ if "%GIT%" == "" (
|
||||||
set GIT=git
|
set GIT=git
|
||||||
)
|
)
|
||||||
|
|
||||||
|
"%GIT%" describe > NUL 2> NUL
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Git not on path, trying default Msysgit paths
|
||||||
|
set GIT=C:\Program Files ^(x86^)\Git\bin\git.exe
|
||||||
|
"%GIT%" describe > NUL 2> NUL
|
||||||
|
if errorlevel 1 (
|
||||||
|
set GIT=C:\Program Files\Git\bin\git.exe
|
||||||
|
)
|
||||||
|
)
|
||||||
|
goto done
|
||||||
|
|
||||||
if exist "%GIT_VERSION_FILE%" (
|
if exist "%GIT_VERSION_FILE%" (
|
||||||
rem // Skip updating the file if PPSSPP_GIT_VERSION_NO_UPDATE is 1.
|
rem // Skip updating the file if PPSSPP_GIT_VERSION_NO_UPDATE is 1.
|
||||||
findstr /B /C:"#define PPSSPP_GIT_VERSION_NO_UPDATE 1" "%GIT_VERSION_FILE%" > NUL
|
findstr /B /C:"#define PPSSPP_GIT_VERSION_NO_UPDATE 1" "%GIT_VERSION_FILE%" > NUL
|
||||||
|
@ -33,7 +44,7 @@ if exist "%GIT_VERSION_FILE%" (
|
||||||
|
|
||||||
"%GIT%" describe --always > NUL 2> NUL
|
"%GIT%" describe --always > NUL 2> NUL
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo Unable to update git-version.cpp, %GIT% not on path.
|
echo Unable to update git-version.cpp, git not found.
|
||||||
|
|
||||||
echo // This is a generated file. > "%GIT_VERSION_FILE%"
|
echo // This is a generated file. > "%GIT_VERSION_FILE%"
|
||||||
echo. >> "%GIT_VERSION_FILE%"
|
echo. >> "%GIT_VERSION_FILE%"
|
||||||
|
|
Loading…
Add table
Reference in a new issue