Statistics
| Revision:

root / trunk / nntpgrab.nsi @ 1670

History | View | Annotate | Download (9 KB)

1
; nntpgrab.nsi
2
;
3

                
4
;!include "MUI.nsh"
5
;!include "Sections.nsh"
6
!include "registerExtension.nsh"
7

                
8
;--------------------------------
9

                
10
; The name of the installer
11
Name "NNTPGrab"
12

                
13
; The file to write
14
OutFile "nntpgrab_trunk_snapshot_svn_rev@VER@_setup.exe"
15

                
16
; The default installation directory
17
InstallDir $PROGRAMFILES\NNTPGrab
18

                
19
; Registry key to check for directory (so if you install again, it will 
20
; overwrite the old one automatically)
21
InstallDirRegKey HKLM "Software\NNTPGrab" "Install_Dir"
22

                
23
; Best compression
24
SetCompressor lzma
25
 
26
;--------------------------------
27

                
28
; Check if the program is running
29
!define WNDCLASS "gdkWindowTopLevel"
30
!define WNDTITLE "NNTPGrab"
31

                
32
Function .onInit
33
  FindWindow $0 "${WNDCLASS}" "${WNDTITLE}"
34
  StrCmp $0 0 continueInstall
35
    MessageBox MB_ICONSTOP|MB_OK "The installation cannot continue because NNTPGrab is still running. Please close NNTPGrab and try again."
36
    Abort
37
  continueInstall:
38
FunctionEnd
39

                
40
;--------------------------------
41

                
42
; Pages
43

                
44
LicenseData "COPYING"
45
Page license
46
Page components
47
Page directory
48
Page instfiles
49

                
50
UninstPage uninstConfirm
51
UninstPage instfiles
52

                
53
;--------------------------------
54

                
55
; The stuff to install
56
Section "NNTPGrab (required)"
57

                
58
  SectionIn RO
59
  
60
  SetOutPath $INSTDIR\bin
61
  File "dist\bin\exchndl.dll"
62
  File "dist\bin\gspawn-win32-helper.exe"
63
  File "dist\bin\gspawn-win32-helper-console.exe"
64
  File "dist\bin\libatk-1.0-0.dll"
65
  File "dist\bin\libcairo-2.dll"
66
  File "dist\bin\libgailutil-18.dll"
67
  File "dist\bin\libgcc_s_sjlj-1.dll"
68
  File "dist\bin\libgdk_pixbuf-2.0-0.dll"
69
  File "dist\bin\libgdk-win32-2.0-0.dll"
70
  File "dist\bin\libgio-2.0-0.dll"
71
  File "dist\bin\libglib-2.0-0.dll"
72
  File "dist\bin\libgmodule-2.0-0.dll"
73
  File "dist\bin\libgobject-2.0-0.dll"
74
  File "dist\bin\libgthread-2.0-0.dll"
75
  File "dist\bin\libgtk-win32-2.0-0.dll"
76
  File "dist\bin\libiconv-2.dll"
77
  File "dist\bin\libintl-8.dll"
78
  File "dist\bin\libmodman.dll"
79
  File "dist\bin\libnntpgrab_automation-0.dll"
80
  File "dist\bin\libnntpgrab_gui_base-0.dll"
81
  File "dist\bin\libnntpgrab_utils-0.dll"
82
  File "dist\bin\libnntpgrab_glue-0.dll"
83
  File "dist\bin\libnntpgrab-0.dll"
84
  File "dist\bin\libpango-1.0-0.dll"
85
  File "dist\bin\libpangocairo-1.0-0.dll"
86
  File "dist\bin\libpangowin32-1.0-0.dll"
87
  File "dist\bin\libpixman-1-0.dll"
88
  File "dist\bin\libpng14-14.dll"
89
  File "dist\bin\libproxy.dll"
90
  File "dist\bin\QtCore4.dll"
91
  File "dist\bin\QtNetwork4.dll"
92
  File "dist\bin\QtGui4.dll"
93
  File "dist\bin\libsoup-2.4-1.dll"
94
  File "dist\bin\libxml2-2.dll"
95
  File "dist\bin\libstdc++-6.dll"
96
  File "dist\bin\mingwm10.dll"
97
  File "dist\bin\nntpgrab_gui.exe"
98
  File "dist\bin\nntpgrab_gui_debug.exe"
99
  File "dist\bin\nntpgrab_gui_qt.exe"
100
  File "dist\bin\nntpgrab_server.exe"
101
  File "dist\bin\nntpgrab_server_qt.exe"
102
  File "dist\bin\par2.exe"
103
  File "dist\bin\UnRAR.exe"
104
  File "dist\bin\zlib1.dll"
105
  File "client/gui/nntpgrab.ico"
106

                
107
  # Start OpenSSL libraries
108
  File "dist\bin\libcrypto-10.dll"
109
  File "dist\bin\libssl-10.dll"
110

                
111
  # Start NSS libraries
112
#  File "dist\bin\freebl3.dll"
113
#  File "dist\bin\libnspr4.dll"
114
#  File "dist\bin\libplc4.dll"
115
#  File "dist\bin\libplds4.dll"
116
#  File "dist\bin\nss3.dll"
117
#  File "dist\bin\nssckbi.dll"
118
#  File "dist\bin\nssdbm3.dll"
119
#  File "dist\bin\nssutil3.dll"
120
#  File "dist\bin\smime3.dll"
121
#  File "dist\bin\softokn3.dll"
122
#  File "dist\bin\sqlite3.dll"
123
#  File "dist\bin\ssl3.dll"
124
#  File "dist\bin\libnss_compat_ossl-0.dll"
125
  # End of NSS libraries
126

                
127
  SetOutPath $INSTDIR\etc\pango
128
  File "dist\etc\pango\pango.modules"
129

                
130
  SetOutPath $INSTDIR\etc\gtk-2.0
131
  File "dist\etc\gtk-2.0\gdk-pixbuf.loaders"
132
  File "dist\etc\gtk-2.0\gtkrc"
133

                
134
  SetOutPath $INSTDIR\lib\nntpgrab
135
  File "dist\lib\nntpgrab\*.dll"
136

                
137
  SetOutPath $INSTDIR\lib\pango\1.6.0\modules
138
  File "dist\lib\pango\1.6.0\modules\pango-basic-win32.dll"
139

                
140
  SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines
141
  File "dist\lib\gtk-2.0\2.10.0\engines\libpixmap.dll"
142
  File "dist\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
143

                
144
  SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\loaders
145
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-gdip-bmp.dll"
146
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-gdip-ico.dll"
147
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-gdip-jpeg.dll"
148
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-gdip-gif.dll"
149
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-bmp.dll"
150
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-ico.dll"
151
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-jpeg.dll"
152
;  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-gif.dll"
153
  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-png.dll"
154
  File "dist\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-xpm.dll"
155

                
156
  SetOutPath $INSTDIR\share\nntpgrab
157
  File "dist\share\nntpgrab\nntpgrab_gui.ui"
158
  File "dist\share\nntpgrab\nntpgrab_server.ui"
159

                
160
  SetOutPath $INSTDIR\share\nntpgrab\translations
161
  File "dist\share\nntpgrab\translations\*.qm"
162

                
163
  SetOutPath $INSTDIR\share\locale\nl\LC_MESSAGES
164
  File "dist\share\locale\nl\LC_MESSAGES\*.mo"
165

                
166
  SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0
167
  File "dist\share\themes\MS-Windows\gtk-2.0\gtkrc"
168

                
169
  ; Write the installation path into the registry
170
  WriteRegStr HKLM SOFTWARE\NNTPGrab "Install_Dir" "$INSTDIR"
171
  
172
  ; Write the uninstall keys for Windows
173
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "DisplayName" "NNTPGrab"
174
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "UninstallString" '"$INSTDIR\uninstall.exe"'
175
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "NoModify" 1
176
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "NoRepair" 1
177
  WriteUninstaller "uninstall.exe"
178
  
179
SectionEnd
180

                
181
; Optional section (can be disabled by the user)
182
Section "Start Menu Shortcuts"
183

                
184
  SetOutPath $INSTDIR\bin
185
  CreateDirectory "$SMPROGRAMS\NNTPGrab"
186
;  CreateShortCut "$SMPROGRAMS\NNTPGrab\License.lnk" "$INSTDIR\COPYING.txt" "" "$INSTDIR\COPYING.txt" 0
187
  CreateShortCut "$SMPROGRAMS\NNTPGrab\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
188
  CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab.lnk" "$INSTDIR\bin\nntpgrab_gui.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0
189
  CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab Server.lnk" "$INSTDIR\bin\nntpgrab_server_qt.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0
190

                
191
SectionEnd
192

                
193
Section ".NZB File association"
194

                
195
  ${registerExtension} "$INSTDIR\bin\nntpgrab_gui.exe" ".nzb" "NNTPGrab"
196

                
197
SectionEnd
198

                
199
Section "Webinterface"
200

                
201
  SetOutPath $INSTDIR\webinterface
202
  File "plugins\jsonrpc\web\*.html"
203

                
204
  SetOutPath $INSTDIR\webinterface\css
205
  File "plugins\jsonrpc\web\css\*.css"
206

                
207
  SetOutPath $INSTDIR\webinterface\css\images
208
  File "plugins\jsonrpc\web\css\images\*.png"
209

                
210
  SetOutPath $INSTDIR\webinterface\javascript
211
  File "plugins\jsonrpc\web\javascript\*.js"
212

                
213
SectionEnd
214

                
215
;--------------------------------
216

                
217
; Uninstaller
218

                
219
Section "Uninstall"
220
  
221
  ; Remove registry keys
222
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab"
223
  DeleteRegKey HKLM SOFTWARE\NNTPGrab
224

                
225
  ; Remove files and uninstaller
226
  Delete $INSTDIR\webinterface\javascript\*.*
227
  RMDir  $INSTDIR\webinterface\javascript
228
  Delete $INSTDIR\webinterface\css\images\*.*
229
  RMDir  $INSTDIR\webinterface\css\images
230
  Delete $INSTDIR\webinterface\css\*.*
231
  RMDir  $INSTDIR\webinterface\css
232
  Delete $INSTDIR\webinterface\*.*
233
  RMDir  $INSTDIR\webinterface
234
  Delete $INSTDIR\share\themes\MS-Windows\gtk-2.0\*.*
235
  RMDir  $INSTDIR\share\themes\MS-Windows\gtk-2.0
236
  RMDir  $INSTDIR\share\themes\MS-Windows
237
  RMDir  $INSTDIR\share\themes
238
  Delete $INSTDIR\share\locale\nl\LC_MESSAGES\*.*
239
  RMDir  $INSTDIR\share\locale\nl\LC_MESSAGES
240
  Delete $INSTDIR\share\locale\nl\*.*
241
  RMDir  $INSTDIR\share\locale\nl
242
  Delete $INSTDIR\share\locale\*.*
243
  RMDir  $INSTDIR\share\locale
244
  Delete $INSTDIR\share\nntpgrab\*.*
245
  RMDir  $INSTDIR\share\nntpgrab
246
  RMDir  $INSTDIR\share
247

                
248
  Delete $INSTDIR\lib\nntpgrab\*.*
249
  RMDir  $INSTDIR\lib\nntpgrab
250
  Delete $INSTDIR\lib\pango\1.6.0\modules\*.*
251
  RMDir  $INSTDIR\lib\pango\1.6.0\modules
252
  RMDir  $INSTDIR\lib\pango\1.6.0
253
  RMDir  $INSTDIR\lib\pango
254
  Delete $INSTDIR\lib\gtk-2.0\2.10.0\loaders\*.*
255
  RMDir  $INSTDIR\lib\gtk-2.0\2.10.0\loaders
256
  Delete $INSTDIR\lib\gtk-2.0\2.10.0\engines\*.*
257
  RMDir  $INSTDIR\lib\gtk-2.0\2.10.0\engines
258
  RMDir  $INSTDIR\lib\gtk-2.0\2.10.0
259
  RMDir  $INSTDIR\lib\gtk-2.0
260
  Delete $INSTDIR\lib\*.*
261
  RMDir  $INSTDIR\lib
262

                
263
  Delete $INSTDIR\etc\pango\*.*
264
  RMDir  $INSTDIR\etc\pango
265
  Delete $INSTDIR\etc\gtk-2.0\*.*
266
  RMDir  $INSTDIR\etc\gtk-2.0
267
  RMDir  $INSTDIR\etc
268

                
269
  Delete $INSTDIR\bin\*.*
270
  RMDir  $INSTDIR\bin
271

                
272
  Delete $INSTDIR\*.*
273
  RMDir  $INSTDIR
274

                
275
  ; Remove shortcuts, if any
276
  Delete "$SMPROGRAMS\NNTPGrab\*.*"
277

                
278
  ; Remove directories used
279
  RMDir "$SMPROGRAMS\NNTPGrab"
280
  RMDir "$INSTDIR"
281

                
282
  ; Delete file associations
283
  ${unregisterExtension} ".nzb" "NZB File"
284
SectionEnd