diff --git a/tools/generate_git_version.bat b/tools/generate_git_version.bat
new file mode 100644
index 0000000000..ad77c19f20
--- /dev/null
+++ b/tools/generate_git_version.bat
@@ -0,0 +1,13 @@
+WHERE git
+IF %ERRORLEVEL% EQU 0 (
+ IF EXIST ../.git/ (
+ echo | set /p dummyName=#define GIT_BRANCH > ../src/gitinfo.h
+ git rev-parse --abbrev-ref HEAD >> ../src/gitinfo.h
+
+ echo | set /p dummyName=#define GIT_VERSION >> ../src/gitinfo.h
+ git describe --abbrev=0 --tag >> ../src/gitinfo.h
+
+ echo | set /p dummyName=#define GIT_COMMITS >> ../src/gitinfo.h
+ git rev-list --count head >> ../src/gitinfo.h
+ )
+)
\ No newline at end of file
diff --git a/vc17/otclient.vcxproj b/vc17/otclient.vcxproj
index d843c61ce5..f927087030 100644
--- a/vc17/otclient.vcxproj
+++ b/vc17/otclient.vcxproj
@@ -169,20 +169,7 @@ cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\
if NOT EXIST "../src/protobuf/appearances.pb.cc" (
- cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
-)
-WHERE git
-IF %ERRORLEVEL% EQU 0 (
- IF EXIST ../.git/ (
- echo | set /p dummyName=#define GIT_BRANCH > ../src/gitinfo.h
- git rev-parse --abbrev-ref HEAD >> ../src/gitinfo.h
-
- echo | set /p dummyName=#define GIT_VERSION >> ../src/gitinfo.h
- git describe --abbrev=0 --tag >> ../src/gitinfo.h
-
- echo | set /p dummyName=#define GIT_COMMITS >> ../src/gitinfo.h
- git rev-list --count head >> ../src/gitinfo.h
- )
+cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
)
@@ -208,22 +195,8 @@ IF %ERRORLEVEL% EQU 0 (
if NOT EXIST "../src/protobuf/appearances.pb.cc" (
- cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
-)
-WHERE git
-IF %ERRORLEVEL% EQU 0 (
- IF EXIST ../.git/ (
- echo | set /p dummyName=#define GIT_BRANCH > ../src/gitinfo.h
- git rev-parse --abbrev-ref HEAD >> ../src/gitinfo.h
-
- echo | set /p dummyName=#define GIT_VERSION >> ../src/gitinfo.h
- git describe --abbrev=0 --tag >> ../src/gitinfo.h
-
- echo | set /p dummyName=#define GIT_COMMITS >> ../src/gitinfo.h
- git rev-list --count head >> ../src/gitinfo.h
- )
-)
-
+cmd /c "start ../vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\tools\protobuf\protoc" --cpp_out=../src/protobuf/ --proto_path=../src/protobuf/ appearances.proto
+)