mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
This command adds `ifversion`, as both a simplified and internal command. The system works like so: - `ifversion(2.6,script2)` -> If you're on 2.6.0 or greater - `ifversion(2.6.0,script2)` -> Same as above - `ifversion(2.6.3,script2)` -> You're using 2.6.3 or greater - `ifversion(2.5,script2)` -> You're using 2.5 or greater - `ifversion(2,script2)` -> You're using 2.0.0 or greater (yep...) `ReleaseVersion.h` has a few new defines to make this possible, being `MAJOR_VERSION`, `MINOR_VERSION` and `PATCH_VERSION`. With the help of a few macros, `RELEASE_VERSION` is now constructed using those.
18 lines
469 B
C
18 lines
469 B
C
#ifndef RELEASEVERSION_H
|
|
#define RELEASEVERSION_H
|
|
|
|
#define MAJOR_VERSION 2
|
|
#define MINOR_VERSION 5
|
|
#define PATCH_VERSION 0
|
|
|
|
#define VVV_STRINGIFY(x) #x
|
|
#define VVV_TOSTRING(x) VVV_STRINGIFY(x)
|
|
|
|
#if PATCH_VERSION == 0
|
|
#define RELEASE_VERSION "v" VVV_TOSTRING(MAJOR_VERSION) "." VVV_TOSTRING(MINOR_VERSION)
|
|
#else
|
|
#define RELEASE_VERSION "v" VVV_TOSTRING(MAJOR_VERSION) "." VVV_TOSTRING(MINOR_VERSION) "." VVV_TOSTRING(PATCH_VERSION)
|
|
#endif
|
|
|
|
#endif /* RELEASEVERSION_H */
|