summaryrefslogtreecommitdiffstats
path: root/install-win32/getxgui
blob: d3a21b80879634ed6fb969a691f9bf8686438db3 (plain)
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
#!/bin/sh

# Get and sign the OpenVPN XML-based GUI

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

if [ -d "$OPENVPN_XGUI_DIR" ]; then
    SIGNED_EXES="gui/ovpn-xgui-en.exe sta/ovpn-tray.exe"
    UNSIGNED_EXES="xmlserv/ovpn-xmlserv.exe"
    EXES="$SIGNED_EXES $UNSIGNED_EXES"

    mkdir -p $GENOUT/bin &>/dev/null

    if [ -z "$NO_STRIP" ]; then
	for f in $EXES; do
	    cp $OPENVPN_XGUI_DIR/$f $GENOUT/bin
	    strip $GENOUT/bin/`basename $f`
	done
    fi

    for f in $SIGNED_EXES; do
	if [ -d "$SIGNTOOL" ]; then
	    TARGET_EXE="$GENOUT/bin/`basename $f`" $SIGNTOOL/signexe
	fi
    done

    rm -rf $GENOUT/htdocs
    cp -a $OPENVPN_XGUI_DIR/ajax/htdocs $GENOUT/htdocs

    echo '!define OPENVPN_XGUI_DEFINED' >autodefs/xguidefs.nsi
else
    cat /dev/null >autodefs/xguidefs.nsi
fi