Warning, /office/kexi/src/KexiVersion.h.cmake is written in an unsupported language. File is not indexed.
0001 /* This file is part of the KDE project 0002 Copyright (c) 2003-2016 Kexi Team <kexi@kde.org> 0003 0004 Version information based on calligraversion.h, 0005 Copyright (c) 2003 David Faure <faure@kde.org> 0006 Copyright (c) 2003 Lukas Tinkl <lukas@kde.org> 0007 Copyright (c) 2004 Nicolas Goutte <goutte@kde.org> 0008 0009 This library is free software; you can redistribute it and/or 0010 modify it under the terms of the GNU Library General Public 0011 License as published by the Free Software Foundation; either 0012 version 2 of the License, or (at your option) any later version. 0013 0014 This library is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0017 Library General Public License for more details. 0018 0019 You should have received a copy of the GNU Library General Public License 0020 along with this library; see the file COPYING.LIB. If not, write to 0021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0022 * Boston, MA 02110-1301, USA. 0023 */ 0024 0025 #ifndef KEXIVERSION_H 0026 #define KEXIVERSION_H 0027 0028 #include <core/kexicore_export.h> 0029 0030 // -- WARNING: do not edit values below, instead edit constants in SetKexiVersionInfo.cmake 0031 0032 class QString; 0033 0034 #define KEXI_APP_NAME "Kexi" 0035 0036 /** 0037 * @def KEXI_VERSION_STRING 0038 * @ingroup KexiMacros 0039 * @brief Version of Kexi as string, at compile time 0040 * 0041 * This macro contains the Kexi version in string form. As it is a macro, 0042 * it contains the version at compile time. See Kexi::versionString() if you need 0043 * a version used at runtime. 0044 * 0045 * @note The version string might contain spaces and special characters, 0046 * especially for development versions of Kexi. 0047 * If you use that macro directly for a file format (e.g. OASIS Open Document) 0048 * or for a protocol (e.g. http) be careful that it is appropriate. 0049 * (Fictional) example: "3.0 Alpha" 0050 */ 0051 #define KEXI_VERSION_STRING "@PROJECT_VERSION_STRING@" 0052 0053 /** 0054 * @def KEXI_VERSION_MAJOR_MINOR_RELEASE 0055 * @ingroup KexiMacros 0056 * @brief Version string containing "major.minor.release" 0057 * @brief Version of Kexi as string, at compile time 0058 * 0059 * This macro contains the Kexi version in string form. As it is a macro, 0060 * it contains the version at compile time. 0061 * 0062 * @note The version string never contains spaces or special characters. 0063 */ 0064 #define KEXI_VERSION_MAJOR_MINOR_RELEASE "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_RELEASE@" 0065 0066 /** 0067 * @def KEXI_STABLE_VERSION_MAJOR 0068 * @ingroup KexiMacros 0069 * @brief Major version of stable Kexi, at compile time 0070 * KEXI_VERSION_MAJOR is computed based on this value. 0071 */ 0072 #define KEXI_STABLE_VERSION_MAJOR @PROJECT_STABLE_VERSION_MAJOR@ 0073 0074 /** 0075 * @def KEXI_VERSION_MAJOR 0076 * @ingroup KexiMacros 0077 * @brief Major version of Kexi, at compile time 0078 * 0079 * Generally it's the same as KEXI_STABLE_VERSION_MAJOR but for unstable x.0 0080 * x is decreased by one, e.g. 3.0 Beta 1 is 2.91. 0081 */ 0082 #define KEXI_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ 0083 0084 /** 0085 * @def KEXI_STABLE_VERSION_MINOR 0086 * @ingroup KexiMacros 0087 * @brief Minor version of stable Kexi, at compile time 0088 * KEXI_VERSION_MINOR is computed based on this value. 0089 */ 0090 #define KEXI_STABLE_VERSION_MINOR @PROJECT_STABLE_VERSION_MINOR@ 0091 0092 /** 0093 * @def KEXI_VERSION_MINOR 0094 * @ingroup KexiMacros 0095 * @brief Minor version of Kexi, at compile time 0096 * 0097 * Generally it's equal to KEXI_STABLE_VERSION_MINOR for stable releases, 0098 * equal to 9x for x.0 unstable releases (e.g. 3.0 Beta 1 has minor version 91). 0099 */ 0100 #define KEXI_VERSION_MINOR @PROJECT_VERSION_MINOR@ 0101 0102 /** 0103 * @def KEXI_VERSION_RELEASE 0104 * @ingroup KexiMacros 0105 * @brief Release version of Kexi, at compile time. 0106 * 90 for Alpha. 0107 */ 0108 #define KEXI_VERSION_RELEASE @PROJECT_VERSION_RELEASE@ 0109 0110 /** 0111 * @def KEXI_STABLE_VERSION_RELEASE 0112 * @ingroup KexiMacros 0113 * @brief Release version of Kexi, at compile time. 0114 * 0115 * Equal to KEXI_VERSION_RELEASE for stable releases and 0 for unstable ones. 0116 */ 0117 #define KEXI_STABLE_VERSION_RELEASE @PROJECT_STABLE_VERSION_RELEASE@ 0118 0119 /** 0120 * @def KEXI_ALPHA 0121 * @ingroup KexiMacros 0122 * @brief If defined (1), indicates at compile time that Kexi is in alpha stage 0123 */ 0124 #cmakedefine KEXI_ALPHA @KEXI_ALPHA@ 0125 0126 /** 0127 * @def KEXI_BETA 0128 * @ingroup KexiMacros 0129 * @brief If defined (1, 2..), indicates at compile time that Kexi is in beta stage 0130 */ 0131 #cmakedefine KEXI_BETA @KEXI_BETA@ 0132 0133 /** 0134 * @def KEXI_RC 0135 * @ingroup KexiMacros 0136 * @brief If defined (1, 2..), indicates at compile time that Kexi is in "release candidate" stage 0137 */ 0138 #cmakedefine KEXI_RC @KEXI_RC@ 0139 0140 /** 0141 * @def KEXI_STABLE 0142 * @ingroup KexiMacros 0143 * @brief If defined, indicates at compile time that Kexi is in stable stage 0144 */ 0145 #cmakedefine KEXI_STABLE @KEXI_STABLE@ 0146 0147 /** 0148 * @def KEXI_STAGE 0149 * @ingroup KexiMacros 0150 * @brief Release stage (number) for Kexi, e.g. 1 for Beta 1, 2 for 3.3.2, etc. 0151 */ 0152 #define KEXI_STAGE @KEXI_STAGE@ 0153 0154 /** 0155 * @ingroup KexiMacros 0156 * @brief Make a number from the major, minor and release number of a Kexi version 0157 * 0158 * This function can be used for preprocessing when KEXI_IS_VERSION is not 0159 * appropriate. 0160 */ 0161 #define KEXI_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c)) 0162 0163 /** 0164 * @ingroup KexiMacros 0165 * @brief Version of Kexi as number, at compile time 0166 * 0167 * This macro contains the Kexi version in number form. As it is a macro, 0168 * it contains the version at compile time. See version() if you need 0169 * the Kexi version used at runtime. 0170 */ 0171 #define KEXI_VERSION \ 0172 KEXI_MAKE_VERSION(KEXI_VERSION_MAJOR,KEXI_VERSION_MINOR,KEXI_VERSION_RELEASE) 0173 0174 /** 0175 * @ingroup KexiMacros 0176 * @brief Check if the Kexi version matches a certain version or is higher 0177 * 0178 * This macro is typically used to compile conditionally a part of code: 0179 * @code 0180 * #if KEXI_IS_VERSION(2,3,0) 0181 * // Code for Kexi 2.3.0 0182 * #else 0183 * // Code for older Kexi 0184 * #endif 0185 * @endcode 0186 * 0187 * @warning Especially during development phases of Kexi, be careful 0188 * when choosing the version number that you are checking against. 0189 * Otherwise you might risk to break the next Kexi release. 0190 * Therefore be careful that development version have a 0191 * version number lower than the released version, so do not check 0192 * e.g. for Kexi 4.3 with KEXI_IS_VERSION(4,3,0) 0193 * but with the actual version number at a time a needed feature was introduced, e.g. 4.3.2. 0194 */ 0195 #define KEXI_IS_VERSION(a,b,c) ( KEXI_VERSION >= KEXI_MAKE_VERSION(a,b,c) ) 0196 0197 /** 0198 * @def KEXI_YEAR 0199 * @ingroup KexiMacros 0200 * @brief Year of the Kexi release, set at compile time 0201 * 0202 * This macro is used in "About application" dialog for strings such as "© 2012-..., The Author Team". 0203 */ 0204 #cmakedefine KEXI_YEAR "@KEXI_YEAR@" 0205 0206 /** 0207 * @def KEXI_GIT_SHA1_STRING 0208 * @ingroup KexiMacros 0209 * @brief Indicates the git sha1 commit which was used for compilation of Kexi 0210 */ 0211 #cmakedefine KEXI_GIT_SHA1_STRING "@KEXI_GIT_SHA1_STRING@" 0212 0213 /** 0214 * @def KEXI_GIT_BRANCH_STRING 0215 * @ingroup KexiMacros 0216 * @brief Indicates the git branch name which was used for compilation of Kexi 0217 */ 0218 #cmakedefine KEXI_GIT_BRANCH_STRING "@KEXI_GIT_BRANCH_STRING@" 0219 0220 /** 0221 * @def KEXI_DISTRIBUTION_VERSION 0222 * @ingroup KexiMacros 0223 * @brief Name of Kexi version useful to construct co-installabile releases 0224 * By default is it equal to KEXI_STABLE_VERSION_MAJOR.KEXI_STABLE_VERSION_MINOR. 0225 * It can be changed at configure stage by setting the KEXI_CUSTOM_DISTRIBUTION_VERSION 0226 * CMake variable. 0227 * @see KEXI_BASE_PATH 0228 */ 0229 #cmakedefine KEXI_DISTRIBUTION_VERSION "@KEXI_DISTRIBUTION_VERSION@" 0230 0231 /** 0232 * @def KEXI_BASE_PATH 0233 * @ingroup KexiMacros 0234 * @brief Relative path name useful to construct co-installabile file names and paths 0235 * It is equal to "kexi/N" where N is KEXI_DISTRIBUTION_VERSION. 0236 */ 0237 #cmakedefine KEXI_BASE_PATH "@KEXI_BASE_PATH@" 0238 0239 /** 0240 * Namespace for general Kexi functions. 0241 */ 0242 namespace Kexi 0243 { 0244 /** 0245 * Returns the encoded number of Kexi's version, see the KEXI_VERSION macro. 0246 * In contrary to that macro this function returns the number of the actually 0247 * installed Kexi version, not the number of the Kexi version that was 0248 * installed when the program was compiled. 0249 * @return the version number, encoded in a single int 0250 */ 0251 KEXICORE_EXPORT unsigned int version(); 0252 /** 0253 * Returns the major number of Kexi's version, e.g. 0254 * 1 for Kexi 1.2.3. 0255 * @return the major version number 0256 */ 0257 KEXICORE_EXPORT unsigned int versionMajor(); 0258 /** 0259 * Returns the minor number of Kexi's version, e.g. 0260 * 2 for Kexi 1.2.3. 0261 * @return the minor version number 0262 */ 0263 KEXICORE_EXPORT unsigned int versionMinor(); 0264 /** 0265 * Returns the release of Kexi's version, e.g. 0266 * 3 for Kexi 1.2.3. 0267 * @return the release number 0268 */ 0269 KEXICORE_EXPORT unsigned int versionRelease(); 0270 /** 0271 * Returns the Kexi version as string, e.g. "1.2.3" 0272 * Sometimes it may be even something like "1.2.3 beta 2" 0273 * @return the Kexi version. You can keep the string forever 0274 */ 0275 KEXICORE_EXPORT const char *versionString(); 0276 /** 0277 * @return the Kexi version string (versionString()) but appends extra information 0278 * such as "(git 4e06281 master)" if available. 0279 */ 0280 KEXICORE_EXPORT const char *fullVersionString(); 0281 /** 0282 * Returns the encoded number of stable Kexi's version. 0283 * For 2.3.1 it returns 2.3.1, for 2.5.70 returns 2.6.0, for 2.9.70 returns 3.0.0. 0284 * In contrary to KEXI_STABLE_VERSION macro this function returns the number 0285 * of the actually installed Kexi version, not the number of the Kexi version that was 0286 * installed when the program was compiled. 0287 * @return the version number, encoded in a single int 0288 * @see Kexi::version() 0289 * @see KEXI_STABLE_VERSION 0290 */ 0291 KEXICORE_EXPORT unsigned int stableVersion(); 0292 /** 0293 * Returns the major number of stable Kexi's version, e.g. 0294 * 1 for Kexi 1.2.3. 0295 * @return the major stable version number 0296 */ 0297 KEXICORE_EXPORT unsigned int stableVersionMajor(); 0298 /** 0299 * Returns the minor number of stable Kexi's version, e.g. 0300 * 2 for Kexi 1.2.3. 0301 * @return the minor stable version number 0302 */ 0303 KEXICORE_EXPORT unsigned int stableVersionMinor(); 0304 /** 0305 * Returns the release of stable Kexi's version, e.g. 0306 * 3 for Kexi 1.2.3. 0307 * @return the release stable version number 0308 */ 0309 KEXICORE_EXPORT unsigned int stableVersionRelease(); 0310 /** 0311 * Returns the stable Kexi version as string, e.g. "1.2.3" 0312 * It never contains alpha, beta or rc part. 0313 * @return the stable Kexi version. 0314 */ 0315 KEXICORE_EXPORT QString stableVersionString(); 0316 } 0317 0318 #endif