Commit d9a14808 authored by Jarosław Staniek's avatar Jarosław Staniek
Browse files

version macros: added automatic CALLIGRA_VERSION_RELEASE computation

Now it's enough to type the number of ALPHA/BETA/RC/STABLE release.

+ set to 2.5 alpha 1
parent f3cb061e
......@@ -33,7 +33,7 @@
* it contains the version at compile time. See Calligra::versionString() if you need
* the Calligra version used at runtime.
*/
#define CALLIGRA_VERSION_STRING "2.4 RC 1"
#define CALLIGRA_VERSION_STRING "2.5 Alpha 1"
/**
* @def CALLIGRA_VERSION_MAJOR
......@@ -43,48 +43,80 @@
#define CALLIGRA_VERSION_MAJOR 2
/**
* @def CALLIGRA_VERSION_MINOR
* @def CALLIGRA_STABLE_VERSION_MINOR
* @ingroup CalligraMacros
* @brief Minor version of Calligra, at compile time
* @brief Minor version of stable Calligra, at compile time
* CALLIGRA_VERSION_MINOR is computed based on this value.
* Unstable versions subtract 1 from this value, e.g. 2.5 Alpha has minor 4.
*/
#define CALLIGRA_VERSION_MINOR 3
#define CALLIGRA_STABLE_VERSION_MINOR 5
/**
* @def CALLIGRA_VERSION_RELEASE
* @def CALLIGRA_ALPHA
* @ingroup CalligraMacros
* @brief Release version of Calligra, at compile time
*/
#define CALLIGRA_VERSION_RELEASE 91
* @brief If defined (1..9), indicates at compile time that Calligra is in alpha stage
*/
#define CALLIGRA_ALPHA 1
/**
* @def CALLIGRA_BETA
* @ingroup CalligraMacros
* @brief Make a number from the major, minor and release number of a Calligra version
*
* This function can be used for preprocessing when CALLIGRA_IS_VERSION is not
* appropriate.
*/
#define CALLIGRA_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
* @brief If defined (1..9), indicates at compile time that Calligra is in beta stage
*/
// #define CALLIGRA_BETA 7
/**
* @def CALLIGRA_ALPHA
* @def CALLIGRA_RC
* @ingroup CalligraMacros
* @brief If defined, indicates at compile time that Calligra is in alpha stage
* @brief If defined (1..9), indicates at compile time that Calligra is in "release candidate" stage
*/
// #define CALLIGRA_ALPHA 4
// #define CALLIGRA_RC 1
/**
* @def CALLIGRA_BETA
* @def CALLIGRA_STABLE
* @ingroup CalligraMacros
* @brief If defined, indicates at compile time that Calligra is in beta stage
* @brief If defined (>=0), indicates at compile time that Calligra is in stable stage
*/
// #define CALLIGRA_BETA 7
// #define CALLIGRA_STABLE 0
// -- WARNING: do not edit values below this line --
/**
* @def CALLIGRA_RC
* @def CALLIGRA_VERSION_MINOR
* @ingroup CalligraMacros
* @brief Minor version of Calligra, at compile time
*/
#ifdef CALLIGRA_STABLE
# define CALLIGRA_VERSION_MINOR CALLIGRA_STABLE_VERSION_MINOR
#else // Unstable versions subtract 1 from this value, e.g. 2.5 Alpha has minor 4.
# define CALLIGRA_VERSION_MINOR (CALLIGRA_STABLE_VERSION_MINOR - 1)
#endif
/**
* @def CALLIGRA_VERSION_RELEASE
* @ingroup CalligraMacros
* @brief If defined, indicates at compile time that Calligra is in "release candidate" stage
* @brief Release version of Calligra, at compile time
*/
#ifdef CALLIGRA_ALPHA
# define CALLIGRA_VERSION_RELEASE (70 + CALLIGRA_ALPHA)
#elif defined CALLIGRA_BETA
# define CALLIGRA_VERSION_RELEASE (80 + CALLIGRA_BETA)
#elif defined CALLIGRA_RC
# define CALLIGRA_VERSION_RELEASE (90 + CALLIGRA_RC)
#elif defined CALLIGRA_STABLE
# define CALLIGRA_VERSION_RELEASE CALLIGRA_STABLE
#else
# error Define exactly one of these macros: CALLIGRA_ALPHA, CALLIGRA_BETA, CALLIGRA_RC, CALLIGRA_STABLE
#endif
/**
* @ingroup CalligraMacros
* @brief Make a number from the major, minor and release number of a Calligra version
*
* This function can be used for preprocessing when CALLIGRA_IS_VERSION is not
* appropriate.
*/
#define CALLIGRA_RC 1
#define CALLIGRA_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
/**
* @ingroup CalligraMacros
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment