aboutsummaryrefslogtreecommitdiff
path: root/install-win32/makebin
blob: 308ec5ce6ec0ed50f7c2501c473c1313851c6d8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

# Assemble binaries into bin

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

rm -rf bin
mkdir bin

# Get OpenVPN executable
cp openvpn.exe bin
strip bin/openvpn.exe

# Get OpenVPN service
cp service-win32/openvpnserv.exe bin
strip bin/openvpnserv.exe

# Get OpenSSL binaries
for f in libeay32.dll libssl32.dll openssl.exe ; do
  cp $OPENSSL_DIR/$f bin
  strip bin/$f
done

# $DRVBINSRC, if defined, points to prebuilt TAP driver and
# tapinstall.exe.
if [ -z "$DRVBINSRC" ] ; then
    # Get TAP drivers
    cp -a tap-win32/dist bin/driver

    # Get tapinstall
    mkdir bin/tapinstall
    mkdir bin/tapinstall/i386
    cp tapinstall/objfre_wnet_x86/i386/tapinstall.exe bin/tapinstall/i386
    #mkdir bin/tapinstall/amd64
    #cp tapinstall/objfre_wnet_amd64/amd64/tapinstall.exe bin/tapinstall/amd64
else
    cp -a $DRVBINSRC/driver bin/driver
    cp -a $DRVBINSRC/tapinstall bin/tapinstall
fi

# $DRVBINDEST, if defined, points to a destination directory
# where TAP driver and tapinstall.exe will be saved, to be used
# as a $DRVBINSRC in future builds.
if [ -n "$DRVBINDEST" ] ; then
    rm -rf $DRVBINDEST
    mkdir $DRVBINDEST
    cp -a bin/driver $DRVBINDEST
    cp -a bin/tapinstall $DRVBINDEST
fi