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)
This commit is contained in:
parent
b9499cf8de
commit
8390062853
4 changed files with 26 additions and 11 deletions
|
@ -2015,6 +2015,13 @@ EOF
|
|||
$o = cleanfile($buildd, $o, $blddir);
|
||||
$unified_info{sources}->{$ddest}->{$o} = 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 {
|
||||
$unified_info{sources}->{$ddest}->{$s} = 1;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,11 @@ IF[{- !$disabled{apps} -}]
|
|||
INCLUDE[openssl]=.. ../include
|
||||
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" }
|
||||
@apps_openssl_src) -}
|
||||
GENERATE[progs.h]=progs.pl $(APPS_OPENSSL)
|
||||
|
|
|
@ -17,12 +17,14 @@ use configdata qw/@disablables %unified_info/;
|
|||
my %commands = ();
|
||||
my $cmdre = qr/^\s*int\s+([a-z_][a-z0-9_]*)_main\(\s*int\s+argc\s*,/;
|
||||
my $apps_openssl = shift @ARGV;
|
||||
my $YEAR = [localtime()]->[5] + 1900;
|
||||
|
||||
# because the program apps/openssl has object files as sources, and
|
||||
# they then have the corresponding C files as source, we need to chain
|
||||
# the lookups in %unified_info
|
||||
my @openssl_source =
|
||||
map { @{$unified_info{sources}->{$_}} }
|
||||
grep { /\.o$/ }
|
||||
@{$unified_info{sources}->{$apps_openssl}};
|
||||
|
||||
foreach my $filename (@openssl_source) {
|
||||
|
@ -36,12 +38,12 @@ foreach my $filename (@openssl_source) {
|
|||
|
||||
@ARGV = sort keys %commands;
|
||||
|
||||
print <<'EOF';
|
||||
print <<"EOF";
|
||||
/*
|
||||
* WARNING: do not edit!
|
||||
* 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
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
|
|
19
util/mkrc.pl
19
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"
|
||||
|
|
Loading…
Reference in a new issue