; /* ; tinc.nsi -- NSIS installer script for tinc ; Copyright (C) 2004-2005 Guus Sliepen ; ; 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. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ; ; $Id: tinc.nsi 1 2005-04-22 14:58:24Z guus $ ; */ !include "MUI.nsh" !define VERSION "1.0.13" ;General Name "tinc ${VERSION}" OutFile "tinc-${VERSION}-install.exe" InstallDir "$PROGRAMFILES\tinc" InstallDirRegKey HKLM "Software\tinc" "" ;Interface settings !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "tinc.bmp" !define MUI_ABORTWARNING !define MUI_LICENSEPAGE_TEXT_BOTTOM "If you have read the license, click OK to continue. You do not have to agree with this license if you do not intend to distribute copies of this software." !define MUI_LICENSEPAGE_BUTTON "OK" !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED ;Pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "COPYING.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_FINISH ;Languages !insertmacro MUI_LANGUAGE "English" ;Installer section Section "The tinc daemon" SecDaemon SetOutPath "$INSTDIR" SetOverwrite on File "..\src\tincd.exe" File "COPYING.txt" File "README.txt" WriteRegStr HKLM "Software\tinc" "" $INSTDIR WriteUninstaller "$INSTDIR\Uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\tinc" "DisplayName" "Tinc ${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\tinc" "UninstallString" '"$INSTDIR\Uninstall.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\tinc" "DisplayVersion" "${VERSION}" SectionEnd Section "The documentation" SecDocumentation SetOutPath "$INSTDIR\doc" SetOverwrite on File "..\doc\tinc.pdf" File "..\doc\tinc.html" File "..\doc\tinc_*.html" SectionEnd Section "TAP-Win32 Virtual Ethernet Adapter" SecTAP32 SetOutPath "$INSTDIR\tap-win32" SetOverwrite on File "tap-win32\addtap.bat" File "tap-win32\deltapall.bat" File "tap-win32\OemWin2k.inf" File "tap-win32\tap0901.sys" File "tap-win32\tap0901.cat" File "tap-win32\tapinstall.exe" SectionEnd Section "TAP-Win64 Virtual Ethernet Adapter" SecTAP64 SetOutPath "$INSTDIR\tap-win64" SetOverwrite on File "tap-win64\addtap.bat" File "tap-win64\deltapall.bat" File "tap-win64\OemWin2k.inf" File "tap-win64\tap0901.sys" File "tap-win64\tap0901.cat" File "tap-win64\tapinstall.exe" SectionEnd ;Uninstaller section Section "Uninstall" RMDir /r "$INSTDIR\doc" RMDir /r "$INSTDIR\tap-win32" RMDir /r "$INSTDIR\tap-win64" Delete "$INSTDIR\tincd.exe" Delete "$INSTDIR\COPYING.txt" Delete "$INSTDIR\README.txt" Delete "$INSTDIR\Uninstall.exe" RMDir "$INSTDIR" DeleteRegKey HKLM "Software\tinc" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\tinc" SectionEnd