Skip to content

Commit

Permalink
Fix version display in windows builds (mingw)
Browse files Browse the repository at this point in the history
  • Loading branch information
troky committed Nov 16, 2014
1 parent 32d95dd commit ba9818a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sgminer.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ char *curly = ":D";
#include <sys/wait.h>
#endif

#ifdef GIT_VERSION
#if defined(USE_GIT_VERSION) && defined(GIT_VERSION)
#undef VERSION
#define VERSION GIT_VERSION
#endif
Expand Down
16 changes: 8 additions & 8 deletions winbuild/sgminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
del /f "$(OutDir)*.exe"
del /f "$(OutDir)*.dll"

type nul &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt; "$(ProjectDir)dist\include\gitversion.h"
echo #define USE_GIT_VERSION 1 &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt;&gt; "$(ProjectDir)dist\include\gitversion.h"
exit 0
</Command>
</PreBuildEvent>
Expand Down Expand Up @@ -165,8 +165,8 @@
del /f "$(OutDir)*.exe"
del /f "$(OutDir)*.dll"

type nul &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt; "$(ProjectDir)dist\include\gitversion.h"
echo #define USE_GIT_VERSION 1 &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt;&gt; "$(ProjectDir)dist\include\gitversion.h"
exit 0
</Command>
</PreBuildEvent>
Expand Down Expand Up @@ -208,8 +208,8 @@
del /f "$(OutDir)*.exe"
del /f "$(OutDir)*.dll"

type nul &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt; "$(ProjectDir)dist\include\gitversion.h"
echo #define USE_GIT_VERSION 1 &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt;&gt; "$(ProjectDir)dist\include\gitversion.h"
exit 0
</Command>
</PreBuildEvent>
Expand Down Expand Up @@ -252,8 +252,8 @@
del /f "$(OutDir)*.exe"
del /f "$(OutDir)*.dll"

type nul &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt; "$(ProjectDir)dist\include\gitversion.h"
echo #define USE_GIT_VERSION 1 &gt; "$(ProjectDir)dist\include\gitversion.h"
FOR /F "tokens=*" %%i IN ('call git describe "--abbrev=4" --dirty') DO echo #define GIT_VERSION "%%i" &gt;&gt; "$(ProjectDir)dist\include\gitversion.h"
exit 0
</Command>
</PreBuildEvent>
Expand Down

0 comments on commit ba9818a

Please sign in to comment.