aboutsummaryrefslogtreecommitdiff
path: root/install-win32/makeservice
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-02-01 10:13:59 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-02-01 10:13:59 +0000
commit63082c8a210741e2c390f78669009697128cfe30 (patch)
tree0df33f1061a4cb681804f9d77fb0493d0578b5c0 /install-win32/makeservice
parentVersion 2.1_rc7 (diff)
downloadopenvpn-63082c8a210741e2c390f78669009697128cfe30.tar.xz
Changes to Windows build system to make it easier to do
partial builds, where only a subset of OpenVPN installer components are built. See ./domake-win comments. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2710 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--install-win32/makeservice30
1 files changed, 30 insertions, 0 deletions
diff --git a/install-win32/makeservice b/install-win32/makeservice
new file mode 100644
index 0000000..081ee0a
--- /dev/null
+++ b/install-win32/makeservice
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# get version.nsi definitions
+. autodefs/defs.sh
+
+# build OpenVPN service (openvpnserv.exe)
+if [ -d "$SVC_TEMPLATE" ] ; then
+ # silly vista security theatre
+ PATCH="/tmp/p.exe"
+ cp `which patch` $PATCH
+
+ # build service sources
+ 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
+
+ # compile/link
+ [ "$CLEAN" = "yes" ] && make clean
+ make -j $MAKE_JOBS
+ cd ..
+
+ # copy service to GENOUT/bin
+ mkdir $GENOUT/bin &>/dev/null
+ cp service-win32/${PRODUCT_UNIX_NAME}serv.exe $GENOUT/bin
+ strip $GENOUT/bin/${PRODUCT_UNIX_NAME}serv.exe
+else
+ echo OpenVPN service template directory $SVC_TEMPLATE NOT FOUND
+fi