packages: nsis-openvpn/openvpn-gui.nsi (NEW) - add to cvs, messing with pat...
glen
glen at pld-linux.org
Thu Dec 9 21:05:23 CET 2010
Author: glen Date: Thu Dec 9 20:05:23 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add to cvs, messing with patches sucks
---- Files affected:
packages/nsis-openvpn:
openvpn-gui.nsi (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/nsis-openvpn/openvpn-gui.nsi
diff -u /dev/null packages/nsis-openvpn/openvpn-gui.nsi:1.1
--- /dev/null Thu Dec 9 21:05:23 2010
+++ packages/nsis-openvpn/openvpn-gui.nsi Thu Dec 9 21:05:15 2010
@@ -0,0 +1,890 @@
+; ****************************************************************************
+; * Copyright (C) 2002-2006 OpenVPN Solutions LLC *
+; * 2004-2006 Updated by Mathias Sundman <mathias at openvpn.se> *
+; * This program is free software; you can redistribute it and/or modify *
+; * it under the terms of the GNU General Public License as published by *
+; * the Free Software Foundation; either version 2 of the License, or *
+; * (at your option) any later version. *
+; ****************************************************************************
+
+; OpenVPN install script for Windows, using NSIS
+
+!include "MUI.nsh"
+!include "setpath.nsi"
+
+!define HOME "openvpn"
+!define BIN "${HOME}\bin"
+
+!define PRODUCT_NAME "OpenVPN"
+!define OPENVPN_VERSION "2.0.9"
+!define GUI_VERSION "1.0.3"
+!define MYCERT_VERSION "0.3.2b"
+!define VERSION "${OPENVPN_VERSION}-gui-${GUI_VERSION}"
+
+!define TAP "tap0801"
+!define TAPDRV "${TAP}.sys"
+
+; something like "-DBG2"
+!define OUTFILE_LABEL ""
+
+; Default OpenVPN Service registry settings
+!define SERV_CONFIG_DIR "$INSTDIR\config"
+!define SERV_CONFIG_EXT "ovpn"
+!define SERV_EXE_PATH "$INSTDIR\bin\openvpn.exe"
+!define SERV_LOG_DIR "$INSTDIR\log"
+!define SERV_PRIORITY "NORMAL_PRIORITY_CLASS"
+!define SERV_LOG_APPEND "0"
+
+; Default OpenVPN GUI registry settings
+!define GUI_CONFIG_DIR "$INSTDIR\config"
+!define GUI_CONFIG_EXT "ovpn"
+!define GUI_EXE_PATH "$INSTDIR\bin\openvpn.exe"
+!define GUI_LOG_DIR "$INSTDIR\log"
+!define GUI_PRIORITY "NORMAL_PRIORITY_CLASS"
+!define GUI_LOG_APPEND "0"
+!define GUI_ALLOW_EDIT "1"
+!define GUI_ALLOW_SERVICE "0"
+!define GUI_ALLOW_PROXY "1"
+!define GUI_ALLOW_PASSWORD "1"
+!define GUI_SERVICE_ONLY "0"
+!define GUI_PSW_ATTEMPTS "3"
+!define GUI_UP_TIMEOUT "15"
+!define GUI_DOWN_TIMEOUT "10"
+!define GUI_PRE_TIMEOUT "10"
+!define GUI_SHOW_BALLOON "1"
+!define GUI_SHOW_SCRIPT "1"
+!define GUI_LOG_VIEWER "$WINDIR\notepad.exe"
+!define GUI_EDITOR "$WINDIR\notepad.exe"
+!define GUI_SUSPEND "1"
+!define GUI_SILENT_CONN "0"
+
+;--------------------------------
+;Configuration
+
+ ;General
+
+ OutFile "openvpn-${VERSION}${OUTFILE_LABEL}-install.exe"
+
+ SetCompressor bzip2
+
+ ShowInstDetails show
+ ShowUninstDetails show
+
+ ;Folder selection page
+ InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+
+ ;Remember install folder
+ InstallDirRegKey HKCU "Software\${PRODUCT_NAME}" ""
+
+ !define SOURCE_ZIP_DEST "openvpn-${OPENVPN_VERSION}.zip"
+ !define SOURCE_ZIP_SRC "${HOME}\${SOURCE_ZIP_DEST}"
+
+ !define GUI_SOURCE_ZIP_DEST "openvpn-gui-${GUI_VERSION}.zip"
+ !define GUI_SOURCE_ZIP_SRC "${HOME}\${GUI_SOURCE_ZIP_DEST}"
+
+ !define MYCERT_SOURCE_ZIP_DEST "mycert-src-${MYCERT_VERSION}.zip"
+ !define MYCERT_SOURCE_ZIP_SRC "${HOME}\mycertwizard\${MYCERT_SOURCE_ZIP_DEST}"
+
+# For testing only
+#!define SOURCE_ZIP_SRC "c:\src\openvpn\install-win32\null.zip"
+
+;--------------------------------
+;Modern UI Configuration
+
+ Name "${PRODUCT_NAME} ${VERSION}"
+
+ !define MUI_COMPONENTSPAGE_SMALLDESC
+ !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\INSTALL-win32.txt"
+ !define MUI_FINISHPAGE_NOAUTOCLOSE
+ !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+ !define MUI_ABORTWARNING
+ !define MUI_ICON "${HOME}\install-win32\openvpn.ico"
+ !define MUI_UNICON "${HOME}\install-win32\openvpn.ico"
+ !define MUI_HEADERIMAGE
+ !define MUI_HEADERIMAGE_BITMAP "${HOME}\install-win32\install-whirl.bmp"
+ !define MUI_UNFINISHPAGE_NOAUTOCLOSE
+
+ !define MUI_WELCOMEPAGE_TITLE "Welcome to the ${PRODUCT_NAME} Setup Wizard"
+
+ !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of:\r\n\r\nOpenVPN - an Open Source VPN package by James Yonan.\r\n\r\nOpenVPN GUI - A Graphical User Interface for OpenVPN by Mathias Sundman\r\n\r\nMy Certificate Wizard - A tool to create a certificate request by Vlada Macek\r\n\r\nNote that the Windows version of OpenVPN will only run on Win 2000, XP, or higher.\r\n\r\n\r\n"
+
+ !define MUI_COMPONENTSPAGE_TEXT_TOP "Select the components to install/upgrade. Stop any OpenVPN or OpenVPN GUI processes or the OpenVPN service if it is running."
+
+ !insertmacro MUI_PAGE_WELCOME
+ !insertmacro MUI_PAGE_LICENSE "${HOME}\install-win32\license.txt"
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+ !insertmacro MUI_UNPAGE_FINISH
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Language Strings
+
+ LangString DESC_SecOpenVPNUserSpace ${LANG_ENGLISH} "Install OpenVPN user-space components, including openvpn.exe."
+
+ LangString DESC_SecOpenVPNEasyRSA ${LANG_ENGLISH} "Install OpenVPN 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_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP-Win32 virtual device driver. Will not interfere with CIPE."
+
+ LangString DESC_SecTAPHidden ${LANG_ENGLISH} "Install the TAP device as hidden. The TAP device will not be visible under Network Connections."
+
+ LangString DESC_SecService ${LANG_ENGLISH} "Install the OpenVPN service wrapper (openvpnserv.exe)"
+
+ LangString DESC_SecOpenSSLUtilities ${LANG_ENGLISH} "Install the OpenSSL Utilities (used for generating public/private key pairs)."
+
+; LangString DESC_SecOpenVPNSource ${LANG_ENGLISH} "Install (but do not unzip) the source code zip files."
+
+ LangString DESC_SecAddPath ${LANG_ENGLISH} "Add OpenVPN executable directory to the current user's PATH."
+
+ LangString DESC_SecAddShortcuts ${LANG_ENGLISH} "Add shortcuts to the current user's Start Menu."
+
+ LangString DESC_SecFileAssociation ${LANG_ENGLISH} "Register OpenVPN config file association (*.${SERV_CONFIG_EXT})"
+
+ LangString DESC_SecGUI ${LANG_ENGLISH} "Install OpenVPN GUI (A System tray application to control OpenVPN)"
+
+ LangString DESC_SecGUIAuto ${LANG_ENGLISH} "Automatically start OpenVPN GUI at system startup"
+
+ LangString DESC_SecMYCERT ${LANG_ENGLISH} "Install My Certificate Wizard - A tool to create a certificate request."
+;--------------------------------
+;Data
+
+; LicenseData "${HOME}\install-win32\license.txt"
+
+;--------------------------------
+;Reserve Files
+
+ ;Things that need to be extracted on first (keep these lines before any File command!)
+ ;Only useful for BZIP2 compression
+
+ ReserveFile "${HOME}\install-win32\install-whirl.bmp"
+
+;--------------------------------
+;Macros
+
+!macro WriteRegStringIfUndef ROOT SUBKEY KEY VALUE
+Push $R0
+ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "${KEY}"
+StrCmp $R0 "" +1 +2
+WriteRegStr "${ROOT}" "${SUBKEY}" "${KEY}" '${VALUE}'
+Pop $R0
+!macroend
+
+!macro DelRegStringIfUnchanged ROOT SUBKEY KEY VALUE
+Push $R0
+ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "${KEY}"
+StrCmp $R0 '${VALUE}' +1 +2
+DeleteRegValue "${ROOT}" "${SUBKEY}" "${KEY}"
+Pop $R0
+!macroend
+
+!macro DelRegKeyIfUnchanged ROOT SUBKEY VALUE
+Push $R0
+ReadRegStr $R0 "${ROOT}" "${SUBKEY}" ""
+StrCmp $R0 '${VALUE}' +1 +2
+DeleteRegKey "${ROOT}" "${SUBKEY}"
+Pop $R0
+!macroend
+
+!macro DelRegKeyIfEmpty ROOT SUBKEY
+Push $R0
+EnumRegValue $R0 "${ROOT}" "${SUBKEY}" 1
+StrCmp $R0 "" +1 +2
+DeleteRegKey /ifempty "${ROOT}" "${SUBKEY}"
+Pop $R0
+!macroend
+
+;------------------------------------------
+;Set reboot flag based on tapinstall return
+
+Function CheckReboot
+ IntCmp $R0 1 "" noreboot noreboot
+ IntOp $R0 0 & 0
+ SetRebootFlag true
+ DetailPrint "REBOOT flag set"
+ noreboot:
+FunctionEnd
+
+;--------------------------------
+;Installer Sections
+
+!define SF_SELECTED 1
+!define SF_RO 16
+!define SF_NOT_RO 0xFFFFFFEF
+
+Section "OpenVPN User-Space Components" SecOpenVPNUserSpace
+
+ SetOverwrite on
+ SetOutPath "$INSTDIR\bin"
+
+ File "${HOME}\openvpn.exe"
+
+SectionEnd
+
+Section "OpenVPN RSA Certificate Management Scripts" SecOpenVPNEasyRSA
+
+ SetOverwrite on
+ SetOutPath "$INSTDIR\easy-rsa"
+
+ File "${HOME}\easy-rsa\openssl.cnf.sample"
+ File "${HOME}\easy-rsa\vars.bat.sample"
+
+ File "${HOME}\easy-rsa\init-config.bat"
+
+ File "${HOME}\easy-rsa\README.txt"
+ File "${HOME}\easy-rsa\build-ca.bat"
+ File "${HOME}\easy-rsa\build-dh.bat"
+ File "${HOME}\easy-rsa\build-key-server.bat"
+ File "${HOME}\easy-rsa\build-key.bat"
+ File "${HOME}\easy-rsa\build-key-pkcs12.bat"
+ File "${HOME}\easy-rsa\clean-all.bat"
+ File "${HOME}\easy-rsa\index.txt.start"
+ File "${HOME}\easy-rsa\revoke-full.bat"
+ File "${HOME}\easy-rsa\serial.start"
+
+SectionEnd
+
+Section "OpenVPN GUI" SecGUI
+
+ SetOverwrite on
+ SetOutPath "$INSTDIR\bin"
+ File "${HOME}\openvpn-gui.exe"
+
+ # Include your custom config file(s) here.
+ SetOutPath "$INSTDIR\config"
+ ;File "${HOME}\config\Office.ovpn"
+
+ SetOutPath "$INSTDIR\sample-config"
+ File "${HOME}\sample-config\sample.${SERV_CONFIG_EXT}"
+ File "${HOME}\sample-config\client.${SERV_CONFIG_EXT}"
+ File "${HOME}\sample-config\server.${SERV_CONFIG_EXT}"
+
+ SetOutPath "$INSTDIR"
+ File "${HOME}\install-win32\OpenVPN GUI ReadMe.txt"
+
+ CreateDirectory "$INSTDIR\log"
+ CreateDirectory "$INSTDIR\config"
+
+SectionEnd
+
+Section "AutoStart OpenVPN GUI" SecGUIAuto
+SectionEnd
+
+Section "My Certificate Wizard" SecMYCERT
+
+ SetOverwrite on
+ SetOutPath "$INSTDIR\bin"
+ File "${HOME}\mycertwizard\mycert.exe"
+ File "${HOME}\mycertwizard\mycert.ini"
+
+SectionEnd
+
+Section "Hide the TAP-Win32 Virtual Ethernet Adapter" SecTAPHidden
+SectionEnd
+
+Section "OpenVPN Service" SecService
+
+ SetOverwrite on
+
+ SetOutPath "$INSTDIR\bin"
+ File "${HOME}\service-win32\openvpnserv.exe"
+
+ FileOpen $R0 "$INSTDIR\config\README.txt" w
+ FileWrite $R0 "This directory should contain OpenVPN configuration files$\r$\n"
+ FileWrite $R0 "each having an extension of .${SERV_CONFIG_EXT}$\r$\n"
+ FileWrite $R0 "$\r$\n"
+ FileWrite $R0 "When OpenVPN is started as a service, a separate OpenVPN$\r$\n"
+ FileWrite $R0 "process will be instantiated for each configuration file.$\r$\n"
+ FileClose $R0
+
+ SetOutPath "$INSTDIR\sample-config"
+ File "${HOME}\sample-config\sample.${SERV_CONFIG_EXT}"
+ File "${HOME}\sample-config\client.${SERV_CONFIG_EXT}"
+ File "${HOME}\sample-config\server.${SERV_CONFIG_EXT}"
+
+
+ CreateDirectory "$INSTDIR\log"
+ FileOpen $R0 "$INSTDIR\log\README.txt" w
+ FileWrite $R0 "This directory will contain the log files for OpenVPN$\r$\n"
+ FileWrite $R0 "sessions which are being run as a service.$\r$\n"
+ FileClose $R0
+
+SectionEnd
+
+Section "OpenVPN File Associations" SecFileAssociation
+SectionEnd
+
+Section "OpenSSL DLLs" SecOpenSSLDLLs
+
+ SetOverwrite on
+ SetOutPath "$INSTDIR\bin"
+ File "${BIN}\libeay32.dll"
+ File "${BIN}\libssl32.dll"
+
+SectionEnd
+
+Section "OpenSSL Utilities" SecOpenSSLUtilities
+
+ SetOverwrite on
+ SetOutPath "$INSTDIR\bin"
+ File "${BIN}\openssl.exe"
+
+SectionEnd
+
+Section "TAP-Win32 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 '"$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 "pause$\r$\n"
+ FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}$\r$\n'
+ FileWrite $R0 "pause$\r$\n"
+ FileClose $R0
+
+ ; Check if we are running on a 64 bit system.
+ System::Call "kernel32::GetCurrentProcess() i .s"
+ System::Call "kernel32::IsWow64Process(i s, *i .r0)"
+ IntCmp $0 0 tap-win32
+
+ DetailPrint "We are running on a 64-bit system."
+
+ SetOutPath "$INSTDIR\bin"
+ File "${HOME}\tap-win64\i386\tapinstall.exe"
+ SetOutPath "$INSTDIR\driver"
+ File "${HOME}\tap-win64\i386\${TAPDRV}"
+
+ SectionGetFlags ${SecTAPHidden} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" nohiddentap64 nohiddentap64
+
+ File "${HOME}\tap-win64-hiddentap\i386\OemWin2k.inf"
+ goto end
+
+ nohiddentap64:
+ File "${HOME}\tap-win64\i386\OemWin2k.inf"
+
+ goto end
+
+ tap-win32:
+
+ DetailPrint "We are running on a 32-bit system."
+
+ SetOutPath "$INSTDIR\bin"
+ File "${HOME}\tap-win32\i386\tapinstall.exe"
+ SetOutPath "$INSTDIR\driver"
+ File "${HOME}\tap-win32\i386\${TAPDRV}"
+
+ SectionGetFlags ${SecTAPHidden} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" nohiddentap32 nohiddentap32
+
+ File "${HOME}\tap-win32-hiddentap\i386\OemWin2k.inf"
+ goto end
+
+ nohiddentap32:
+ File "${HOME}\tap-win32\i386\OemWin2k.inf"
+
+ end:
+
+SectionEnd
+
+Section "Add OpenVPN to PATH" SecAddPath
+
+ ; remove previously set path (if any)
+ Push "$INSTDIR\bin"
+ Call RemoveFromPath
+
+ ; append our bin directory to end of current user path
+ Push "$INSTDIR\bin"
+ Call AddToPath
+
+SectionEnd
+
+Section "Add Shortcuts to Start Menu" SecAddShortcuts
+
+ SetOverwrite on
+ CreateDirectory "$SMPROGRAMS\OpenVPN"
+ CreateShortCut "$SMPROGRAMS\OpenVPN\OpenVPN Win32 README.lnk" "$INSTDIR\INSTALL-win32.txt" ""
+ WriteINIStr "$SMPROGRAMS\OpenVPN\OpenVPN Manual Page.url" "InternetShortcut" "URL" "http://openvpn.sourceforge.net/man.html"
+ WriteINIStr "$SMPROGRAMS\OpenVPN\OpenVPN Web Site.url" "InternetShortcut" "URL" "http://openvpn.sourceforge.net/"
+ CreateShortCut "$SMPROGRAMS\OpenVPN\Uninstall OpenVPN.lnk" "$INSTDIR\Uninstall.exe"
+
+ SectionGetFlags ${SecGUI} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" nogui nogui
+
+ CreateShortCut "$SMPROGRAMS\OpenVPN\OpenVPN GUI.lnk" "$INSTDIR\bin\openvpn-gui.exe"
+ CreateShortCut "$SMPROGRAMS\OpenVPN\OpenVPN GUI ReadMe.lnk" "$INSTDIR\OpenVPN GUI ReadMe.txt"
+
+nogui:
+
+ SectionGetFlags ${SecMYCERT} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" nomycert nomycert
+
+ CreateShortCut "$SMPROGRAMS\OpenVPN\My Certificate Wizard.lnk" "$INSTDIR\bin\mycert.exe"
+
+nomycert:
+
+SectionEnd
+
+
+;Section "Source Code" SecOpenVPNSource
+;
+; SetOverwrite on
+; SetOutPath "$INSTDIR"
+; File "${SOURCE_ZIP_SRC}"
+;
+; SectionGetFlags ${SecGUI} $R0
+; IntOp $R0 $R0 & ${SF_SELECTED}
+; IntCmp $R0 ${SF_SELECTED} "" nogui nogui
+; File "${GUI_SOURCE_ZIP_SRC}"
+;
+; nogui:
+; SectionGetFlags ${SecMYCERT} $R0
+; IntOp $R0 $R0 & ${SF_SELECTED}
+; IntCmp $R0 ${SF_SELECTED} "" nomycert nomycert
+;
+; File "${MYCERT_SOURCE_ZIP_SRC}"
+;
+; nomycert:
+;
+;SectionEnd
+
+;--------------------
+;Post-install section
+
+Section -post
+
+ ; delete old devcon.exe
+ Delete "$INSTDIR\bin\devcon.exe"
+
+ ;
+ ; install/upgrade TAP-Win32 driver if selected, using tapinstall.exe
+ ;
+ SectionGetFlags ${SecTAP} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" notap notap
+ ; TAP install/update was selected.
+ ; Should we install or update?
+ ; If tapinstall error occurred, $5 will
+ ; be nonzero.
+ IntOp $5 0 & 0
+ nsExec::ExecToStack '"$INSTDIR\bin\tapinstall.exe" hwids ${TAP}'
+ Pop $R0 # return value/error/timeout
+ IntOp $5 $5 | $R0
+ DetailPrint "tapinstall hwids returned: $R0"
+
+ ; If tapinstall output string contains "${TAP}" we assume
+ ; that TAP device has been previously installed,
+ ; therefore we will update, not install.
+ Push "${TAP}"
+ Call StrStr
+ Pop $R0
+
+ IntCmp $5 0 "" tapinstall_check_error tapinstall_check_error
+ IntCmp $R0 -1 tapinstall
+
+ ;tapupdate:
+ DetailPrint "TAP-Win32 UPDATE"
+ nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" update "$INSTDIR\driver\OemWin2k.inf" ${TAP}'
+ Pop $R0 # return value/error/timeout
+ Call CheckReboot
+ IntOp $5 $5 | $R0
+ DetailPrint "tapinstall update returned: $R0"
+ Goto tapinstall_check_error
+
+ tapinstall:
+ DetailPrint "TAP-Win32 REMOVE OLD TAP"
+ nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAP'
+ Pop $R0 # return value/error/timeout
+ DetailPrint "tapinstall remove TAP returned: $R0"
+ nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAPDEV'
+ Pop $R0 # return value/error/timeout
+ DetailPrint "tapinstall remove TAPDEV returned: $R0"
+
+ DetailPrint "TAP-Win32 INSTALL (${TAP})"
+ nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}'
+ Pop $R0 # return value/error/timeout
+ Call CheckReboot
+ IntOp $5 $5 | $R0
+ DetailPrint "tapinstall install returned: $R0"
+
+ tapinstall_check_error:
+ DetailPrint "tapinstall cumulative status: $5"
+ IntCmp $5 0 notap
+ MessageBox MB_OK "An error occurred installing the TAP-Win32 device driver."
+
+ notap:
+
+ ; Store install folder in registry
+ WriteRegStr HKLM SOFTWARE\OpenVPN "" $INSTDIR
+
+ ; install as a service if requested
+ SectionGetFlags ${SecService} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" noserv noserv
+
+ ; set registry parameters for openvpnserv
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "config_dir" "${SERV_CONFIG_DIR}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "config_ext" "${SERV_CONFIG_EXT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "exe_path" "${SERV_EXE_PATH}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "log_dir" "${SERV_LOG_DIR}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "priority" "${SERV_PRIORITY}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "log_append" "${SERV_LOG_APPEND}"
+
+ ; install openvpnserv as a service
+ DetailPrint "Previous Service REMOVE (if exists)"
+ nsExec::ExecToLog '"$INSTDIR\bin\openvpnserv.exe" -remove'
+ Pop $R0 # return value/error/timeout
+ DetailPrint "Service INSTALL"
+ nsExec::ExecToLog '"$INSTDIR\bin\openvpnserv.exe" -install'
+ Pop $R0 # return value/error/timeout
+
+ noserv:
+ ; Store install folder in registry
+ WriteRegStr HKLM SOFTWARE\OpenVPN-GUI "" $INSTDIR
+
+ ; Set registry keys for openvpn-gui if gui is requested
+ SectionGetFlags ${SecGUI} $R0
+ IntOp $R0 $R0 & ${SF_SELECTED}
+ IntCmp $R0 ${SF_SELECTED} "" nogui nogui
+
+ ; set registry parameters for openvpn-gui
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "config_dir" "${GUI_CONFIG_DIR}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "config_ext" "${GUI_CONFIG_EXT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "exe_path" "${GUI_EXE_PATH}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "log_dir" "${GUI_LOG_DIR}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "priority" "${GUI_PRIORITY}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "log_append" "${GUI_LOG_APPEND}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "allow_edit" "${GUI_ALLOW_EDIT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "allow_service" "${GUI_ALLOW_SERVICE}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "allow_proxy" "${GUI_ALLOW_PROXY}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "allow_password" "${GUI_ALLOW_PASSWORD}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "service_only" "${GUI_SERVICE_ONLY}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "log_viewer" "${GUI_LOG_VIEWER}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "passphrase_attempts" "${GUI_PSW_ATTEMPTS}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "editor" "${GUI_EDITOR}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "connectscript_timeout" "${GUI_UP_TIMEOUT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "disconnectscript_timeout" "${GUI_DOWN_TIMEOUT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "preconnectscript_timeout" "${GUI_PRE_TIMEOUT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "silent_connection" "${GUI_SILENT_CONN}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "show_balloon" "${GUI_SHOW_BALLOON}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "show_script_window" "${GUI_SHOW_SCRIPT}"
+ !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN-GUI" "disconnect_on_suspend" "${GUI_SUSPEND}"
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list