Don't export util/mktar.sh
[openssl.git] / util / mkrc.pl
index b98a6946ca947b26e368247ab9b3934ff994f50d..6762bc4a5698e085a099c4518381e37e2ba21632 100755 (executable)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
 #! /usr/bin/env perl
-# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
 #
 # Licensed under the OpenSSL license (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
 #
 # Licensed under the OpenSSL license (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
@@ -39,13 +39,14 @@ while (<FD>) {
 close(FD);
 
 my $filename = $ARGV[0];
 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>
 
 print <<___;
 #include <winver.h>
 
@@ -61,7 +62,7 @@ LANGUAGE 0x09,0x01
   FILEFLAGS 0x00L
 #endif
   FILEOS VOS__WINDOWS32
   FILEFLAGS 0x00L
 #endif
   FILEOS VOS__WINDOWS32
-  FILETYPE VFT_DLL
+  FILETYPE $vft
   FILESUBTYPE 0x0L
 BEGIN
     BLOCK "StringFileInfo"
   FILESUBTYPE 0x0L
 BEGIN
     BLOCK "StringFileInfo"
@@ -69,16 +70,16 @@ BEGIN
         BLOCK "040904b0"
         BEGIN
             // Required:
         BLOCK "040904b0"
         BEGIN
             // Required:
-            VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
+            VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\\0"
             VALUE "FileDescription", "$description\\0"
             VALUE "FileVersion", "$version\\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 "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"
             //VALUE "LegalTrademarks", "\\0"
             //VALUE "PrivateBuild", "\\0"
             //VALUE "SpecialBuild", "\\0"