3 # ff bits: 1(debug), 2(prerelease), 4(patched), 8(vendor) and 32(special)
4 # debug is summed based on the /Define _DEBUG
5 # prerelease is based on the -dev extension,
6 # patched is based on a non-standard "-ver" extension,
7 # special and vendor are toggled by their args.
16 if (match(file, /\./)) {
17 sub(/\.[^\.]*$/, "", file);
21 while (length(ARGV[i])) {
22 if (match(ARGV[i], /icon=/)) {
23 icon = substr(ARGV[i], 6);
25 if (match(ARGV[i], /vendor=/)) {
26 vendor = substr(ARGV[i], 8);
29 if (match(ARGV[i], /special=/)) {
30 special = substr(ARGV[i], 9);
42 while ((getline < rel_h) > 0) {
43 if (match ($0, /^#define AP_SERVER_BASEREVISION "[^"]+"/)) {
44 ver = substr($0, RSTART + 32, RLENGTH - 33);
49 gsub(/\./, ",", verc);
52 verc = verc "," build;
53 } else if (sub(/-dev/, ",0", verc)) {
55 } else if (!sub(/-alpha/, ",10", verc) \
56 && !sub(/-beta/, ",100", verc) \
57 && !sub(/-gold/, ",200", verc)) {
62 # XXX Gotta fix this for non-httpd installs :(
73 print "1 ICON DISCARDABLE \"" icon "\"";
75 print "1 VERSIONINFO";
76 print " FILEVERSION " verc "";
77 print " PRODUCTVERSION " verc "";
78 print " FILEFLAGSMASK 0x3fL";
79 print "#if defined(_DEBUG)"
80 print " FILEFLAGS 0x" sprintf("%02x", ff + 1) "L";
82 print " FILEFLAGS 0x" sprintf("%02x", ff) "L";
84 print " FILEOS 0x40004L";
85 print " FILETYPE 0x1L";
86 print " FILESUBTYPE 0x0L";
88 print " BLOCK \"StringFileInfo\"";
90 print " BLOCK \"040904b0\"";
92 print " VALUE \"Comments\", \"All rights reserved. The "\
93 "license is available at <http://www.apache.org/LICENSE.txt>. "\
94 "The APR project pages are at <http://apr.apache.org/>.\\0\"";
95 print " VALUE \"CompanyName\", \"Apache Software Foundation\\0\"";
96 print " VALUE \"FileDescription\", \"" desc "\\0\"";
97 print " VALUE \"FileVersion\", \"" ver "\\0\"";
98 print " VALUE \"InternalName\", \"" file "\\0\"";
99 print " VALUE \"LegalCopyright\", \"Copyright © 2000-2003 "\
100 "The Apache Software Foundation.\\0\"";
101 print " VALUE \"OriginalFilename\", \"" filename "\\0\"";
103 print " VALUE \"PrivateBuild\", \"" vendor "\\0\"";
106 print " VALUE \"SpecialBuild\", \"" vendor "\\0\"";
108 print " VALUE \"ProductName\", \"Apache Portable Runtime\\0\"";
109 print " VALUE \"ProductVersion\", \"" ver "\\0\"";
112 print " BLOCK \"VarFileInfo\"";
114 print " VALUE \"Translation\", 0x409, 1200";