libopenmpt_version.rc 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. #include "svn_version.h"
  2. #include "libopenmpt_version.h"
  3. #include <winver.h>
  4. #if 0
  5. // defined externally by build system
  6. #define MPT_BUILD_VER_FILENAME "libopenmpt.dll"
  7. #define MPT_BUILD_VER_FILEDESC "libopenmpt"
  8. #undef MPT_BUILD_VER_EXE
  9. #define MPT_BUILD_VER_DLL 1
  10. #define MPT_BUILD_VER_SPECIAL_PREFIX ""
  11. #define MPT_BUILD_VER_SPECIAL_SUFFIX ""
  12. #endif
  13. #if defined(MPT_BUILD_VER_FILENAME) && (defined(MPT_BUILD_VER_EXE) || defined(MPT_BUILD_VER_DLL))
  14. //#if defined(OPENMPT_VERSION_REVISION) && defined(OPENMPT_VERSION_DIRTY) && defined(OPENMPT_VERSION_MIXEDREVISIONS) && defined(OPENMPT_VERSION_IS_PACKAGE)
  15. //#if (OPENMPT_VERSION_REVISION > 0)
  16. #if defined(OPENMPT_VERSION_REVISION)
  17. #if (OPENMPT_VERSION_REVISION > 0)
  18. #define OPENMPT_VERSION_HAVE_REVISION
  19. #endif
  20. #endif
  21. #define VER_STRINGIZE_HELPER(x) #x
  22. #define VER_STRINGIZE(x) VER_STRINGIZE_HELPER(x)
  23. #if defined(OPENMPT_VERSION_DIRTY) && defined(OPENMPT_VERSION_MIXEDREVISIONS) && defined(OPENMPT_VERSION_IS_PACKAGE)
  24. #if (OPENMPT_VERSION_DIRTY)
  25. #define VER_FILEVERSION_SRC 2
  26. #elif (OPENMPT_VERSION_MIXEDREVISIONS)
  27. #define VER_FILEVERSION_SRC 1
  28. #elif (OPENMPT_VERSION_IS_PACKAGE)
  29. #define VER_FILEVERSION_SRC 0
  30. #else
  31. #define VER_FILEVERSION_SRC 0
  32. #endif
  33. #else
  34. #define VER_FILEVERSION_SRC 0
  35. #endif
  36. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  37. #define VER_FILEVERSION OPENMPT_API_VERSION_MAJOR,OPENMPT_API_VERSION_MINOR,OPENMPT_API_VERSION_PATCH,OPENMPT_VERSION_REVISION
  38. #define VER_FILEVERSION1_STR OPENMPT_API_VERSION_STRING
  39. #else
  40. #define VER_FILEVERSION OPENMPT_API_VERSION_MAJOR,OPENMPT_API_VERSION_MINOR,OPENMPT_API_VERSION_PATCH,0
  41. #define VER_FILEVERSION1_STR OPENMPT_API_VERSION_STRING
  42. #endif
  43. #if defined(OPENMPT_VERSION_DIRTY) && defined(OPENMPT_VERSION_MIXEDREVISIONS) && defined(OPENMPT_VERSION_IS_PACKAGE)
  44. #if (OPENMPT_VERSION_DIRTY)
  45. #if (OPENMPT_VERSION_IS_PACKAGE)
  46. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  47. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION) "modified.pkg"
  48. #else
  49. #define VER_FILEVERSION2_STR "+modified.pkg"
  50. #endif
  51. #else
  52. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  53. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION) ".modified"
  54. #else
  55. #define VER_FILEVERSION2_STR "+modified"
  56. #endif
  57. #endif
  58. #elif (OPENMPT_VERSION_MIXEDREVISIONS)
  59. #if (OPENMPT_VERSION_IS_PACKAGE)
  60. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  61. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION) ".modified.pkg"
  62. #else
  63. #define VER_FILEVERSION2_STR "+modified.pkg"
  64. #endif
  65. #else
  66. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  67. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION) ".modified"
  68. #else
  69. #define VER_FILEVERSION2_STR "+modified"
  70. #endif
  71. #endif
  72. #elif (OPENMPT_VERSION_IS_PACKAGE)
  73. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  74. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION) "pkg"
  75. #else
  76. #define VER_FILEVERSION2_STR "+pkg"
  77. #endif
  78. #else
  79. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  80. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION)
  81. #else
  82. #define VER_FILEVERSION2_STR ""
  83. #endif
  84. #endif
  85. #else
  86. #if defined(OPENMPT_VERSION_HAVE_REVISION)
  87. #define VER_FILEVERSION2_STR "+r" VER_STRINGIZE(OPENMPT_VERSION_REVISION)
  88. #else
  89. #define VER_FILEVERSION2_STR ""
  90. #endif
  91. #endif
  92. #define VER_FILEVERSION_STR VER_FILEVERSION1_STR VER_FILEVERSION2_STR
  93. #ifdef _DEBUG
  94. #define VER_DEBUG VS_FF_DEBUG
  95. #else
  96. #define VER_DEBUG 0
  97. #endif
  98. #if defined(OPENMPT_VERSION_DIRTY) && defined(OPENMPT_VERSION_MIXEDREVISIONS)
  99. #if ((OPENMPT_VERSION_DIRTY) || (OPENMPT_VERSION_MIXEDREVISIONS))
  100. #define VER_PATCHED VS_FF_PATCHED
  101. #else
  102. #define VER_PATCHED 0
  103. #endif
  104. #else
  105. #define VER_PATCHED 0
  106. #endif
  107. #if (OPENMPT_API_VERSION_IS_PREREL)
  108. #define VER_PRERELEASE VS_FF_PRERELEASE
  109. #else
  110. #define VER_PRERELEASE 0
  111. #endif
  112. #if defined(OPENMPT_VERSION_REVISION) && defined(OPENMPT_VERSION_DIRTY) && defined(OPENMPT_VERSION_MIXEDREVISIONS) && defined(OPENMPT_VERSION_IS_PACKAGE)
  113. #if (OPENMPT_VERSION_REVISION > 0)
  114. #define VER_PRIVATEBUILD 0
  115. #define VER_PRIVATEBUILD_STR ""
  116. #else
  117. #define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD
  118. #define VER_PRIVATEBUILD_STR "unknwon"
  119. #endif
  120. #else
  121. #define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD
  122. #define VER_PRIVATEBUILD_STR "unknwon"
  123. #endif
  124. #if defined(MPT_BUILD_RETRO) || defined(MPT_BUILD_VER_SPECIAL_PREFIX) || defined(MPT_BUILD_VER_SPECIAL_SUFFIX)
  125. #ifndef MPT_BUILD_VER_SPECIAL_PREFIX
  126. #define MPT_BUILD_VER_SPECIAL_PREFIX ""
  127. #endif
  128. #ifndef MPT_BUILD_VER_SPECIAL_SUFFIX
  129. #define MPT_BUILD_VER_SPECIAL_SUFFIX ""
  130. #endif
  131. #define VER_SPECIALBUILD VS_FF_SPECIALBUILD
  132. #if defined(MPT_BUILD_RETRO)
  133. #define VER_SPECIALBUILD_STR MPT_BUILD_VER_SPECIAL_PREFIX "+retro" MPT_BUILD_VER_SPECIAL_SUFFIX
  134. #else
  135. #define VER_SPECIALBUILD_STR MPT_BUILD_VER_SPECIAL_PREFIX MPT_BUILD_VER_SPECIAL_SUFFIX
  136. #endif
  137. #elif defined(MPT_BUILD_VER_SPECIAL_PREFIX) || defined(MPT_BUILD_VER_SPECIAL_SUFFIX)
  138. #define VER_SPECIALBUILD 1
  139. #define VER_SPECIALBUILD_STR MPT_BUILD_VER_SPECIAL_PREFIX MPT_BUILD_VER_SPECIAL_SUFFIX
  140. #else
  141. #define VER_SPECIALBUILD 0
  142. #define VER_SPECIALBUILD_STR ""
  143. #endif
  144. #define VER_FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
  145. #define VER_FILEFLAGS (VER_DEBUG|VER_PATCHED|VER_PRERELEASE|VER_PRIVATEBUILD|VER_SPECIALBUILD)
  146. #if defined(MPT_BUILD_VER_EXE)
  147. #define VER_FILETYPE VFT_APP
  148. #elif defined(MPT_BUILD_VER_DLL)
  149. #define VER_FILETYPE VFT_DLL
  150. #else
  151. #define VER_FILETYPE VFT_UNKNOWN
  152. #endif
  153. #define VER_FILENAME_STR MPT_BUILD_VER_FILENAME
  154. #if defined(MPT_BUILD_VER_FILEDESC)
  155. #define VER_FILEDESC_STR MPT_BUILD_VER_FILEDESC
  156. #else
  157. #define VER_FILEDESC_STR MPT_BUILD_VER_FILENAME
  158. #endif
  159. VS_VERSION_INFO VERSIONINFO
  160. FILEVERSION VER_FILEVERSION
  161. PRODUCTVERSION VER_FILEVERSION
  162. FILEFLAGSMASK VER_FILEFLAGSMASK
  163. FILEFLAGS VER_FILEFLAGS
  164. FILEOS VOS_NT_WINDOWS32
  165. FILETYPE VER_FILETYPE
  166. FILESUBTYPE 0x0L
  167. BEGIN
  168. BLOCK "StringFileInfo"
  169. BEGIN
  170. BLOCK "040904b0"
  171. BEGIN
  172. VALUE "CompanyName", "OpenMPT (https://openmpt.org)"
  173. VALUE "FileDescription", VER_FILEDESC_STR
  174. VALUE "FileVersion", VER_FILEVERSION_STR
  175. VALUE "InternalName", VER_FILENAME_STR
  176. VALUE "LegalCopyright", "Copyright © 2004-2022 OpenMPT Project Developers and Contributors, Copyright © 1997-2003 Olivier Lapicque"
  177. VALUE "OriginalFilename", VER_FILENAME_STR
  178. VALUE "ProductName", "libopenmpt"
  179. VALUE "ProductVersion", VER_FILEVERSION_STR
  180. #if VER_PRIVATEBUILD
  181. VALUE "PrivateBuild", VER_PRIVATEBUILD_STR
  182. #endif
  183. #if VER_SPECIALBUILD
  184. VALUE "SpecialBuild", VER_SPECIALBUILD_STR
  185. #endif
  186. END
  187. END
  188. BLOCK "VarFileInfo"
  189. BEGIN
  190. VALUE "Translation", 0x409, 1200
  191. END
  192. END
  193. //#endif
  194. //#endif
  195. #endif