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