1; The olsr.org Optimized Link-State Routing daemon (olsrd)
2;
3; (c) by the OLSR project
4;
5; See our Git repository to find out who worked on this file
6; and thus is a copyright holder on it.
7;
8; All rights reserved.
9;
10; Redistribution and use in source and binary forms, with or without
11; modification, are permitted provided that the following conditions
12; are met:
13;
14; * Redistributions of source code must retain the above copyright
15;   notice, this list of conditions and the following disclaimer.
16; * Redistributions in binary form must reproduce the above copyright
17;   notice, this list of conditions and the following disclaimer in
18;   the documentation and/or other materials provided with the
19;   distribution.
20; * Neither the name of olsr.org, olsrd nor the names of its
21;   contributors may be used to endorse or promote products derived
22;   from this software without specific prior written permission.
23;
24; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28; COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29; INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35; POSSIBILITY OF SUCH DAMAGE.
36;
37; Visit http://www.olsr.org for more information.
38;
39; If you find this software useful feel free to make a donation
40; to the project. For more information see the website or contact
41; the copyright holders.
42;
43
44Name olsr.org
45OutFile ..\..\..\olsr-setup.exe
46BrandingText "www.olsr.org"
47InstallDir $PROGRAMFILES\olsr.org
48LicenseData ..\..\..\license.txt
49XPStyle on
50
51Page license
52Page components
53Page directory
54Page instfiles
55
56UninstPage uninstConfirm
57UninstPage instfiles
58
59Function .onInit
60        MessageBox MB_YESNO "This will install olsr.org 0.9.8 on your computer. Continue?" IDYES NoAbort
61        Abort
62NoAbort:
63FunctionEnd
64
65InstType "ETX Configuration (recommended)"
66InstType "RFC Configuration"
67
68Section "Program Files"
69
70        SectionIn 1 2 RO
71
72        SetOutPath $INSTDIR
73
74        File ..\Main\release\Switch.exe
75        File ..\Shim\release\Shim.exe
76        File ..\..\..\olsrd.exe
77        File ..\..\..\src\cfgparser\olsrd_cfgparser.dll
78        File /oname=README.txt ..\..\..\README
79        File /oname=README-LQ.html ..\..\..\README-Link-Quality.html
80        File /oname=README-Fish-Eye.txt ..\..\..\README-Link-Quality-Fish-Eye.txt
81        File ..\..\..\README-Olsr-Switch.html
82        File linux-manual.txt
83        File ..\Main\RFC-Default.olsr
84        File ..\Main\LQ-Default.olsr
85        File ..\..\..\lib\dot_draw\olsrd_dot_draw.dll
86        File ..\..\..\lib\httpinfo\olsrd_httpinfo.dll
87        File ..\..\..\lib\mini\olsrd_mini.dll
88        File ..\..\..\lib\pgraph\olsrd_pgraph.dll
89        File ..\..\..\lib\secure\olsrd_secure.dll
90        File ..\..\..\lib\txtinfo\olsrd_txtinfo.dll
91
92        WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org DisplayName olsr.org
93        WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org UninstallString $INSTDIR\uninstall.exe
94
95        WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org NoModify 1
96        WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org NoRepair 1
97
98        WriteUninstaller $INSTDIR\uninstall.exe
99
100SectionEnd
101
102Section "ETX Configuration"
103
104        SectionIn 1 RO
105
106        File ..\..\..\gui\win32\Main\RFC-Default.olsr
107        File ..\..\..\gui\win32\Main\LQ-Default.olsr
108        File /oname=Default.olsr ..\..\..\gui\win32\Main\LQ-Default.olsr
109
110SectionEnd
111
112Section "RFC Configuration"
113
114        SectionIn 2 RO
115
116        File ..\..\..\gui\win32\Main\RFC-Default.olsr
117        File ..\..\..\gui\win32\Main\LQ-Default.olsr
118        File /oname=Default.olsr ..\..\..\gui\win32\Main\RFC-Default.olsr
119
120SectionEnd
121
122Section "Start Menu Shortcuts"
123
124        SectionIn 1 2
125
126        CreateDirectory $SMPROGRAMS\olsr.org
127
128        CreateShortCut "$SMPROGRAMS\olsr.org\OLSR Switch.lnk" $INSTDIR\Switch.exe "" $INSTDIR\Switch.exe 0
129        CreateShortCut $SMPROGRAMS\olsr.org\README.lnk $INSTDIR\README.txt
130        CreateShortCut $SMPROGRAMS\olsr.org\README-LQ.lnk $INSTDIR\README-LQ.html
131        CreateShortCut $SMPROGRAMS\olsr.org\Uninstall.lnk $INSTDIR\uninstall.exe "" $INSTDIR\uninstall.exe 0
132
133SectionEnd
134
135Section "Desktop Shortcut"
136
137        SectionIn 1 2
138
139        CreateShortCut "$DESKTOP\OLSR Switch.lnk" $INSTDIR\Switch.exe "" $INSTDIR\Switch.exe 0
140
141SectionEnd
142
143Section "File Association (*.olsr)"
144
145        SectionIn 1 2
146
147        WriteRegStr HKCR .olsr "" OlsrOrgConfigFile
148
149        WriteRegStr HKCR OlsrOrgConfigFile "" "olsr.org Configuration File"
150
151        WriteRegStr HKCR OlsrOrgConfigFile\shell "" open
152        WriteRegStr HKCR OlsrOrgConfigFile\DefaultIcon "" $INSTDIR\Switch.exe,0
153        WriteRegStr HKCR OlsrOrgConfigFile\shell\open\command "" '$INSTDIR\Switch.exe "%1"'
154
155SectionEnd
156
157Section "Uninstall"
158
159        DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\olsr.org
160
161        DeleteRegKey HKCR .olsr
162        DeleteRegKey HKCR OlsrOrgConfigFile
163
164        Delete $INSTDIR\Switch.exe
165        Delete $INSTDIR\Shim.exe
166        Delete $INSTDIR\olsrd.exe
167        Delete $INSTDIR\olsr_switch.exe
168	Delete $INSTDIR\olsrd_cfgparser.dll
169        Delete $INSTDIR\README.txt
170        Delete $INSTDIR\README-LQ.html
171        Delete $INSTDIR\README-Fish-Eye.txt
172        Delete $INSTDIR\README-Olsr-Switch.html
173        Delete $INSTDIR\linux-manual.txt
174        Delete $INSTDIR\Default.olsr
175        Delete $INSTDIR\RFC-Default.olsr
176        Delete $INSTDIR\LQ-Default.olsr
177	Delete $INSTDIR\olsrd.conf.rfc
178	Delete $INSTDIR\olsrd.conf.lq
179        Delete $INSTDIR\olsrd_dot_draw.dll
180        Delete $INSTDIR\olsrd_httpinfo.dll
181        Delete $INSTDIR\olsrd_mini.dll
182        Delete $INSTDIR\olsrd_pgraph.dll
183        Delete $INSTDIR\olsrd_secure.dll
184        Delete $INSTDIR\olsrd_txtinfo.dll
185        Delete $INSTDIR\uninstall.exe
186
187        RMDir $INSTDIR
188
189        Delete "$SMPROGRAMS\olsr.org\OLSR Switch.lnk"
190        Delete $SMPROGRAMS\olsr.org\README.lnk
191        Delete $SMPROGRAMS\olsr.org\README-LQ.lnk
192        Delete $SMPROGRAMS\olsr.org\Uninstall.lnk
193
194        RMDir $SMPROGRAMS\olsr.org
195
196        Delete "$DESKTOP\OLSR Switch.lnk"
197
198SectionEnd
199