Update versioning
This commit is contained in:
15
support/versionlib/AMBuilder
Normal file
15
support/versionlib/AMBuilder
Normal file
@ -0,0 +1,15 @@
|
||||
# vim: sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
lib = builder.compiler.StaticLibrary('version')
|
||||
lib.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'public'),
|
||||
]
|
||||
lib.compiler.defines.remove('AMXX_USE_VERSIONLIB')
|
||||
lib.compiler.sourcedeps += AMXX.generated_headers
|
||||
lib.sources += [
|
||||
'versionlib.cpp'
|
||||
]
|
||||
task = builder.Add(lib)
|
||||
|
||||
rvalue = task.binary
|
8
support/versionlib/versionlib.cpp
Normal file
8
support/versionlib/versionlib.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
#include <amxmodx_version.h>
|
||||
#include <versionlib.h>
|
||||
|
||||
const char *AMXX_LOCAL_REV = AMXX_BUILD_LOCAL_REV;
|
||||
const char *AMXX_SHA = AMXX_BUILD_CSET;
|
||||
const char *AMXX_VERSION = AMXX_VERSION_STRING;
|
||||
const char *AMXX_BUILD_TIME = __DATE__ " " __TIME__;
|
24
support/versionlib/versionlib.h
Normal file
24
support/versionlib/versionlib.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef _INCLUDE_AMXX_VERSIONLIB_H_
|
||||
#define _INCLUDE_AMXX_VERSIONLIB_H_
|
||||
|
||||
#if !defined(AMXX_USE_VERSIONLIB)
|
||||
// These get defined in amxmodx_version.h since
|
||||
// versionlib does not use versionlib.
|
||||
#undef AMXX_LOCAL_REV
|
||||
#undef AMXX_CSET
|
||||
#undef AMXX_VERSION
|
||||
#undef AMXX_BUILD_TIME
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN_C extern "C"
|
||||
#else
|
||||
#define EXTERN_C extern
|
||||
#endif
|
||||
|
||||
EXTERN_C const char *AMXX_LOCAL_REV;
|
||||
EXTERN_C const char *AMXX_SHA;
|
||||
EXTERN_C const char *AMXX_VERSION;
|
||||
EXTERN_C const char *AMXX_BUILD_TIME;
|
||||
|
||||
#endif // _INCLUDE_AMXX_VERSIONLIB_H_
|
Reference in New Issue
Block a user