summaryrefslogtreecommitdiffstats
path: root/util/mkrc.pl
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2018-03-22 10:21:33 -0400
committerRich Salz <rsalz@openssl.org>2018-03-22 10:53:22 -0400
commit8390062853513e1b42cac98078db184bc6100ca7 (patch)
tree78860aba4103eb313e2e58b2e0bfffc05baa38bf /util/mkrc.pl
parentb9499cf8de17d1d7efd4ad135beb74d5dec8e120 (diff)
Fix resource files
Add it to apps as well as libraries. Fix the copyright year generation. Thanks to user RTT for pointing this out. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5704)
Diffstat (limited to 'util/mkrc.pl')
-rwxr-xr-xutil/mkrc.pl19
1 files changed, 10 insertions, 9 deletions
diff --git a/util/mkrc.pl b/util/mkrc.pl
index b98a6946ca..08b0af1a7a 100755
--- a/util/mkrc.pl
+++ b/util/mkrc.pl
@@ -39,13 +39,14 @@ while (<FD>) {
close(FD);
my $filename = $ARGV[0];
-$filename =~ /(.*)\.([^.]+)$/;
-my $basename = $1;
-my $extname = $2;
-
-my $description = "OpenSSL application";
-$description = "OpenSSL shared library" if $extname =~ /dll/i;
+my $description = "OpenSSL library";
+my $vft = "VFT_DLL";
+if ( $filename =~ /openssl/i ) {
+ $description = "OpenSSL application";
+ $vft = "VFT_APP";
+}
+my $YEAR = [localtime()]->[5] + 1900;
print <<___;
#include <winver.h>
@@ -61,7 +62,7 @@ LANGUAGE 0x09,0x01
FILEFLAGS 0x00L
#endif
FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
+ FILETYPE $vft
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
@@ -72,13 +73,13 @@ BEGIN
VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
VALUE "FileDescription", "$description\\0"
VALUE "FileVersion", "$version\\0"
- VALUE "InternalName", "$basename\\0"
+ VALUE "InternalName", "$filename\\0"
VALUE "OriginalFilename", "$filename\\0"
VALUE "ProductName", "The OpenSSL Toolkit\\0"
VALUE "ProductVersion", "$version\\0"
// Optional:
//VALUE "Comments", "\\0"
- VALUE "LegalCopyright", "Copyright 1998-2016 The OpenSSL Authors. All rights reserved.\\0"
+ VALUE "LegalCopyright", "Copyright 1998-$YEAR The OpenSSL Authors. All rights reserved.\\0"
//VALUE "LegalTrademarks", "\\0"
//VALUE "PrivateBuild", "\\0"
//VALUE "SpecialBuild", "\\0"