2
0

mkrc.pl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #! /usr/bin/env perl
  2. # Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. use strict;
  9. use warnings;
  10. use lib ".";
  11. use configdata;
  12. my $cversion = "$config{major},$config{minor},$config{patch}";
  13. my $version = "$config{major}.$config{minor}.$config{patch}$config{prerelease}$config{build_metadata}";
  14. my $filename = $ARGV[0];
  15. my $description = "OpenSSL library";
  16. my $vft = "VFT_DLL";
  17. if ( $filename =~ /openssl/i ) {
  18. $description = "OpenSSL application";
  19. $vft = "VFT_APP";
  20. }
  21. my $YEAR = [localtime()]->[5] + 1900;
  22. print <<___;
  23. #include <winver.h>
  24. LANGUAGE 0x09,0x01
  25. 1 VERSIONINFO
  26. FILEVERSION $cversion
  27. PRODUCTVERSION $cversion
  28. FILEFLAGSMASK 0x3fL
  29. #ifdef _DEBUG
  30. FILEFLAGS 0x01L
  31. #else
  32. FILEFLAGS 0x00L
  33. #endif
  34. FILEOS VOS__WINDOWS32
  35. FILETYPE $vft
  36. FILESUBTYPE 0x0L
  37. BEGIN
  38. BLOCK "StringFileInfo"
  39. BEGIN
  40. BLOCK "040904b0"
  41. BEGIN
  42. // Required:
  43. VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\\0"
  44. VALUE "FileDescription", "$description\\0"
  45. VALUE "FileVersion", "$version\\0"
  46. VALUE "InternalName", "$filename\\0"
  47. VALUE "OriginalFilename", "$filename\\0"
  48. VALUE "ProductName", "The OpenSSL Toolkit\\0"
  49. VALUE "ProductVersion", "$version\\0"
  50. // Optional:
  51. //VALUE "Comments", "\\0"
  52. VALUE "LegalCopyright", "Copyright 1998-$YEAR The OpenSSL Authors. All rights reserved.\\0"
  53. //VALUE "LegalTrademarks", "\\0"
  54. //VALUE "PrivateBuild", "\\0"
  55. //VALUE "SpecialBuild", "\\0"
  56. END
  57. END
  58. BLOCK "VarFileInfo"
  59. BEGIN
  60. VALUE "Translation", 0x409, 0x4b0
  61. END
  62. END
  63. ___