]>
Commit | Line | Data |
---|---|---|
e0a65194 | 1 | #! /usr/bin/env perl |
c4d3c19b | 2 | # Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. |
5b50f99e | 3 | # |
9059ab42 | 4 | # Licensed under the Apache License 2.0 (the "License"). You may not use |
e0a65194 RS |
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 | |
1407f856 | 8 | |
199b2460 RS |
9 | use strict; |
10 | use warnings; | |
1407f856 RL |
11 | use lib "."; |
12 | use configdata; | |
1407f856 | 13 | |
f3866324 RL |
14 | my $cversion = "$config{version}"; |
15 | my $version = "$config{full_version}"; | |
16 | ||
17 | # RC syntax for versions uses commas as separators, rather than period | |
18 | $cversion =~ s|\.|,|g; | |
5b50f99e | 19 | |
199b2460 | 20 | my $filename = $ARGV[0]; |
83900628 RS |
21 | my $description = "OpenSSL library"; |
22 | my $vft = "VFT_DLL"; | |
23 | if ( $filename =~ /openssl/i ) { | |
24 | $description = "OpenSSL application"; | |
25 | $vft = "VFT_APP"; | |
26 | } | |
5b50f99e | 27 | |
83900628 | 28 | my $YEAR = [localtime()]->[5] + 1900; |
5b50f99e AP |
29 | print <<___; |
30 | #include <winver.h> | |
31 | ||
32 | LANGUAGE 0x09,0x01 | |
33 | ||
34 | 1 VERSIONINFO | |
3a63dbef RL |
35 | FILEVERSION $cversion |
36 | PRODUCTVERSION $cversion | |
5b50f99e AP |
37 | FILEFLAGSMASK 0x3fL |
38 | #ifdef _DEBUG | |
39 | FILEFLAGS 0x01L | |
40 | #else | |
41 | FILEFLAGS 0x00L | |
42 | #endif | |
43 | FILEOS VOS__WINDOWS32 | |
83900628 | 44 | FILETYPE $vft |
5b50f99e AP |
45 | FILESUBTYPE 0x0L |
46 | BEGIN | |
47 | BLOCK "StringFileInfo" | |
48 | BEGIN | |
49 | BLOCK "040904b0" | |
50 | BEGIN | |
51 | // Required: | |
af7d8d34 | 52 | VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\\0" |
5b50f99e AP |
53 | VALUE "FileDescription", "$description\\0" |
54 | VALUE "FileVersion", "$version\\0" | |
83900628 | 55 | VALUE "InternalName", "$filename\\0" |
5b50f99e AP |
56 | VALUE "OriginalFilename", "$filename\\0" |
57 | VALUE "ProductName", "The OpenSSL Toolkit\\0" | |
58 | VALUE "ProductVersion", "$version\\0" | |
59 | // Optional: | |
60 | //VALUE "Comments", "\\0" | |
83900628 | 61 | VALUE "LegalCopyright", "Copyright 1998-$YEAR The OpenSSL Authors. All rights reserved.\\0" |
5b50f99e AP |
62 | //VALUE "LegalTrademarks", "\\0" |
63 | //VALUE "PrivateBuild", "\\0" | |
64 | //VALUE "SpecialBuild", "\\0" | |
65 | END | |
66 | END | |
67 | BLOCK "VarFileInfo" | |
68 | BEGIN | |
69 | VALUE "Translation", 0x409, 0x4b0 | |
70 | END | |
71 | END | |
72 | ___ |