2 ; $Id: installer.nsi,v 1.4 2004/09/15 20:01:09 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
55 File ..\..\..\lib\dot_draw\olsrd_dot_draw.dll
57 WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org DisplayName olsr.org
58 WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org UninstallString $INSTDIR\uninstall.exe
60 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org NoModify 1
61 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org NoRepair 1
63 WriteUninstaller $INSTDIR\uninstall.exe
67 Section "Start Menu Shortcuts"
69 CreateDirectory $SMPROGRAMS\olsr.org
71 CreateShortCut "$SMPROGRAMS\olsr.org\OLSR Switch.lnk" $INSTDIR\Switch.exe "" $INSTDIR\Switch.exe 0
72 CreateShortCut $SMPROGRAMS\olsr.org\README-WIN32.lnk $INSTDIR\README-WIN32.txt
73 CreateShortCut $SMPROGRAMS\olsr.org\Uninstall.lnk $INSTDIR\uninstall.exe "" $INSTDIR\uninstall.exe 0
77 Section "Desktop Shortcut"
79 CreateShortCut "$DESKTOP\OLSR Switch.lnk" $INSTDIR\Switch.exe "" $INSTDIR\Switch.exe 0
83 Section "File Association (*.olsr)"
85 WriteRegStr HKCR .olsr "" OlsrOrgConfigFile
87 WriteRegStr HKCR OlsrOrgConfigFile "" "olsr.org Configuration File"
89 WriteRegStr HKCR OlsrOrgConfigFile\shell "" open
90 WriteRegStr HKCR OlsrOrgConfigFile\DefaultIcon "" $INSTDIR\Switch.exe,0
91 WriteRegStr HKCR OlsrOrgConfigFile\shell\open\command "" '$INSTDIR\Switch.exe "%1"'
97 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org
99 DeleteRegKey HKCR .olsr
100 DeleteRegKey HKCR OlsrOrgConfigFile
102 Delete $INSTDIR\Switch.exe
103 Delete $INSTDIR\Shim.exe
104 Delete $INSTDIR\olsrd.exe
105 Delete $INSTDIR\README-WIN32.txt
106 Delete $INSTDIR\linux-manual.txt
107 Delete $INSTDIR\Default.olsr
108 Delete $INSTDIR\uninstall.exe
112 Delete "$SMPROGRAMS\olsr.org\OLSR Switch.lnk"
113 Delete $SMPROGRAMS\olsr.org\README-WIN32.lnk
114 Delete $SMPROGRAMS\olsr.org\Uninstall.lnk
116 RMDir $SMPROGRAMS\olsr.org
118 Delete "$DESKTOP\OLSR Switch.lnk"