Skip to content

Commit 199cc4e

Browse files
qweasdd136963q4a
authored andcommitted
Trying to fix GitInfo
1 parent 7a5a669 commit 199cc4e

File tree

2 files changed

+42
-11
lines changed

2 files changed

+42
-11
lines changed

src/xrCore/.GitInfo.cmd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
where git >nul 2>nul
2-
if %errorLevel% neq 0 (
3-
goto :EOF
4-
)
5-
61
echo | set /p dummyName=#define GIT_INFO_CURRENT_COMMIT > .GitInfo.hpp
72
git rev-parse --verify HEAD >> .GitInfo.hpp
83

src/xrCore/xrCore.vcxproj

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,13 @@
116116
<Message>Copying the required libraries ...</Message>
117117
</PostBuildEvent>
118118
<PreBuildEvent>
119-
<Command>call .GitInfo.cmd</Command>
119+
<Command>where /q git
120+
if errorlevel 1 (
121+
echo git is not founded
122+
goto :EOF
123+
)
124+
echo git is founded
125+
call .GitInfo.cmd</Command>
120126
</PreBuildEvent>
121127
</ItemDefinitionGroup>
122128
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -132,7 +138,13 @@
132138
<Message>Copying the required libraries ...</Message>
133139
</PostBuildEvent>
134140
<PreBuildEvent>
135-
<Command>call .GitInfo.cmd</Command>
141+
<Command>where /q git
142+
if errorlevel 1 (
143+
echo git is not founded
144+
goto :EOF
145+
)
146+
echo git is founded
147+
call .GitInfo.cmd</Command>
136148
</PreBuildEvent>
137149
</ItemDefinitionGroup>
138150
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -151,7 +163,13 @@
151163
<Message>Copying the required libraries ...</Message>
152164
</PostBuildEvent>
153165
<PreBuildEvent>
154-
<Command>call .GitInfo.cmd</Command>
166+
<Command>where /q git
167+
if errorlevel 1 (
168+
echo git is not founded
169+
goto :EOF
170+
)
171+
echo git is founded
172+
call .GitInfo.cmd</Command>
155173
</PreBuildEvent>
156174
</ItemDefinitionGroup>
157175
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -167,7 +185,13 @@
167185
<Message>Copying the required libraries ...</Message>
168186
</PostBuildEvent>
169187
<PreBuildEvent>
170-
<Command>call .GitInfo.cmd</Command>
188+
<Command>where /q git
189+
if errorlevel 1 (
190+
echo git is not founded
191+
goto :EOF
192+
)
193+
echo git is founded
194+
call .GitInfo.cmd</Command>
171195
</PreBuildEvent>
172196
</ItemDefinitionGroup>
173197
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">
@@ -185,7 +209,13 @@
185209
<Message>Copying the required libraries ...</Message>
186210
</PostBuildEvent>
187211
<PreBuildEvent>
188-
<Command>call .GitInfo.cmd</Command>
212+
<Command>where /q git
213+
if errorlevel 1 (
214+
echo git is not founded
215+
goto :EOF
216+
)
217+
echo git is founded
218+
call .GitInfo.cmd</Command>
189219
</PreBuildEvent>
190220
</ItemDefinitionGroup>
191221
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">
@@ -201,7 +231,13 @@
201231
<Message>Copying the required libraries ...</Message>
202232
</PostBuildEvent>
203233
<PreBuildEvent>
204-
<Command>call .GitInfo.cmd</Command>
234+
<Command>where /q git
235+
if errorlevel 1 (
236+
echo git is not founded
237+
goto :EOF
238+
)
239+
echo git is founded
240+
call .GitInfo.cmd</Command>
205241
</PreBuildEvent>
206242
</ItemDefinitionGroup>
207243
<ItemGroup>

0 commit comments

Comments
 (0)