git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1867 e7ae566f-a301-0410-adde-c780ea21d3b5
| ... | ... |
@@ -35,7 +35,7 @@ |
| 35 | 35 |
|
| 36 | 36 |
#include <windows.h> |
| 37 | 37 |
#include <winsock2.h> |
| 38 |
-#include "autodefs/nsidefs.h" |
|
| 38 |
+#include "autodefs/defs.h" |
|
| 39 | 39 |
|
| 40 | 40 |
#define sleep(x) Sleep((x)*1000) |
| 41 | 41 |
|
| ... | ... |
@@ -228,7 +228,7 @@ typedef unsigned long in_addr_t; |
| 228 | 228 |
#define PACKAGE_TARNAME "openvpn" |
| 229 | 229 |
|
| 230 | 230 |
/* Define to the version of this package. */ |
| 231 |
-#define PACKAGE_VERSION "PRODUCT_VERSION" |
|
| 231 |
+#define PACKAGE_VERSION PRODUCT_VERSION |
|
| 232 | 232 |
|
| 233 | 233 |
/* Define to the full name and version of this package. */ |
| 234 | 234 |
#ifdef DEBUG_LABEL |
| ... | ... |
@@ -26,7 +26,7 @@ dnl Process this file with autoconf to produce a configure script. |
| 26 | 26 |
AC_PREREQ(2.50) |
| 27 | 27 |
|
| 28 | 28 |
m4_include(version.m4) |
| 29 |
-AC_INIT([OpenVPN], [OPENVPN_VERSION], [openvpn-users@lists.sourceforge.net], [openvpn]) |
|
| 29 |
+AC_INIT([OpenVPN], [PRODUCT_VERSION], [openvpn-users@lists.sourceforge.net], [openvpn]) |
|
| 30 | 30 |
AM_CONFIG_HEADER(config.h) |
| 31 | 31 |
AC_CONFIG_SRCDIR(syshead.h) |
| 32 | 32 |
|
| ... | ... |
@@ -1,7 +1,15 @@ |
| 1 | 1 |
#!/bin/sh |
| 2 | 2 |
|
| 3 |
+# This is the master OpenVPN build script for Windows. |
|
| 4 |
+# See top-devel definitions in install-win32/version.nsi |
|
| 5 |
+# |
|
| 6 |
+# Example usage: |
|
| 7 |
+# |
|
| 3 | 8 |
# make without signing: |
| 4 | 9 |
# SIGNCODE="null" ./domake-win |
| 10 |
+# |
|
| 11 |
+# write installer to desktop |
|
| 12 |
+# INSTALLER_DEST="/c/Documents and Settings/James/Desktop" ./domake-win |
|
| 5 | 13 |
|
| 6 | 14 |
install-win32/winconfig |
| 7 | 15 |
install-win32/makeopenvpn |
| ... | ... |
@@ -1,11 +1,15 @@ |
| 1 | 1 |
#!/bin/sh |
| 2 | 2 |
|
| 3 |
-# copy the installer |
|
| 3 |
+# copy the installer to the $INSTALLER_DEST directory. |
|
| 4 | 4 |
|
| 5 | 5 |
# load version.nsi definitions |
| 6 |
-. autodefs/nsidefs.sh |
|
| 6 |
+. autodefs/defs.sh |
|
| 7 | 7 |
|
| 8 |
-cd install-win32 |
|
| 9 |
-ls openvpn*.exe 2>/dev/null || exit 1 |
|
| 10 |
-exe=`ls -t openvpn*.exe | head -n 1` |
|
| 11 |
-cp $exe .. |
|
| 8 |
+if [ -n "$INSTALLER_DEST" ] ; then |
|
| 9 |
+ cd install-win32 |
|
| 10 |
+ ls openvpn*.exe 2>/dev/null || exit 1 |
|
| 11 |
+ exe=install-win32/`ls -t openvpn*.exe | head -n 1` |
|
| 12 |
+ cd .. |
|
| 13 |
+ echo cp $exe "$INSTALLER_DEST" |
|
| 14 |
+ cp $exe "$INSTALLER_DEST" |
|
| 15 |
+fi |
| 12 | 16 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,15 @@ |
| 0 |
+#!/usr/bin/perl |
|
| 1 |
+ |
|
| 2 |
+# used to convert version.m4 to simple |
|
| 3 |
+# definition format |
|
| 4 |
+ |
|
| 5 |
+while (<STDIN>) {
|
|
| 6 |
+ chomp; |
|
| 7 |
+ if (/^\s*$/) {
|
|
| 8 |
+ print "\n"; |
|
| 9 |
+ } elsif (/^define\((\w+),\[(.*?)\]\)/) {
|
|
| 10 |
+ print "define $1 \"$2\"\n"; |
|
| 11 |
+ } elsif (/^dnl(.*)$/) {
|
|
| 12 |
+ print "#$1\n"; |
|
| 13 |
+ } |
|
| 14 |
+} |
| ... | ... |
@@ -1,33 +1,50 @@ |
| 1 |
+#!/usr/bin/perl |
|
| 2 |
+ |
|
| 1 | 3 |
# Simple macro processor. |
| 2 | 4 |
|
| 3 | 5 |
# Macros are defined in a control file that follows |
| 4 |
-# NSIS format such as version.nsi. Stdin is then |
|
| 5 |
-# copied to stdout, and any occurrence of @@MACRO@@ is |
|
| 6 |
-# substituted. |
|
| 7 |
- |
|
| 8 |
-die "usage: macro.pl <control-file>" if (@ARGV < 1); |
|
| 9 |
-($control_file) = @ARGV; |
|
| 6 |
+# a simple definition-based grammar as documented in the |
|
| 7 |
+# trans script. Stdin is then copied to stdout, and any |
|
| 8 |
+# occurrence of @@MACRO@@ is substituted. Macros can also |
|
| 9 |
+# be specified on the command line. |
|
| 10 | 10 |
|
| 11 |
-open(CONTROL, "< $control_file") or die "cannot open $control_file"; |
|
| 11 |
+die "usage: macro [-O<openquote>] [-C<closequote>] [-Dname=var ...] [control-file ...] " if (@ARGV < 1); |
|
| 12 | 12 |
|
| 13 | 13 |
%Parms = (); |
| 14 |
+$open_quote = "@@"; |
|
| 15 |
+$close_quote = "@@"; |
|
| 14 | 16 |
|
| 15 |
-while (<CONTROL>) {
|
|
| 16 |
- chomp; |
|
| 17 |
- if (/^!define\s+(\w+)\s+['"]?(.+?)['"]?\s*$/) {
|
|
| 18 |
- $Parms{$1} = $2
|
|
| 19 |
- } |
|
| 17 |
+while ($arg=shift(@ARGV)) {
|
|
| 18 |
+ if ($arg =~ /^-/) {
|
|
| 19 |
+ if ($arg =~ /^-D(\w+)=(.*)$/) {
|
|
| 20 |
+ $Parms{$1} = $2
|
|
| 21 |
+ } elsif ($arg =~ /-O(.*)$/) {
|
|
| 22 |
+ $open_quote = $1; |
|
| 23 |
+ } elsif ($arg =~ /-C(.*)$/) {
|
|
| 24 |
+ $close_quote = $1; |
|
| 25 |
+ } else {
|
|
| 26 |
+ die "unrecognized option: $arg"; |
|
| 27 |
+ } |
|
| 28 |
+ } else {
|
|
| 29 |
+ open(CONTROL, "< $arg") or die "cannot open $arg"; |
|
| 30 |
+ while (<CONTROL>) {
|
|
| 31 |
+ chomp; |
|
| 32 |
+ if (/^define\s+(\w+)\s+['"]?(.+?)['"]?\s*$/) {
|
|
| 33 |
+ $Parms{$1} = $2
|
|
| 34 |
+ } |
|
| 35 |
+ } |
|
| 36 |
+ } |
|
| 20 | 37 |
} |
| 21 | 38 |
|
| 22 | 39 |
while (<STDIN>) {
|
| 23 | 40 |
s{
|
| 24 |
- @@ |
|
| 41 |
+ \Q$open_quote\E |
|
| 25 | 42 |
\s* |
| 26 | 43 |
( |
| 27 | 44 |
\w+ |
| 28 | 45 |
) |
| 29 | 46 |
\s* |
| 30 |
- @@ |
|
| 47 |
+ \Q$close_quote\E |
|
| 31 | 48 |
}{
|
| 32 | 49 |
$Parms{$1}
|
| 33 | 50 |
}xge; |
| ... | ... |
@@ -4,7 +4,7 @@ |
| 4 | 4 |
# Requires the Windows DDK |
| 5 | 5 |
|
| 6 | 6 |
# get version.nsi definitions |
| 7 |
-. autodefs/nsidefs.sh |
|
| 7 |
+. autodefs/defs.sh |
|
| 8 | 8 |
|
| 9 | 9 |
amdtarget="" |
| 10 | 10 |
if [ -z "$TAP_BIN_AMD64" ]; then |
| ... | ... |
@@ -27,4 +27,4 @@ if [ -n "$TAP_BIN_AMD64" ]; then |
| 27 | 27 |
cp "$TAP_BIN_AMD64" $t/amd64 |
| 28 | 28 |
fi |
| 29 | 29 |
|
| 30 |
-title openvpn &>/dev/null |
|
| 30 |
+title openvpn-build &>/dev/null |
| ... | ... |
@@ -6,7 +6,7 @@ |
| 6 | 6 |
# tapinstall source code. |
| 7 | 7 |
|
| 8 | 8 |
# get version.nsi definitions |
| 9 |
-. autodefs/nsidefs.sh |
|
| 9 |
+. autodefs/defs.sh |
|
| 10 | 10 |
|
| 11 | 11 |
if ! [ -d "$TISRC" ] ; then |
| 12 | 12 |
echo "$TISRC" NOT INSTALLED |
| ... | ... |
@@ -39,4 +39,4 @@ if [ -n "$TI_BIN_AMD64" ]; then |
| 39 | 39 |
cp "$TI_BIN_AMD64" $t/objfre_wnet_amd64/amd64 |
| 40 | 40 |
fi |
| 41 | 41 |
|
| 42 |
-title openvpn &>/dev/null |
|
| 42 |
+title openvpn-build &>/dev/null |
| 43 | 43 |
deleted file mode 100644 |
| ... | ... |
@@ -1,27 +0,0 @@ |
| 1 |
-# This is a simple language translator. It translates |
|
| 2 |
-# the NSIS format of version.nsi to either C, sh, or Javascript. |
|
| 3 |
- |
|
| 4 |
-($mode) = @ARGV; |
|
| 5 |
- |
|
| 6 |
-$comment = "This file was automatically generated by nsitran.pl"; |
|
| 7 |
- |
|
| 8 |
-print "// $comment\n" if ($mode eq "c"); |
|
| 9 |
-print "# $comment\n" if ($mode eq "sh"); |
|
| 10 |
-print "// $comment\n" if ($mode eq "js"); |
|
| 11 |
- |
|
| 12 |
-print "\n"; |
|
| 13 |
- |
|
| 14 |
-while (<STDIN>) {
|
|
| 15 |
- chomp; |
|
| 16 |
- if (/^\s*$/) {
|
|
| 17 |
- print "\n"; |
|
| 18 |
- } elsif (/^[#;](.*)$/) {
|
|
| 19 |
- print "//$1\n" if ($mode eq "c"); |
|
| 20 |
- print "#$1\n" if ($mode eq "sh"); |
|
| 21 |
- print "//$1\n" if ($mode eq "js"); |
|
| 22 |
- } elsif (/^!define\s+(\w+)\s+(.+)$/) {
|
|
| 23 |
- print "#define $1 $2\n" if ($mode eq "c"); |
|
| 24 |
- print "[ -z \"\$$1\" ] && export $1=$2\n[ \"\$$1\" = \"null\" ] && unset $1\n" if ($mode eq "sh"); |
|
| 25 |
- print "var $1=$2;\n" if ($mode eq "js"); |
|
| 26 |
- } |
|
| 27 |
-} |
| ... | ... |
@@ -7,12 +7,13 @@ |
| 7 | 7 |
|
| 8 | 8 |
; OpenVPN install script for Windows, using NSIS |
| 9 | 9 |
|
| 10 |
-!include "version.nsi" |
|
| 10 |
+!define HOME ".." |
|
| 11 |
+ |
|
| 12 |
+!include "${HOME}\autodefs\defs.nsi"
|
|
| 11 | 13 |
!include "MUI.nsh" |
| 12 | 14 |
!include "setpath.nsi" |
| 13 | 15 |
!include "GetWindowsVersion.nsi" |
| 14 | 16 |
|
| 15 |
-!define HOME ".." |
|
| 16 | 17 |
!define BIN "${HOME}\bin"
|
| 17 | 18 |
|
| 18 | 19 |
!define PRODUCT_NAME "OpenVPN" |
| 19 | 20 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,59 @@ |
| 0 |
+# Version numbers, settings, and dependencies |
|
| 1 |
+# for Windows OpenVPN installer. |
|
| 2 |
+ |
|
| 3 |
+# Get the OpenVPN version number |
|
| 4 |
+include "autodefs/version.in" |
|
| 5 |
+ |
|
| 6 |
+# Include the OpenVPN GUI exe in the installer. |
|
| 7 |
+# May be undefined. |
|
| 8 |
+define OPENVPN_GUI_DIR "../openvpn-gui" |
|
| 9 |
+define OPENVPN_GUI "openvpn-gui-1.0.3.exe" |
|
| 10 |
+ |
|
| 11 |
+# Prebuilt libraries. DMALLOC is optional. |
|
| 12 |
+define OPENSSL_DIR "../openssl-0.9.7l" |
|
| 13 |
+define LZO_DIR "../lzo-2.02" |
|
| 14 |
+define DMALLOC_DIR "../dmalloc-5.4.2" |
|
| 15 |
+ |
|
| 16 |
+# Write TAP driver and tapinstall.exe to this directory, |
|
| 17 |
+# to use as prebuilt binaries for future builds. May |
|
| 18 |
+# be undefined. |
|
| 19 |
+;define DRVBINDEST "../tapbin" |
|
| 20 |
+ |
|
| 21 |
+# Don't build TAP driver and tapinstall.exe -- instead get |
|
| 22 |
+# them as prebuilt binaries from this directory. May be |
|
| 23 |
+# undefined. |
|
| 24 |
+;define DRVBINSRC "../tapbin" |
|
| 25 |
+ |
|
| 26 |
+# tapinstall.exe source code. |
|
| 27 |
+# Not needed if DRVBINSRC is defined. |
|
| 28 |
+define TISRC "../tapinstall" |
|
| 29 |
+ |
|
| 30 |
+# TAP Adapter parameters. |
|
| 31 |
+define PRODUCT_TAP_MAJOR_VER 9 |
|
| 32 |
+define PRODUCT_TAP_MINOR_VER 3 |
|
| 33 |
+define PRODUCT_TAP_RELDATE "04/18/2007" |
|
| 34 |
+ |
|
| 35 |
+# Service template files service.[ch] (get from Platform SDK). |
|
| 36 |
+# If undefined, don't build openvpnserv.exe |
|
| 37 |
+define SVC_TEMPLATE "../svc-template" |
|
| 38 |
+ |
|
| 39 |
+# DDK Version. |
|
| 40 |
+# DDK distribution is assumed to be in C:\WINDDK\${DDKVER}
|
|
| 41 |
+# Not needed if DRVBINSRC is defined. |
|
| 42 |
+define DDKVER 5600 |
|
| 43 |
+ |
|
| 44 |
+# Code Signing. |
|
| 45 |
+# This directory should contain signcode.exe + key files. |
|
| 46 |
+# If undefined, don't sign any files. |
|
| 47 |
+define SIGNCODE "../sign" |
|
| 48 |
+ |
|
| 49 |
+# INF2CAT should point to the MS inf2cat distribution. |
|
| 50 |
+# inf2cat is used for driver signing. |
|
| 51 |
+# If undefined, don't sign any files. |
|
| 52 |
+define INF2CAT "../inf2cat" |
|
| 53 |
+ |
|
| 54 |
+# -j parameter passed to make |
|
| 55 |
+define MAKE_JOBS 2 |
|
| 56 |
+ |
|
| 57 |
+# do a make clean before make |
|
| 58 |
+define MAKE_CLEAN "yes" |
| 15 | 15 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,97 @@ |
| 0 |
+#!/usr/bin/perl |
|
| 1 |
+ |
|
| 2 |
+# This script translates a simple definition-based grammar |
|
| 3 |
+# to either C, sh, Javascript, or in (in = identity grammar, i.e. |
|
| 4 |
+# same grammar as input). |
|
| 5 |
+# |
|
| 6 |
+# Input grammar: |
|
| 7 |
+# (1) comments having ';' or '#' as the first char in the line |
|
| 8 |
+# (2) a blank line |
|
| 9 |
+# (3) include "file" |
|
| 10 |
+# (4) define foo bar |
|
| 11 |
+# (5) define foo "bar" |
|
| 12 |
+# |
|
| 13 |
+# Environmental variables can be used to override a setting. |
|
| 14 |
+# The special value "null" causes the variable to be undefined. |
|
| 15 |
+# If an environmental value is bracketed, i.e [abc], the brackets |
|
| 16 |
+# will be converted to double quotes prior to output. |
|
| 17 |
+ |
|
| 18 |
+sub comment {
|
|
| 19 |
+ my ($cmt) = @_; |
|
| 20 |
+ print "//$cmt\n" if ($mode =~ /^(c|js|h)$/); |
|
| 21 |
+ print "#$cmt\n" if ($mode =~ /^(sh|nsi|in)$/); |
|
| 22 |
+} |
|
| 23 |
+ |
|
| 24 |
+sub define {
|
|
| 25 |
+ my ($name, $value) = @_; |
|
| 26 |
+ if ($mode eq "sh") {
|
|
| 27 |
+ print "[ -z \"\$$name\" ] && export $name=$value\n"; |
|
| 28 |
+ print "[ \"\$$name\" = \"$nulltag\" ] && unset $name\n"; |
|
| 29 |
+ } else {
|
|
| 30 |
+ if ($ENV{$name}) {
|
|
| 31 |
+ $value = $ENV{$name};
|
|
| 32 |
+ $value = "\"$1\"" if ($value =~ /\[(.*)\]$/); |
|
| 33 |
+ } |
|
| 34 |
+ if ($value ne $nulltag) {
|
|
| 35 |
+ print "#define $name $value\n" if ($mode =~ /^(c|h)$/); |
|
| 36 |
+ print "!define $name $value\n" if ($mode eq "nsi"); |
|
| 37 |
+ print "define $name $value\n" if ($mode eq "in"); |
|
| 38 |
+ print "var $name=$value;\n" if ($mode eq "js"); |
|
| 39 |
+ } else {
|
|
| 40 |
+ print "//#undef $name\n" if ($mode =~ /^(c|h)$/); |
|
| 41 |
+ print "#!undef $name\n" if ($mode eq "nsi"); |
|
| 42 |
+ print ";undef $name\n" if ($mode eq "in"); |
|
| 43 |
+ print "//undef $name\n" if ($mode eq "js"); |
|
| 44 |
+ } |
|
| 45 |
+ } |
|
| 46 |
+} |
|
| 47 |
+ |
|
| 48 |
+sub include_file {
|
|
| 49 |
+ local $_; |
|
| 50 |
+ $include_file_level++; |
|
| 51 |
+ die "!include file nesting too deep" if ($include_file_level > $max_inc_depth); |
|
| 52 |
+ my ($parm) = @_; |
|
| 53 |
+ my $fn = "$incdir/$parm"; |
|
| 54 |
+ local *IN; |
|
| 55 |
+ open(IN, "< $fn") or die "cannot open $fn"; |
|
| 56 |
+ while (<IN>) {
|
|
| 57 |
+ chomp; |
|
| 58 |
+ if (/^\s*$/) {
|
|
| 59 |
+ print "\n"; |
|
| 60 |
+ } elsif (/^[#;](.*)$/) {
|
|
| 61 |
+ comment ($1); |
|
| 62 |
+ } elsif (/^define\s+(\w+)\s+(.+)$/) {
|
|
| 63 |
+ define ($1, $2); |
|
| 64 |
+ } elsif (/^include\s+"(.+)"/) {
|
|
| 65 |
+ include_file ($1); |
|
| 66 |
+ } else {
|
|
| 67 |
+ die "can't parse this line: $_\n"; |
|
| 68 |
+ } |
|
| 69 |
+ } |
|
| 70 |
+ $include_file_level--; |
|
| 71 |
+} |
|
| 72 |
+ |
|
| 73 |
+die "usage: trans <c|h|sh|js|nsi|in> [-I<dir>] [files ...]" if (@ARGV < 1); |
|
| 74 |
+ |
|
| 75 |
+($mode) = shift(@ARGV); |
|
| 76 |
+die "mode must be one of c, h, sh, js, nsi, or in" if !($mode =~ /^(c|h|sh|js|nsi|in)$/); |
|
| 77 |
+ |
|
| 78 |
+$nulltag = "null"; |
|
| 79 |
+$max_inc_depth = 10; |
|
| 80 |
+$include_file_level = 0; |
|
| 81 |
+$incdir = "."; |
|
| 82 |
+ |
|
| 83 |
+comment(" This file was automatically generated by trans.pl");
|
|
| 84 |
+ |
|
| 85 |
+while ($arg=shift(@ARGV)) {
|
|
| 86 |
+ if ($arg =~ /^-/) {
|
|
| 87 |
+ if ($arg =~ /^-I(.*)$/) {
|
|
| 88 |
+ $incdir = $1; |
|
| 89 |
+ } else {
|
|
| 90 |
+ die "unrecognized option: $arg"; |
|
| 91 |
+ } |
|
| 92 |
+ } else {
|
|
| 93 |
+ print "\n"; |
|
| 94 |
+ include_file ($arg); |
|
| 95 |
+ } |
|
| 96 |
+} |
| 0 | 97 |
deleted file mode 100644 |
| ... | ... |
@@ -1,62 +0,0 @@ |
| 1 |
-# Version numbers, settings, and dependencies |
|
| 2 |
-# for Windows OpenVPN installer. |
|
| 3 |
- |
|
| 4 |
-!define PRODUCT_VERSION "2.1_rc2f" |
|
| 5 |
- |
|
| 6 |
-# Include the OpenVPN GUI exe in the installer. |
|
| 7 |
-# May be undefined. |
|
| 8 |
-!define OPENVPN_GUI_DIR "../openvpn-gui" |
|
| 9 |
-!define OPENVPN_GUI "openvpn-gui-1.0.3.exe" |
|
| 10 |
- |
|
| 11 |
-# For now, use prebuilt AMD64 tap/tapinstall |
|
| 12 |
-#!define TAP_BIN_AMD64 "../amd64/tap/tap0901.sys" |
|
| 13 |
-#!define TI_BIN_AMD64 "../amd64/tapinstall/tapinstall.exe" |
|
| 14 |
- |
|
| 15 |
-# Prebuilt libraries. DMALLOC is optional. |
|
| 16 |
-!define OPENSSL_DIR "../openssl-0.9.7l" |
|
| 17 |
-!define LZO_DIR "../lzo-2.02" |
|
| 18 |
-!define DMALLOC_DIR "../dmalloc-5.4.2" |
|
| 19 |
- |
|
| 20 |
-# Write TAP driver and tapinstall.exe to this directory, |
|
| 21 |
-# to use as prebuilt binaries for future builds. May |
|
| 22 |
-# be undefined. |
|
| 23 |
-;!define DRVBINDEST "../tapbin" |
|
| 24 |
- |
|
| 25 |
-# Don't build TAP driver and tapinstall.exe -- instead get |
|
| 26 |
-# them as prebuilt binaries from this directory. May be |
|
| 27 |
-# undefined. |
|
| 28 |
-;!define DRVBINSRC "../tapbin" |
|
| 29 |
- |
|
| 30 |
-# tapinstall.exe source code. |
|
| 31 |
-# Not needed if DRVBINSRC is defined. |
|
| 32 |
-!define TISRC "../tapinstall" |
|
| 33 |
- |
|
| 34 |
-# TAP Adapter parameters. |
|
| 35 |
-!define PRODUCT_TAP_MAJOR_VER 9 |
|
| 36 |
-!define PRODUCT_TAP_MINOR_VER 3 |
|
| 37 |
-!define PRODUCT_TAP_RELDATE "04/18/2007" |
|
| 38 |
- |
|
| 39 |
-# Service template files service.[ch] (get from Platform SDK). |
|
| 40 |
-# If undefined, don't build openvpnserv.exe |
|
| 41 |
-!define SVC_TEMPLATE "../svc-template" |
|
| 42 |
- |
|
| 43 |
-# DDK Version. |
|
| 44 |
-# DDK distribution is assumed to be in C:\WINDDK\${DDKVER}
|
|
| 45 |
-# Not needed if DRVBINSRC is defined. |
|
| 46 |
-!define DDKVER 5600 |
|
| 47 |
- |
|
| 48 |
-# Code Signing. |
|
| 49 |
-# This directory should contain signcode.exe + key files. |
|
| 50 |
-# If undefined, don't sign any files. |
|
| 51 |
-!define SIGNCODE "../sign" |
|
| 52 |
- |
|
| 53 |
-# INF2CAT should point to the MS inf2cat distribution. |
|
| 54 |
-# inf2cat is used for driver signing. |
|
| 55 |
-# If undefined, don't sign any files. |
|
| 56 |
-!define INF2CAT "../inf2cat" |
|
| 57 |
- |
|
| 58 |
-# -j parameter passed to make |
|
| 59 |
-!define MAKE_JOBS 2 |
|
| 60 |
- |
|
| 61 |
-# do a make clean before make |
|
| 62 |
-!define MAKE_CLEAN "yes" |
| ... | ... |
@@ -8,20 +8,20 @@ c=`pwd` |
| 8 | 8 |
rm -rf autodefs |
| 9 | 9 |
mkdir autodefs |
| 10 | 10 |
|
| 11 |
-TRAN="perl install-win32/nsitran.pl" |
|
| 12 |
-VER=install-win32/version.nsi |
|
| 13 |
-MACRO="perl install-win32/macro.pl $VER" |
|
| 11 |
+MACRO="perl install-win32/macro.pl autodefs/defs.in" |
|
| 14 | 12 |
|
| 15 | 13 |
# silly vista security theatre |
| 16 | 14 |
PATCH="/tmp/p.exe" |
| 17 | 15 |
cp `which patch` $PATCH |
| 18 | 16 |
|
| 19 |
-# translate version.nsi to C and sh |
|
| 20 |
-$TRAN c <$VER >autodefs/nsidefs.h |
|
| 21 |
-$TRAN sh <$VER >autodefs/nsidefs.sh |
|
| 17 |
+# build multi-grammar definition files |
|
| 18 |
+perl install-win32/m4todef.pl <version.m4 >autodefs/version.in |
|
| 19 |
+for g in "h" "sh" "nsi" "in" ; do |
|
| 20 |
+ perl install-win32/trans.pl $g install-win32/settings.in >autodefs/defs.$g |
|
| 21 |
+done |
|
| 22 | 22 |
|
| 23 |
-# load version.nsi definitions |
|
| 24 |
-. autodefs/nsidefs.sh |
|
| 23 |
+# load sh definitions |
|
| 24 |
+. autodefs/defs.sh |
|
| 25 | 25 |
|
| 26 | 26 |
# configure tap driver sources |
| 27 | 27 |
$MACRO <tap-win32/SOURCES.in >tap-win32/SOURCES |
| ... | ... |
@@ -39,7 +39,7 @@ |
| 39 | 39 |
// TAP_IOCTL_CONFIG_TUN ioctl. |
| 40 | 40 |
//====================================================== |
| 41 | 41 |
|
| 42 |
-#include "../../autodefs/nsidefs.h" |
|
| 42 |
+#include "../../autodefs/defs.h" |
|
| 43 | 43 |
#ifndef DDKVER |
| 44 | 44 |
#error DDKVER must be defined to the DDK Version as in c:\WinDDK\[DDKVER]\... |
| 45 | 45 |
#endif |