1
# Licensed to the Apache Software Foundation (ASF) under one or more
2
# contributor license agreements. See the NOTICE file distributed with
3
# this work for additional information regarding copyright ownership.
4
# The ASF licenses this file to You under the Apache License, Version 2.0
5
# (the "License"); you may not use this file except in compliance with
6
# the License. You may obtain a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
18
# ff bits: 1(debug), 2(prerelease), 4(patched), 8(vendor) and 32(special)
19
# debug is summed based on the /Define _DEBUG
20
# prerelease is based on the -dev extension,
21
# patched is based on a non-standard "-ver" extension,
22
# special and vendor are toggled by their args.
31
while (length(ARGV[i])) {
32
if (match(ARGV[i], /icon=/)) {
33
icon = substr(ARGV[i], 6);
35
if (match(ARGV[i], /vendor=/)) {
36
vendor = substr(ARGV[i], 8);
39
if (match(ARGV[i], /special=/)) {
40
special = substr(ARGV[i], 9);
52
while ((getline < rel_h) > 0) {
53
if (match ($0, /^.*\* Copyright /)) {
54
copyright = substr($0, RLENGTH + 1);
56
if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER /)) {
59
else if (match ($0, /^#define AP_SERVER_MINORVERSION_NUMBER /)) {
62
else if (match ($0, /^#define AP_SERVER_PATCHLEVEL_NUMBER /)) {
65
else if (match ($0, /^#define AP_SERVER_DEVBUILD_BOOLEAN /)) {
68
else if (match ($0, /^#define AP_SERVER_ADD_STRING +"[^"]+"/)) {
69
ver_build = substr($3, 2, length($3) - 2);
73
ver = ver_major "." ver_minor "." ver_patch;
75
verc = ver_major "," ver_minor "," ver_patch;
76
} else if (!match (ver_build, /-dev/)) {
78
verc = ver_major "," ver_minor "," ver_patch "," 100;
82
verc = ver_major "," ver_minor "," ver_patch "," 0;
91
print "1 ICON DISCARDABLE \"" icon "\"";
93
print "1 VERSIONINFO";
94
print " FILEVERSION " verc "";
95
print " PRODUCTVERSION " verc "";
96
print " FILEFLAGSMASK 0x3fL";
97
print "#if defined(_DEBUG)"
98
print " FILEFLAGS 0x" sprintf("%02x", ff + 1) "L";
100
print " FILEFLAGS 0x" sprintf("%02x", ff) "L";
102
print " FILEOS 0x40004L";
103
print " FILETYPE 0x1L";
104
print " FILESUBTYPE 0x0L";
106
print " BLOCK \"StringFileInfo\"";
108
print " BLOCK \"040904b0\"";
110
print " VALUE \"Comments\", "\
111
"\"Licensed under the Apache License, Version 2.0 (the \"\"License\"\"); "\
112
"you may not use this file except in compliance with the License. "\
113
"You may obtain a copy of the License at\\r\\n\\r\\n"\
114
"http://www.apache.org/licenses/LICENSE-2.0\\r\\n\\r\\n"\
115
"Unless required by applicable law or agreed to in writing, "\
116
"software distributed under the License is distributed on an "\
117
"\"\"AS IS\"\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, "\
118
"either express or implied. See the License for the specific "\
119
"language governing permissions and limitations under the License.\\0\"";
120
print " VALUE \"CompanyName\", \"Apache Software Foundation\\0\"";
121
print " VALUE \"FileDescription\", \"" desc "\\0\"";
122
print " VALUE \"FileVersion\", \"" ver "\\0\"";
123
print " VALUE \"InternalName\", \"" file "\\0\"";
124
print " VALUE \"LegalCopyright\", \"Copyright " copyright "\\0\"";
125
print " VALUE \"OriginalFilename\", \"" file "\\0\"";
127
print " VALUE \"PrivateBuild\", \"" vendor "\\0\"";
130
print " VALUE \"SpecialBuild\", \"" vendor "\\0\"";
132
print " VALUE \"ProductName\", \"Apache HTTP Server\\0\"";
133
print " VALUE \"ProductVersion\", \"" ver "\\0\"";
136
print " BLOCK \"VarFileInfo\"";
138
print " VALUE \"Translation\", 0x409, 1200";