Browse Source

Disabled git version of C::B projects

AlexVinS 9 years ago
parent
commit
1ccb0d98be
3 changed files with 16 additions and 2 deletions
  1. 13 0
      lib/GameConstants.cpp
  2. 1 2
      lib/GameConstants.h
  3. 2 0
      lib/VCMI_lib.cbp

+ 13 - 0
lib/GameConstants.cpp

@@ -12,6 +12,10 @@
 
 #include "StdInc.h"
 
+#ifndef VCMI_NO_EXTRA_VERSION
+#include "../Version.h"
+#endif
+
 #include "VCMI_Lib.h"
 #include "mapObjects/CObjectClassesHandler.h"
 #include "CArtHandler.h"
@@ -31,6 +35,15 @@ const PlayerColor PlayerColor::NEUTRAL = PlayerColor(255);
 const PlayerColor PlayerColor::PLAYER_LIMIT = PlayerColor(PLAYER_LIMIT_I);
 const TeamID TeamID::NO_TEAM = TeamID(255);
 
+namespace GameConstants
+{
+#ifdef VCMI_NO_EXTRA_VERSION
+	const std::string VCMI_VERSION = std::string("VCMI 0.98h");
+#else
+	const std::string VCMI_VERSION = std::string("VCMI 0.98h ") + GIT_SHA1;
+#endif
+}
+
 const CArtifact * ArtifactID::toArtifact() const
 {
 	return VLC->arth->artifacts.at(*this);

+ 1 - 2
lib/GameConstants.h

@@ -11,11 +11,10 @@
  */
 
 #include "ConstTransitivePtr.h"
-#include "Version.h"
 
 namespace GameConstants
 {
-	const std::string VCMI_VERSION = std::string("VCMI 0.98h ") + GIT_SHA1;
+	DLL_LINKAGE extern const std::string VCMI_VERSION;
 
 	const int BFIELD_WIDTH = 17;
 	const int BFIELD_HEIGHT = 11;

+ 2 - 0
lib/VCMI_lib.cbp

@@ -110,6 +110,7 @@
 			<Add option="-DBOOST_SYSTEM_NO_DEPRECATED" />
 			<Add option="-D_WIN32_WINNT=0x0501" />
 			<Add option="-D_WIN32" />
+			<Add option="-DVCMI_NO_EXTRA_VERSION" />
 			<Add directory="." />
 			<Add directory="$(#sdl2.include)" />
 			<Add directory="$(#zlib.include)" />
@@ -121,6 +122,7 @@
 			<Add directory="$(#zlib.lib)" />
 		</Linker>
 		<Unit filename="../Global.h" />
+		<Unit filename="../Version.h" />
 		<Unit filename="../include/vstd/CLoggerBase.h" />
 		<Unit filename="AI_Base.h" />
 		<Unit filename="BattleAction.cpp" />