Declare version_* in only one place. Define them in ver.cpp (at least on autotools).
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
#include "JsonUtil.h"
|
||||
#include "ScreenInstallOverlay.h"
|
||||
|
||||
#if defined(HAVE_VERSION_INFO)
|
||||
#include "ver.h"
|
||||
#endif
|
||||
|
||||
// only used for Version()
|
||||
#if defined(_WINDOWS)
|
||||
#include <windows.h>
|
||||
@@ -77,12 +81,6 @@ static void LuaInformation()
|
||||
delete pNode;
|
||||
}
|
||||
|
||||
#if defined(HAVE_VERSION_INFO)
|
||||
extern unsigned long version_num;
|
||||
extern const char *const version_date;
|
||||
extern const char *const version_time;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Print out version information.
|
||||
*
|
||||
|
||||
+3
-3
@@ -37,9 +37,9 @@ increment_version:
|
||||
else \
|
||||
build=0; \
|
||||
fi; \
|
||||
echo "extern const unsigned long version_num = $$build;" > ver.cpp; \
|
||||
echo "extern const char *const version_time = \"`date +"%X %Z (UTC%:z)"`\";" >> ver.cpp;
|
||||
echo "extern const char *const version_date = \"`date +"%Y%m%d"`\";" >> ver.cpp;
|
||||
echo "const unsigned long version_num = $$build;" > ver.cpp; \
|
||||
echo "const char *const version_time = \"`date +"%X %Z (UTC%:z)"`\";" >> ver.cpp;
|
||||
echo "const char *const version_date = \"`date +"%Y%m%d"`\";" >> ver.cpp;
|
||||
|
||||
ver.cpp: increment_version
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
|
||||
NetworkSyncManager *NSMAN;
|
||||
|
||||
// Aldo: used by GetCurrentSMVersion()
|
||||
// Aldo: version_num used by GetCurrentSMVersion()
|
||||
// XXX: That's probably not what you want... --root
|
||||
#if defined(HAVE_VERSION_INFO)
|
||||
extern unsigned long version_num;
|
||||
#include "ver.h"
|
||||
#endif
|
||||
|
||||
#if defined(WITHOUT_NETWORKING)
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "RageLog.h"
|
||||
#include "SpecialFiles.h"
|
||||
|
||||
#if !defined(WITHOUT_NETWORKING) && defined(HAVE_VERSION_INFO)
|
||||
#include "ver.h"
|
||||
#endif
|
||||
|
||||
//DEFAULTS_INI_PATH = "Data/Defaults.ini"; // these can be overridden
|
||||
//PREFERENCES_INI_PATH // overlay on Defaults.ini, contains the user's choices
|
||||
//STATIC_INI_PATH = "Data/Static.ini"; // overlay on the 2 above, can't be overridden
|
||||
@@ -143,10 +147,6 @@ bool g_bAutoRestart = false;
|
||||
# define TRUE_IF_DEBUG false
|
||||
#endif
|
||||
|
||||
#if !defined(WITHOUT_NETWORKING) && defined(HAVE_VERSION_INFO)
|
||||
extern unsigned long version_num;
|
||||
#endif
|
||||
|
||||
void ValidateDisplayAspectRatio( float &val )
|
||||
{
|
||||
if( val < 0 )
|
||||
|
||||
+4
-5
@@ -69,6 +69,10 @@
|
||||
#include "Profile.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
#ifdef HAVE_VERSION_INFO
|
||||
#include "ver.h"
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@@ -907,11 +911,6 @@ static void MountTreeOfZips( const RString &dir )
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_VERSION_INFO)
|
||||
extern unsigned long version_num;
|
||||
extern const char *const version_date;
|
||||
extern const char *const version_time;
|
||||
#endif
|
||||
|
||||
static void WriteLogHeader()
|
||||
{
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_VERSION_INFO)
|
||||
extern const unsigned long version_num;
|
||||
extern const char *const version_date;
|
||||
extern const char *const version_time;
|
||||
#include "ver.h"
|
||||
#endif
|
||||
|
||||
bool child_read( int fd, void *p, int size );
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
#pragma comment(lib, "archutils/Win32/ddk/dbghelp.lib")
|
||||
#endif
|
||||
|
||||
extern unsigned long version_num;
|
||||
extern const char *const version_date;
|
||||
extern const char *const version_time;
|
||||
// XXX: What happens when we *don't* have version info? Does that ever actually happen?
|
||||
#include "ver.h"
|
||||
|
||||
// VDI symbol lookup:
|
||||
namespace VDDebugInfo
|
||||
|
||||
Reference in New Issue
Block a user