diff --git a/engine/wscript b/engine/wscript index a96a5758..48a5ac3e 100644 --- a/engine/wscript +++ b/engine/wscript @@ -199,7 +199,7 @@ def build(bld): # public includes for renderers and utils use bld(name = 'engine_includes', export_includes = '. common common/imagelib', use = 'filesystem_includes') - libs = ['engine_includes', 'public', 'werror', 'backtrace', 'library_suffix'] + libs = ['engine_includes', 'public', 'werror', 'backtrace', 'library_suffix', 'build_vcs'] includes = ['server', 'client', 'client/vgui', 'common/soundlib', 'platform'] # basic build: dedicated only diff --git a/filesystem/wscript b/filesystem/wscript index 8e131010..c98a0bcb 100644 --- a/filesystem/wscript +++ b/filesystem/wscript @@ -37,7 +37,7 @@ def build(bld): # on PSVita do not link any libraries that are already in the main executable, but add the includes target if bld.env.DEST_OS != 'psvita': - libs += [ 'public', 'ANDROID', 'library_suffix' ] + libs += [ 'public', 'ANDROID', 'library_suffix', 'build_vcs' ] bld.shlib(target = 'filesystem_stdio', features = 'seq', diff --git a/public/build.c b/public/build.c index 7bd062b3..b63090ab 100644 --- a/public/build.c +++ b/public/build.c @@ -60,19 +60,3 @@ int Q_buildnum( void ) return b; } - -/* -============= -Q_buildnum_compat - -Returns a Xash3D build number. This is left for compability with original Xash3D. -IMPORTANT: this value must be changed ONLY after updating to newer Xash3D base -IMPORTANT: this value must be acquired through "build" cvar. -============= -*/ -int Q_buildnum_compat( void ) -{ - // do not touch this! Only author of Xash3D can increase buildnumbers! - return 4529; -} - diff --git a/public/crtlib.h b/public/crtlib.h index 38118dae..3bc176a1 100644 --- a/public/crtlib.h +++ b/public/crtlib.h @@ -55,14 +55,23 @@ enum // // build.c // -int Q_buildnum( void ); int Q_buildnum_iso( const char *date ); -int Q_buildnum_compat( void ); + +// to use build information, add "build_vcs" to dependencies +int Q_buildnum( void ); extern const char *g_buildcommit; extern const char *g_buildbranch; -extern const char *g_build_date; extern const char *g_buildcommit_date; +static inline int Q_buildnum_compat( void ) +{ + // this magical number below is Xash3D base build number + // as Xash3D isn't in development anymore, + // it's probably gonna stay at this number forever + return 4529; +} + + // // crtlib.c // diff --git a/public/wscript b/public/wscript index 17eceec4..3ec27ad5 100644 --- a/public/wscript +++ b/public/wscript @@ -146,7 +146,7 @@ def build(bld): bld.stlib(source = bld.path.ant_glob('*.c', excl='build_vcs.c'), target = 'public', - use = 'sdk_includes werror build_vcs') + use = 'sdk_includes werror') if bld.env.TESTS: tests = {