]> git.ipfire.org Git - thirdparty/openssl.git/blame - util/mkrc.pl
run-checker-daily.yml: If the openssl app is not built do not run it
[thirdparty/openssl.git] / util / mkrc.pl
CommitLineData
e0a65194 1#! /usr/bin/env perl
454afd98 2# Copyright 2006-2020 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
9use strict;
10use warnings;
1407f856
RL
11use lib ".";
12use configdata;
1407f856 13
f3866324
RL
14my $cversion = "$config{version}";
15my $version = "$config{full_version}";
16
c7d32b6b
RL
17# RC syntax for versions uses commas as separators, rather than period,
18# and it must have exactly 4 numbers (16-bit integers).
19my @vernums = ( split(/\./, $cversion), 0, 0, 0, 0 );
20$cversion = join(',', @vernums[0..3]);
5b50f99e 21
199b2460 22my $filename = $ARGV[0];
83900628
RS
23my $description = "OpenSSL library";
24my $vft = "VFT_DLL";
25if ( $filename =~ /openssl/i ) {
26 $description = "OpenSSL application";
27 $vft = "VFT_APP";
28}
5b50f99e 29
11d7d903 30my $YEAR = [gmtime($ENV{SOURCE_DATE_EPOCH} || time())]->[5] + 1900;
5b50f99e
AP
31print <<___;
32#include <winver.h>
33
34LANGUAGE 0x09,0x01
35
361 VERSIONINFO
3a63dbef
RL
37 FILEVERSION $cversion
38 PRODUCTVERSION $cversion
5b50f99e
AP
39 FILEFLAGSMASK 0x3fL
40#ifdef _DEBUG
41 FILEFLAGS 0x01L
42#else
43 FILEFLAGS 0x00L
44#endif
45 FILEOS VOS__WINDOWS32
83900628 46 FILETYPE $vft
5b50f99e
AP
47 FILESUBTYPE 0x0L
48BEGIN
49 BLOCK "StringFileInfo"
50 BEGIN
51 BLOCK "040904b0"
52 BEGIN
53 // Required:
af7d8d34 54 VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\\0"
5b50f99e
AP
55 VALUE "FileDescription", "$description\\0"
56 VALUE "FileVersion", "$version\\0"
83900628 57 VALUE "InternalName", "$filename\\0"
5b50f99e
AP
58 VALUE "OriginalFilename", "$filename\\0"
59 VALUE "ProductName", "The OpenSSL Toolkit\\0"
60 VALUE "ProductVersion", "$version\\0"
61 // Optional:
62 //VALUE "Comments", "\\0"
83900628 63 VALUE "LegalCopyright", "Copyright 1998-$YEAR The OpenSSL Authors. All rights reserved.\\0"
5b50f99e
AP
64 //VALUE "LegalTrademarks", "\\0"
65 //VALUE "PrivateBuild", "\\0"
66 //VALUE "SpecialBuild", "\\0"
67 END
68 END
69 BLOCK "VarFileInfo"
70 BEGIN
71 VALUE "Translation", 0x409, 0x4b0
72 END
73END
74___