提交 83900628 编写于 作者: R Rich Salz

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: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5704)
上级 b9499cf8
...@@ -2015,6 +2015,13 @@ EOF ...@@ -2015,6 +2015,13 @@ EOF
$o = cleanfile($buildd, $o, $blddir); $o = cleanfile($buildd, $o, $blddir);
$unified_info{sources}->{$ddest}->{$o} = 1; $unified_info{sources}->{$ddest}->{$o} = 1;
$unified_info{sources}->{$o}->{$s} = 1; $unified_info{sources}->{$o}->{$s} = 1;
} elsif ($s =~ /\.rc$/) {
# We also recognise resource files
my $o = $_;
$o =~ s/\.rc$/.res/; # Resource configuration
my $o = cleanfile($buildd, $o, $blddir);
$unified_info{sources}->{$ddest}->{$o} = 1;
$unified_info{sources}->{$o}->{$s} = 1;
} else { } else {
$unified_info{sources}->{$ddest}->{$s} = 1; $unified_info{sources}->{$ddest}->{$s} = 1;
} }
......
...@@ -23,6 +23,11 @@ IF[{- !$disabled{apps} -}] ...@@ -23,6 +23,11 @@ IF[{- !$disabled{apps} -}]
INCLUDE[openssl]=.. ../include INCLUDE[openssl]=.. ../include
DEPEND[openssl]=libapps.a ../libssl DEPEND[openssl]=libapps.a ../libssl
IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
GENERATE[openssl.rc]=../util/mkrc.pl openssl
SOURCE[openssl]=openssl.rc
ENDIF
{- join("\n ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" } {- join("\n ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" }
@apps_openssl_src) -} @apps_openssl_src) -}
GENERATE[progs.h]=progs.pl $(APPS_OPENSSL) GENERATE[progs.h]=progs.pl $(APPS_OPENSSL)
......
...@@ -17,12 +17,14 @@ use configdata qw/@disablables %unified_info/; ...@@ -17,12 +17,14 @@ use configdata qw/@disablables %unified_info/;
my %commands = (); my %commands = ();
my $cmdre = qr/^\s*int\s+([a-z_][a-z0-9_]*)_main\(\s*int\s+argc\s*,/; my $cmdre = qr/^\s*int\s+([a-z_][a-z0-9_]*)_main\(\s*int\s+argc\s*,/;
my $apps_openssl = shift @ARGV; my $apps_openssl = shift @ARGV;
my $YEAR = [localtime()]->[5] + 1900;
# because the program apps/openssl has object files as sources, and # because the program apps/openssl has object files as sources, and
# they then have the corresponding C files as source, we need to chain # they then have the corresponding C files as source, we need to chain
# the lookups in %unified_info # the lookups in %unified_info
my @openssl_source = my @openssl_source =
map { @{$unified_info{sources}->{$_}} } map { @{$unified_info{sources}->{$_}} }
grep { /\.o$/ }
@{$unified_info{sources}->{$apps_openssl}}; @{$unified_info{sources}->{$apps_openssl}};
foreach my $filename (@openssl_source) { foreach my $filename (@openssl_source) {
...@@ -36,12 +38,12 @@ foreach my $filename (@openssl_source) { ...@@ -36,12 +38,12 @@ foreach my $filename (@openssl_source) {
@ARGV = sort keys %commands; @ARGV = sort keys %commands;
print <<'EOF'; print <<"EOF";
/* /*
* WARNING: do not edit! * WARNING: do not edit!
* Generated by apps/progs.pl * Generated by apps/progs.pl
* *
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-$YEAR The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
......
...@@ -39,13 +39,14 @@ while (<FD>) { ...@@ -39,13 +39,14 @@ while (<FD>) {
close(FD); close(FD);
my $filename = $ARGV[0]; my $filename = $ARGV[0];
$filename =~ /(.*)\.([^.]+)$/; my $description = "OpenSSL library";
my $basename = $1; my $vft = "VFT_DLL";
my $extname = $2; if ( $filename =~ /openssl/i ) {
$description = "OpenSSL application";
my $description = "OpenSSL application"; $vft = "VFT_APP";
$description = "OpenSSL shared library" if $extname =~ /dll/i; }
my $YEAR = [localtime()]->[5] + 1900;
print <<___; print <<___;
#include <winver.h> #include <winver.h>
...@@ -61,7 +62,7 @@ LANGUAGE 0x09,0x01 ...@@ -61,7 +62,7 @@ LANGUAGE 0x09,0x01
FILEFLAGS 0x00L FILEFLAGS 0x00L
#endif #endif
FILEOS VOS__WINDOWS32 FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL FILETYPE $vft
FILESUBTYPE 0x0L FILESUBTYPE 0x0L
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
...@@ -72,13 +73,13 @@ BEGIN ...@@ -72,13 +73,13 @@ BEGIN
VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0" VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
VALUE "FileDescription", "$description\\0" VALUE "FileDescription", "$description\\0"
VALUE "FileVersion", "$version\\0" VALUE "FileVersion", "$version\\0"
VALUE "InternalName", "$basename\\0" VALUE "InternalName", "$filename\\0"
VALUE "OriginalFilename", "$filename\\0" VALUE "OriginalFilename", "$filename\\0"
VALUE "ProductName", "The OpenSSL Toolkit\\0" VALUE "ProductName", "The OpenSSL Toolkit\\0"
VALUE "ProductVersion", "$version\\0" VALUE "ProductVersion", "$version\\0"
// Optional: // Optional:
//VALUE "Comments", "\\0" //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 "LegalTrademarks", "\\0"
//VALUE "PrivateBuild", "\\0" //VALUE "PrivateBuild", "\\0"
//VALUE "SpecialBuild", "\\0" //VALUE "SpecialBuild", "\\0"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册