Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

215 lines
9.8 KiB

  1. /*
  2. (C) Copyright 1999
  3. All rights reserved.
  4. Portions of this software are:
  5. (C) Copyright 1997 TriplePoint, Inc. -- http://www.TriplePoint.com
  6. License to use this software is granted under the same terms
  7. outlined in the Microsoft Windows Device Driver Development Kit.
  8. @doc INTERNAL TpiBuild vProduct vProduct_h
  9. @module vProduct.h |
  10. This module defines the product version information. It is included by
  11. all the target components of the project by including <f vTarget\.h>.
  12. <f Note>:
  13. This file should not be changed. The definitions used by this file
  14. are defined in <f vVendor\.h>, <f vTarget\.h>, <f vProdNum\.h>, and
  15. <f vTargNum\.h>
  16. @head3 Contents |
  17. @index class,mfunc,func,msg,mdata,struct,enum | vProduct_h
  18. @end
  19. */
  20. /* @doc EXTERNAL INTERNAL
  21. @topic Versioning Overview |
  22. This section describes the interfaces defined in <f vProduct\.h>,
  23. <f vVendor\.h>, <f vTarget\.h>, <f vProdNum\.h>, and <f vTargNum\.h>
  24. A module is usually just one component of an entire product, so we've
  25. defined the versioning information for the module so that it can be
  26. easily included into a complete product package.
  27. @flag <f vTarget\.rc> |
  28. Included this into your module specific rc file. Do not change.
  29. You must remove any existing versioning information from your rc file.
  30. Place this file in a common include directory for the product.
  31. @flag <f vTarget\.h> |
  32. Defines the module specific version information such as file name, type, etc.
  33. One of these files would exist for each component included in your product.
  34. @flag <f vTargNum\.h> |
  35. Is meant to be updated whenever you make a change to a specific module.
  36. One of these files would exist for each component included in your product.
  37. This is separated from the rest of the versioning files so it can be easily
  38. updated with a tool or script.
  39. @flag <f vVendor\.h> |
  40. Defines the vendor specific version information such as company name,
  41. copyright. etc. It is separate to allow easier OEM customization.
  42. Place this file in a common include directory for the product.
  43. @flag <f vProdNum\.h> |
  44. Is meant to be updated whenever you release a new product version.
  45. This is separated from the rest of the versioning files so it can be easily
  46. updated with a tool or script.
  47. Place this file in a common include directory for the product.
  48. @flag <f vLang\.h> |
  49. Defines the language to be used to record the version information.
  50. If this file is modified for another language, you will generally have
  51. to create localized versions of the vVendor.h and vTarget.h files as well.
  52. Place this file in a common include directory for the product.
  53. @flag <f vProduct\.rc> |
  54. Is included by <f vTarget\.rc>. Do not change.
  55. Place this file in a common include directory for the product.
  56. @flag <f vProduct\.h> |
  57. Is included by <f vTarget\.h>. You should not change this file unless you
  58. want to change the way version numbers are represented for all modules in
  59. your product.
  60. Place this file in a common include directory for the product.
  61. */
  62. #ifndef _VPRODUCT_H_
  63. #define _VPRODUCT_H_
  64. #if !defined(_VTARGET_H_)
  65. # error You should not include vProduct.h directly, include vTarget.h instead.
  66. #endif
  67. // Only include winver.h if RC_INVOKED. Otherwise we don't need it.
  68. #if defined(RC_INVOKED)
  69. # if defined(WIN32)
  70. # include <winver.h>
  71. # else
  72. # include <ver.h>
  73. # endif
  74. #endif
  75. #include "vVendor.h" // Edit this file to change vendor specific information
  76. #include "vLang.h" // Edit this file to change language specific information
  77. // The following file should be included from the target's include directory
  78. #include "vTargNum.h" // Target version information
  79. #if !defined(VER_FILE_MAJOR_NUM) || !defined(VER_FILE_MINOR_NUM) || \
  80. !defined(VER_FILE_SUB_MINOR_NUM)
  81. # error Your vTargNum.h file is corrupt or missing required VER_xxx_NUM fields.
  82. #endif
  83. #if !defined(VER_FILE_MAJOR_STR) || !defined(VER_FILE_MINOR_STR) || \
  84. !defined(VER_FILE_SUB_MINOR_STR)
  85. # error Your vTargNum.h file is corrupt or missing required VER_xxx_STR fields.
  86. #endif
  87. // The following file should be included from the project's include directory
  88. #include "vProdNum.h" // Product version and build information
  89. #if !defined(VER_PRODUCT_MAJOR_NUM) || !defined(VER_PRODUCT_MINOR_NUM) || \
  90. !defined(VER_PRODUCT_SUB_MINOR_NUM) || !defined(VER_PRODUCT_BUILD_NUM)
  91. # error Your vProdNum.h file is corrupt or missing required VER_xxx_NUM fields.
  92. #endif
  93. #if !defined(VER_PRODUCT_MAJOR_STR) || !defined(VER_PRODUCT_MINOR_STR) || \
  94. !defined(VER_PRODUCT_SUB_MINOR_STR) || !defined(VER_PRODUCT_BUILD_STR)
  95. # error Your vProdNum.h file is corrupt or missing required VER_xxx_STR fields.
  96. #endif
  97. // Macro used to force C preprocessor to concatenate string defines
  98. #define DEFINE_STRING(STR) STR
  99. // Macro to make this stuff easier to read.
  100. #define VER_STR_CAT(sep,maj,min,sub,bld) maj sep min sep sub sep bld
  101. // PRODUCT version information is displayed in the About box of each
  102. // component and is stored in the registry during installation.
  103. // The About box code must get the value from the registry instead of
  104. // using these macros in order to get the currently installed version.
  105. // Therefore, these macros should only be used by the installer.
  106. #define VER_PRODUCT_VERSION_NUM ((VER_PRODUCT_MAJOR_NUM << 24) | \
  107. (VER_PRODUCT_MINOR_NUM << 16) | \
  108. (VER_PRODUCT_SUB_MINOR_NUM << 8) | \
  109. VER_PRODUCT_BUILD_NUM)
  110. #define VER_PRODUCT_VERSION_NUM_RC VER_PRODUCT_MAJOR_NUM,\
  111. VER_PRODUCT_MINOR_NUM,\
  112. VER_PRODUCT_SUB_MINOR_NUM,\
  113. VER_PRODUCT_BUILD_NUM
  114. #define VER_PRODUCT_VERSION_STR VER_STR_CAT(".",\
  115. VER_PRODUCT_MAJOR_STR,\
  116. VER_PRODUCT_MINOR_STR,\
  117. VER_PRODUCT_SUB_MINOR_STR,\
  118. VER_PRODUCT_BUILD_STR)
  119. #define VER_PRODUCT_VERSION_STR_RC VER_STR_CAT(".",\
  120. VER_PRODUCT_MAJOR_STR,\
  121. VER_PRODUCT_MINOR_STR,\
  122. VER_PRODUCT_SUB_MINOR_STR,\
  123. VER_PRODUCT_BUILD_STR)
  124. // COMPONENT version information is displayed in the ProductVersion
  125. // field of a file's Windows property sheet. It is the same as the
  126. // FILE version info with the addition of the build number.
  127. #define VER_COMPONENT_VERSION_NUM ((VER_FILE_MAJOR_NUM << 24) | \
  128. (VER_FILE_MINOR_NUM << 16) | \
  129. (VER_FILE_SUB_MINOR_NUM << 8) | \
  130. VER_PRODUCT_BUILD_NUM)
  131. #define VER_COMPONENT_VERSION_NUM_RC VER_FILE_MAJOR_NUM,\
  132. VER_FILE_MINOR_NUM,\
  133. VER_FILE_SUB_MINOR_NUM,\
  134. VER_PRODUCT_BUILD_NUM
  135. #define VER_COMPONENT_VERSION_STR VER_STR_CAT(".",\
  136. VER_FILE_MAJOR_STR,\
  137. VER_FILE_MINOR_STR,\
  138. VER_FILE_SUB_MINOR_STR,\
  139. VER_PRODUCT_BUILD_STR)
  140. #define VER_COMPONENT_VERSION_STR_RC VER_STR_CAT(".",\
  141. VER_FILE_MAJOR_STR,\
  142. VER_FILE_MINOR_STR,\
  143. VER_FILE_SUB_MINOR_STR,\
  144. VER_PRODUCT_BUILD_STR)
  145. // FILE version information is an abbreviated component version info
  146. // and is displayed at the top of a file's Windows property sheet.
  147. #define VER_FILE_VERSION_NUM ((VER_FILE_MAJOR_NUM << 24) | \
  148. (VER_FILE_MINOR_NUM << 16) | \
  149. (VER_FILE_SUB_MINOR_NUM << 8) | \
  150. VER_PRODUCT_BUILD_NUM)
  151. #define VER_FILE_VERSION_NUM_RC VER_FILE_MAJOR_NUM,\
  152. VER_FILE_MINOR_NUM,\
  153. VER_FILE_SUB_MINOR_NUM,\
  154. VER_PRODUCT_BUILD_NUM
  155. #define VER_FILE_VERSION_STR VER_STR_CAT(".",\
  156. VER_FILE_MAJOR_STR,\
  157. VER_FILE_MINOR_STR,\
  158. VER_FILE_SUB_MINOR_STR,\
  159. VER_PRODUCT_BUILD_STR)
  160. #define VER_FILE_VERSION_STR_RC VER_FILE_MAJOR_STR "."\
  161. VER_FILE_MINOR_STR "."\
  162. VER_FILE_SUB_MINOR_STR
  163. #endif /* _VPRODUCT_H_ */