aboutsummaryrefslogblamecommitdiff
path: root/install-win32/winconfig
blob: bca1bb63e1f3e4a813d7ba4df0e3a09e45c24acc (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                 
                                        
 
                              
                  

                       
                                   


                                   
                              


                              

                                                                   




                                              

                   







                                               









                                                            
#!/bin/sh

# prepare files for building on Windows
# run from top directory: install-win32/winconfig

c=`pwd`

rm -rf autodefs
mkdir autodefs

TRAN="perl install-win32/nsitran.pl"
VER=install-win32/version.nsi
MACRO="perl install-win32/macro.pl $VER"

# silly vista security theatre
PATCH="/tmp/p.exe"
cp `which patch` $PATCH

# translate version.nsi to C and sh
$TRAN  c <$VER >autodefs/nsidefs.h
$TRAN sh <$VER >autodefs/nsidefs.sh

# load version.nsi definitions
. autodefs/nsidefs.sh

# configure tap driver sources
$MACRO <tap-win32/SOURCES.in >tap-win32/SOURCES
$MACRO <tap-win32/i386/OemWin2k.inf.in >tap-win32/i386/OemWin2k.inf
rm -rf tap-win32/amd64
mkdir tap-win32/amd64
cp tap-win32/i386/OemWin2k.inf tap-win32/amd64
cd tap-win32/amd64
$PATCH <../inf64.patch

# configure service
if [ -n "$SVC_TEMPLATE" ] ; then
    cd $c
    cp $SVC_TEMPLATE/service.[ch] service-win32
    cd service-win32
    cp service.c service.c.orig
    cp service.h service.h.orig
    $PATCH <service.patch
fi

# build license file
cd $c
cat COPYING COPYRIGHT.GPL >install-win32/license.txt

# copy sample configuration files and docs
cp sample-config-files/client.conf install-win32/client.ovpn
cp sample-config-files/server.conf install-win32/server.ovpn
cp easy-rsa/1.0/openssl.cnf install-win32/openssl.cnf.sample
cp INSTALL-win32.txt install-win32