2 ; $Id: installer.nsi,v 1.2 2004/09/15 13:38:30 tlopatic Exp $
3 ; Copyright (C) 2004 Thomas Lopatic (thomas@lopatic.de)
5 ; This file is part of olsr.org.
7 ; olsr.org is free software; you can redistribute it and/or modify
8 ; it under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation; either version 2 of the License, or
10 ; (at your option) any later version.
12 ; olsr.org is distributed in the hope that it will be useful,
13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ; GNU General Public License for more details.
17 ; You should have received a copy of the GNU General Public License
18 ; along with olsr.org; if not, write to the Free Software
19 ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 OutFile olsr-setup.exe
24 BrandingText "www.olsr.org"
25 InstallDir $PROGRAMFILES\olsr.org
26 LicenseData ..\..\..\gpl.txt
34 UninstPage uninstConfirm
38 MessageBox MB_YESNO "This will install olsr.org 0.4.7 on your computer. Continue?" IDYES NoAbort
43 Section "Program Files"
49 File ..\Main\Release\Switch.exe
50 File ..\Shim\Release\Shim.exe
51 File ..\..\..\olsrd.exe
52 File ..\..\..\README-WIN32.txt
54 File /oname=Default.olsr ..\..\..\files\olsrd.conf.default.win32
56 WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org DisplayName olsr.org
57 WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org UninstallString $INSTDIR\uninstall.exe
59 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org NoModify 1
60 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org NoRepair 1
62 WriteUninstaller $INSTDIR\uninstall.exe
66 Section "Start Menu Shortcuts"
68 CreateDirectory $SMPROGRAMS\olsr.org
70 CreateShortCut "$SMPROGRAMS\olsr.org\OLSR Switch.lnk" $INSTDIR\Switch.exe "" $INSTDIR\Switch.exe 0
71 CreateShortCut $SMPROGRAMS\olsr.org\README-WIN32.lnk $INSTDIR\README-WIN32.txt
72 CreateShortCut $SMPROGRAMS\olsr.org\Uninstall.lnk $INSTDIR\uninstall.exe "" $INSTDIR\uninstall.exe 0
76 Section "Desktop Shortcut"
78 CreateShortCut "$DESKTOP\OLSR Switch.lnk" $INSTDIR\Switch.exe "" $INSTDIR\Switch.exe 0
82 Section "File Association (*.olsr)"
84 WriteRegStr HKCR .olsr "" OlsrOrgConfigFile
86 WriteRegStr HKCR OlsrOrgConfigFile "" "olsr.org Configuration File"
88 WriteRegStr HKCR OlsrOrgConfigFile\shell "" open
89 WriteRegStr HKCR OlsrOrgConfigFile\DefaultIcon "" $INSTDIR\Switch.exe,0
90 WriteRegStr HKCR OlsrOrgConfigFile\shell\open\command "" '$INSTDIR\Switch.exe "%1"'
96 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org
98 DeleteRegKey HKCR .olsr
99 DeleteRegKey HKCR OlsrOrgConfigFile
101 Delete $INSTDIR\Switch.exe
102 Delete $INSTDIR\Shim.exe
103 Delete $INSTDIR\olsrd.exe
104 Delete $INSTDIR\README-WIN32.txt
105 Delete $INSTDIR\linux-manual.txt
106 Delete $INSTDIR\Default.olsr
107 Delete $INSTDIR\uninstall.exe
111 Delete "$SMPROGRAMS\olsr.org\OLSR Switch.lnk"
112 Delete $SMPROGRAMS\olsr.org\README-WIN32.lnk
113 Delete $SMPROGRAMS\olsr.org\Uninstall.lnk
115 RMDir $SMPROGRAMS\olsr.org
117 Delete "$DESKTOP\OLSR Switch.lnk"