Files
VVVVVV/desktop_version/src/ReleaseVersion.h
NyakoFox 9256100cb9 Add ifversion
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.
2025-11-20 21:32:57 -05:00

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 */