Update versioning

This commit is contained in:
Arkshine
2014-12-08 01:39:10 +01:00
parent 2bba5ce69a
commit 3594c11238
7 changed files with 154 additions and 66 deletions

View 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

View 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__;

View 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_