]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
First working version of XGUI inclusion.
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Mon, 10 Mar 2008 10:02:20 +0000 (10:02 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Mon, 10 Mar 2008 10:02:20 +0000 (10:02 +0000)
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2834 e7ae566f-a301-0410-adde-c780ea21d3b5

COPYING
domake-win
install-win32/getopenssl
install-win32/getpkcs11helper
install-win32/getxgui [new file with mode: 0644]
install-win32/makeopenvpn
install-win32/makeservice
install-win32/openvpn.nsi
install-win32/settings.in
version.m4

diff --git a/COPYING b/COPYING
index b9a90a70ca3d4b21c45a68ca2b3878fae579ce83..33f7719a683c25f978ff69eb886ee646fba07766 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 OpenVPN (TM) -- An Open Source VPN daemon
 
-Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
+Copyright (C) 2002-2008 OpenVPN, Inc. <sales@openvpn.net>
 
 This distribution contains multiple components, some
 of which fall under different licenses.  By using OpenVPN
index fb04f80002a6df2e70d90f44bb2c90536cc01560..d956b32e126c8a0a386a5b43537d4524ce4832ef 100644 (file)
@@ -126,6 +126,9 @@ install-win32/getpkcs11helper
 # Get the OpenVPN GUI (must be prebuilt)
 install-win32/getgui
 
+# Get the OpenVPN XML-based GUI (must be prebuilt)
+install-win32/getxgui
+
 # Produce the license text, install README, and sample config files
 install-win32/maketext
 
index b7d2629e380bd596fba946ab5a75d01b5264b566..118fcb386506f61359cacd0acdbc814ebd2d5349 100644 (file)
@@ -9,7 +9,9 @@ if [ -d "$OPENSSL_DIR" ] ; then
     mkdir -p $GENOUT/bin &>/dev/null    
     for f in libeay32.dll libssl32.dll openssl.exe ; do
        cp $OPENSSL_DIR/$f $GENOUT/lib
-       strip $GENOUT/lib/$f
+        if [ -z "$NO_STRIP" ]; then
+           strip $GENOUT/lib/$f
+       fi
     done
     mv $GENOUT/lib/openssl.exe $GENOUT/bin
 else
index 7399c1bb1cafa4cbeb13b275023eb489eb185bcf..2a34c6e3f5d3fc90988734198dc52964652a6299 100644 (file)
@@ -8,7 +8,9 @@ if [ -d "$PKCS11_HELPER_DIR" ] ; then
     mkdir -p $GENOUT/lib &>/dev/null    
     for f in libpkcs11-helper-1.dll ; do
        cp $PKCS11_HELPER_DIR/bin/$f $GENOUT/lib
-       strip $GENOUT/lib/$f
+        if [ -z "$NO_STRIP" ]; then
+           strip $GENOUT/lib/$f
+       fi
     done
 else
     echo PKCS11-helper DIR $PKCS11_HELPER_DIR NOT FOUND
diff --git a/install-win32/getxgui b/install-win32/getxgui
new file mode 100644 (file)
index 0000000..d3a21b8
--- /dev/null
@@ -0,0 +1,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
index 234dea5f71b3bb2fea3266e0a5aff1f472ddd573..e3aef48aecdf84de7b9ffa5e361c6f89a8804dce 100644 (file)
@@ -11,7 +11,9 @@ if gcc --version &>/dev/null && [ -d "$OPENSSL_DIR" ] && [ -d "$LZO_DIR" ] && [
     # copy OpenVPN executable to GENOUT/bin
     mkdir -p $GENOUT/bin &>/dev/null
     cp $PRODUCT_UNIX_NAME.exe $GENOUT/bin
-    strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe
+    if [ -z "$NO_STRIP" ]; then
+       strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe
+    fi
 else
     echo DID NOT BUILD openvpn.exe because one or more of gcc, OPENSSL_DIR, LZO_DIR, or PKCS11_HELPER_DIR directories were missing
 fi
index 688e0f54c3c80dcee75f357ef05e79ca36d3b85d..647e17890d4643773378fade27c034c437cd6377 100644 (file)
@@ -24,7 +24,9 @@ if [ -d "$SVC_TEMPLATE" ] ; then
     # 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
+    if [ -z "$NO_STRIP" ]; then
+       strip $GENOUT/bin/${PRODUCT_UNIX_NAME}serv.exe
+    fi
 else
     echo OpenVPN service not built -- template directory $SVC_TEMPLATE NOT FOUND
 fi
index e80482d66b9fcd3bc1447d91b531d21ab5294a4a..f6623f899c4a3541e3f93b883ec55765bf899de3 100755 (executable)
@@ -1,5 +1,5 @@
 ; ****************************************************************************
-; * Copyright (C) 2002-2005 OpenVPN Solutions LLC                            *
+; * Copyright (C) 2002-2008 OpenVPN Solutions LLC                            *
 ; *  This program is free software; you can redistribute it and/or modify    *
 ; *  it under the terms of the GNU General Public License version 2          *
 ; *  as published by the Free Software Foundation.                           *
 
 !include "${HOME}\autodefs\defs.nsi"
 !include "${HOME}\autodefs\guidefs.nsi"
+!include "${HOME}\autodefs\xguidefs.nsi"
 !include "MUI.nsh"
 !include "setpath.nsi"
 !include "GetWindowsVersion.nsi"
 
+; Which GUI to use (XGUI has priority).
+; We will define either USE_XGUI (XML-based version) or
+; USE_GUI (Mathias Sundman version) but not both.
+!ifdef OPENVPN_XGUI_DEFINED
+!define USE_XGUI
+!else
+!ifdef OPENVPN_GUI_DEFINED
+!define USE_GUI
+!endif
+!endif
+
 !define GEN "${HOME}\${GENOUT}"
 !define BIN "${GEN}\bin"
 !define LIB "${GEN}\lib"
 
 !define PRODUCT_ICON "icon.ico"
 
+!ifdef USE_XGUI
+!define XGUI_POSTFIX "X"
+!else
+!define XGUI_POSTFIX ""
+!endif
+
 !ifdef PRODUCT_TAP_DEBUG
-!define VERSION "${PRODUCT_VERSION}-DBG"
+!define DBG_POSTFIX "-DBG"
 !else
-!define VERSION "${PRODUCT_VERSION}"
+!define DBG_POSTFIX ""
 !endif
 
+!define VERSION "${PRODUCT_VERSION}${XGUI_POSTFIX}${DBG_POSTFIX}"
+
 !define TAP "${PRODUCT_TAP_ID}"
 !define TAPDRV "${TAP}.sys"
 
 !define SERV_PRIORITY     "NORMAL_PRIORITY_CLASS"
 !define SERV_LOG_APPEND   "0"
 
+; XGUI variables
+!define XGUI_EXE      ovpn-xgui-en.exe
+!define XGUI_TRAY     ovpn-tray.exe
+!define XGUI_XMLSERV  ovpn-xmlserv.exe
+!define XGUI_HTDOCS   htdocs
+
+!define XGUI_AJAX_GUI_NAME "${PRODUCT_NAME} Ajax GUI"
+
 ;--------------------------------
 ;Configuration
 
 
   LangString DESC_SecOpenVPNUserSpace ${LANG_ENGLISH} "Install ${PRODUCT_NAME} user-space components, including ${PRODUCT_UNIX_NAME}.exe."
 
-!ifdef OPENVPN_GUI_DEFINED
+!ifdef USE_GUI
   LangString DESC_SecOpenVPNGUI ${LANG_ENGLISH} "Install ${PRODUCT_NAME} GUI by Mathias Sundman"
 !endif
 
+!ifdef USE_XGUI
+  LangString DESC_SecOpenVPNXGUI ${LANG_ENGLISH} "Install ${PRODUCT_NAME} XML-based GUI"
+!endif
+
   LangString DESC_SecOpenVPNEasyRSA ${LANG_ENGLISH} "Install ${PRODUCT_NAME} RSA scripts for X509 certificate management."
 
   LangString DESC_SecOpenSSLDLLs ${LANG_ENGLISH} "Install OpenSSL DLLs locally (may be omitted if DLLs are already installed globally)."
 
   LangString DESC_SecPKCS11DLLs ${LANG_ENGLISH} "Install PKCS#11 helper DLLs locally (may be omitted if DLLs are already installed globally)."
 
-  LangString DESC_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP-Win32 virtual device driver.  Will not interfere with CIPE."
+  LangString DESC_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP virtual device driver.  Will not interfere with CIPE."
 
   LangString DESC_SecService ${LANG_ENGLISH} "Install the ${PRODUCT_NAME} service wrapper (${PRODUCT_UNIX_NAME}serv.exe)"
 
@@ -227,6 +259,26 @@ FunctionEnd
 
 !define SF_SELECTED 1
 
+;--------------------
+;Pre-install section
+
+Section -pre
+
+  ; Stop OpenVPN if currently running
+  DetailPrint "Previous Service REMOVE (if exists)"
+  nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove'
+  Pop $R0 # return value/error/timeout
+
+!ifdef USE_XGUI
+  DetailPrint "Previous XML Service REMOVE (if exists)"
+  nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -remove'
+  Pop $R0 # return value/error/timeout
+!endif
+
+  Sleep 3000
+
+SectionEnd
+
 Section "${PRODUCT_NAME} User-Space Components" SecOpenVPNUserSpace
 
   SetOverwrite on
@@ -236,7 +288,7 @@ Section "${PRODUCT_NAME} User-Space Components" SecOpenVPNUserSpace
 
 SectionEnd
 
-!ifdef OPENVPN_GUI_DEFINED
+!ifdef USE_GUI
 Section "${PRODUCT_NAME} GUI" SecOpenVPNGUI
 
   SetOverwrite on
@@ -247,6 +299,22 @@ Section "${PRODUCT_NAME} GUI" SecOpenVPNGUI
 SectionEnd
 !endif
 
+!ifdef USE_XGUI
+Section "${PRODUCT_NAME} XML-based GUI" SecOpenVPNXGUI
+
+  SetOverwrite on
+
+  SetOutPath "$INSTDIR\bin"
+  File "${BIN}\${XGUI_EXE}"
+  File "${BIN}\${XGUI_TRAY}"
+  File "${BIN}\${XGUI_XMLSERV}"
+
+  SetOutPath "$INSTDIR\${XGUI_HTDOCS}"
+  File "${GEN}\${XGUI_HTDOCS}\*.*"
+
+SectionEnd
+!endif
+
 Section "${PRODUCT_NAME} RSA Certificate Management Scripts" SecOpenVPNEasyRSA
 
   SetOverwrite on
@@ -328,18 +396,18 @@ Section "PKCS#11 DLLs" SecPKCS11DLLs
 
 SectionEnd
 
-Section "TAP-Win32 Virtual Ethernet Adapter" SecTAP
+Section "TAP Virtual Ethernet Adapter" SecTAP
 
   SetOverwrite on
 
   FileOpen $R0 "$INSTDIR\bin\addtap.bat" w
-  FileWrite $R0 "rem Add a new TAP-Win32 virtual ethernet adapter$\r$\n"
+  FileWrite $R0 "rem Add a new TAP virtual ethernet adapter$\r$\n"
   FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}$\r$\n'
   FileWrite $R0 "pause$\r$\n"
   FileClose $R0
 
   FileOpen $R0 "$INSTDIR\bin\deltapall.bat" w
-  FileWrite $R0 "echo WARNING: this script will delete ALL TAP-Win32 virtual adapters (use the device manager to delete adapters one at a time)$\r$\n"
+  FileWrite $R0 "echo WARNING: this script will delete ALL TAP virtual adapters (use the device manager to delete adapters one at a time)$\r$\n"
   FileWrite $R0 "pause$\r$\n"
   FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}$\r$\n'
   FileWrite $R0 "pause$\r$\n"
@@ -412,11 +480,35 @@ SectionEnd
 
 Section -post
 
+  SetOverwrite on
+
   ; delete old devcon.exe
   Delete "$INSTDIR\bin\devcon.exe"
 
+  ; Store README, license, icon
+  SetOverwrite on
+  SetOutPath $INSTDIR
+  File "${GEN}\text\INSTALL-win32.txt"
+  File "${GEN}\text\license.txt"
+  File "${HOME}\images\${PRODUCT_ICON}"
+
+  ; store sample config files
+  !ifdef SAMPCONF_DIR
+    SetOverwrite on
+    SetOutPath "$INSTDIR\config"
+  !ifdef SAMPCONF_CONF
+    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_CONF}"
+  !endif
+  !ifdef SAMPCONF_P12
+    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_P12}"
+  !endif
+  !ifdef SAMPCONF_TA
+    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_TA}"
+  !endif
+  !endif
+
   ;
-  ; install/upgrade TAP-Win32 driver if selected, using tapinstall.exe
+  ; install/upgrade TAP driver if selected, using tapinstall.exe
   ;
   SectionGetFlags ${SecTAP} $R0
   IntOp $R0 $R0 & ${SF_SELECTED}
@@ -442,7 +534,7 @@ Section -post
     IntCmp $R0 -1 tapinstall
 
  ;tapupdate:
-    DetailPrint "TAP-Win32 UPDATE"
+    DetailPrint "TAP UPDATE"
     nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" update "$INSTDIR\driver\OemWin2k.inf" ${TAP}'
     Pop $R0 # return value/error/timeout
     Call CheckReboot
@@ -451,13 +543,13 @@ Section -post
     Goto tapinstall_check_error
 
  tapinstall:
-    DetailPrint "TAP-Win32 REMOVE OLD TAP"
+    DetailPrint "TAP REMOVE OLD TAP"
 
     nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAP0801'
     Pop $R0 # return value/error/timeout
     DetailPrint "tapinstall remove TAP0801 returned: $R0"
 
-    DetailPrint "TAP-Win32 INSTALL (${TAP})"
+    DetailPrint "TAP INSTALL (${TAP})"
     nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}'
     Pop $R0 # return value/error/timeout
     Call CheckReboot
@@ -467,7 +559,7 @@ Section -post
  tapinstall_check_error:
     DetailPrint "tapinstall cumulative status: $5"
     IntCmp $5 0 notap
-    MessageBox MB_OK "An error occurred installing the TAP-Win32 device driver."
+    MessageBox MB_OK "An error occurred installing the TAP device driver."
 
  notap:
 
@@ -487,38 +579,29 @@ Section -post
     !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "priority"    "${SERV_PRIORITY}"
     !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\${PRODUCT_NAME}" "log_append"  "${SERV_LOG_APPEND}"
 
-    ; install openvpnserv as a service
-    DetailPrint "Previous Service REMOVE (if exists)"
-    nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove'
-    Pop $R0 # return value/error/timeout
+    ; install openvpnserv as a service (to be started manually from service control manager)
     DetailPrint "Service INSTALL"
     nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -install'
     Pop $R0 # return value/error/timeout
 
  noserv:
-  ; Store README, license, icon
-  SetOverwrite on
-  SetOutPath $INSTDIR
-  File "${GEN}\text\INSTALL-win32.txt"
-  File "${GEN}\text\license.txt"
-  File "${HOME}\images\${PRODUCT_ICON}"
+  !ifdef USE_XGUI
+    IfFileExists "$INSTDIR\bin\${XGUI_XMLSERV}" "" fileass
+      ; install and automatically start XML service
+      DetailPrint "XML Service INSTALL"
+      nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -install'
+      Pop $R0 # return value/error/timeout
+
+      Sleep 2000
+
+      DetailPrint "XML Service START"
+      nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -start'
+      Pop $R0 # return value/error/timeout
 
-  ; store sample config files
-  !ifdef SAMPCONF_DIR
-    SetOverwrite on
-    SetOutPath "$INSTDIR\config"
-  !ifdef SAMPCONF_CONF
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_CONF}"
-  !endif
-  !ifdef SAMPCONF_P12
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_P12}"
-  !endif
-  !ifdef SAMPCONF_TA
-    File "${HOME}\..\${SAMPCONF_DIR}\${SAMPCONF_TA}"
-  !endif
   !endif
 
   ; Create file association if requested
+ fileass:
   SectionGetFlags ${SecFileAssociation} $R0
   IntOp $R0 $R0 & ${SF_SELECTED}
   IntCmp $R0 ${SF_SELECTED} "" noass noass
@@ -535,21 +618,33 @@ Section -post
   CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Utilities"
   CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Shortcuts"
 
-    ; Create start menu and desktop shortcuts to OpenVPN GUI
-  !ifdef OPENVPN_GUI_DEFINED
-    IfFileExists "$INSTDIR\bin\${OPENVPN_GUI}" "" tryaddtap
+  ; Create start menu and desktop shortcuts to OpenVPN GUI
+  !ifdef USE_GUI
+    IfFileExists "$INSTDIR\bin\${OPENVPN_GUI}" "" tryaddxgui
       CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${OPENVPN_GUI}" ""
       CreateShortcut "$DESKTOP\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${OPENVPN_GUI}"
   !endif
 
+  ; Create start menu and desktop shortcuts to OpenVPN XGUI
+ tryaddxgui:
+  !ifdef USE_XGUI
+    IfFileExists "$INSTDIR\bin\${XGUI_EXE}" "" tryaddtray
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${XGUI_EXE}" ""
+      CreateShortcut "$DESKTOP\${PRODUCT_NAME} GUI.lnk" "$INSTDIR\bin\${XGUI_EXE}"
+ tryaddtray:
+    IfFileExists "$INSTDIR\bin\${XGUI_TRAY}" "" tryaddtap
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${XGUI_AJAX_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_EXE}" ""
+      CreateShortcut "$DESKTOP\${XGUI_AJAX_GUI_NAME}.lnk" "$INSTDIR\bin\${XGUI_TRAY}"
+  !endif
+
     ; Create start menu shortcuts to addtap.bat and deltapall.bat
  tryaddtap:
     IfFileExists "$INSTDIR\bin\addtap.bat" "" trydeltap
-      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Add a new TAP-Win32 virtual ethernet adapter.lnk" "$INSTDIR\bin\addtap.bat" ""
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Add a new TAP virtual ethernet adapter.lnk" "$INSTDIR\bin\addtap.bat" ""
 
  trydeltap:
     IfFileExists "$INSTDIR\bin\deltapall.bat" "" config_shortcut
-      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Delete ALL TAP-Win32 virtual ethernet adapters.lnk" "$INSTDIR\bin\deltapall.bat" ""
+      CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Utilities\Delete ALL TAP virtual ethernet adapters.lnk" "$INSTDIR\bin\deltapall.bat" ""
 
     ; Create start menu shortcuts for config and log directories
  config_shortcut:
@@ -580,7 +675,7 @@ Section -post
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${VERSION}"
 
   ; Advise a reboot
-  ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to finalize TAP-Win32 driver installation/upgrade (this is an informational message only, pressing OK will not reboot)."
+  ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to finalize TAP driver installation/upgrade (this is an informational message only, pressing OK will not reboot)."
 
 SectionEnd
 
@@ -589,9 +684,12 @@ SectionEnd
 
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNUserSpace} $(DESC_SecOpenVPNUserSpace)
-  !ifdef OPENVPN_GUI_DEFINED
+  !ifdef USE_GUI
     !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNGUI} $(DESC_SecOpenVPNGUI)
   !endif
+  !ifdef USE_XGUI
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNXGUI} $(DESC_SecOpenVPNXGUI)
+  !endif
   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNEasyRSA} $(DESC_SecOpenVPNEasyRSA)
   !insertmacro MUI_DESCRIPTION_TEXT ${SecTAP} $(DESC_SecTAP)
   !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenSSLUtilities} $(DESC_SecOpenSSLUtilities)
@@ -621,13 +719,20 @@ FunctionEnd
 
 Section "Uninstall"
 
+  ; Stop OpenVPN if currently running
   DetailPrint "Service REMOVE"
   nsExec::ExecToLog '"$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe" -remove'
   Pop $R0 # return value/error/timeout
 
+!ifdef USE_XGUI
+  DetailPrint "XML Service REMOVE"
+  nsExec::ExecToLog '"$INSTDIR\bin\${XGUI_XMLSERV}" -remove'
+  Pop $R0 # return value/error/timeout
+!endif
+
   Sleep 2000
 
-  DetailPrint "TAP-Win32 REMOVE"
+  DetailPrint "TAP REMOVE"
   nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}'
   Pop $R0 # return value/error/timeout
   DetailPrint "tapinstall remove returned: $R0"
@@ -650,11 +755,20 @@ Section "Uninstall"
   !endif
   !endif
 
-  !ifdef OPENVPN_GUI_DEFINED
+  !ifdef USE_GUI
     Delete "$INSTDIR\bin\${OPENVPN_GUI}"
     Delete "$DESKTOP\${PRODUCT_NAME} GUI.lnk"
   !endif
 
+  !ifdef USE_XGUI
+    Delete "$INSTDIR\bin\${XGUI_EXE}"
+    Delete "$INSTDIR\bin\${XGUI_TRAY}"
+    Delete "$INSTDIR\bin\${XGUI_XMLSERV}"
+    RMDir /r "$INSTDIR\${XGUI_HTDOCS}"
+    Delete "$DESKTOP\${XGUI_AJAX_GUI_NAME}.lnk"
+    Delete "$DESKTOP\${PRODUCT_NAME} GUI.lnk"
+  !endif
+
   Delete "$INSTDIR\bin\${PRODUCT_UNIX_NAME}.exe"
   Delete "$INSTDIR\bin\${PRODUCT_UNIX_NAME}serv.exe"
   Delete "$INSTDIR\bin\libeay32.dll"
index 864cf190a463e1defaf15534882051cc97aac437..09626ed8a2ed457d9030fab75965bd6d86a41189 100644 (file)
 !define OPENVPN_GUI_DIR "../openvpn-gui"
 !define OPENVPN_GUI     "openvpn-gui-1.0.3.exe"
 
+# Include the OpenVPN XML-based GUI exe in the installer.
+# May be undefined.
+!define OPENVPN_XGUI_DIR "../ovpnxml"
+
 # Prebuilt libraries.  DMALLOC is optional.
 !define OPENSSL_DIR      "../openssl-0.9.7m"
 !define LZO_DIR                  "../lzo-2.02"
@@ -74,6 +78,9 @@
 # set to "yes" or "no"
 !define CLEAN "yes"
 
+# Don't strip executables and DLLs
+;!define NO_STRIP
+
 ; DEBUGGING -- set to something like "-DBG2"
 !define OUTFILE_LABEL ""
 
@@ -82,6 +89,6 @@
 
 # include a sample configuration file and key
 ;!define SAMPCONF_DIR   "test-key"
-;!define SAMPCONF_CONF  "test.ovpn"
-;!define SAMPCONF_P12   "test.p12"
-;!define SAMPCONF_TA    "ta.key"
+!define SAMPCONF_CONF  "test.ovpn"
+!define SAMPCONF_P12   "test.p12"
+!define SAMPCONF_TA    "ta.key"
index 1a2e46700a53eb2575ab77c5ab9cef1c6d38a8fb..fd4de2d407bed29a7902fc18b4a6ebb18f8bfef8 100644 (file)
@@ -1,2 +1,2 @@
 dnl define the OpenVPN version
-define(PRODUCT_VERSION,[2.1_rc7a])
+define(PRODUCT_VERSION,[2.1_rc7b])