Statistics
| Revision:

root / trunk / nntpgrab_x64.nsi @ 1867

History | View | Annotate | Download (8.7 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 (64bit)"
12

                
13
; The file to write
14
OutFile "nntpgrab_trunk_snapshot_svn_r@VER@_setup_x64.exe"
15

                
16
; The default installation directory
17
InstallDir $PROGRAMFILES64\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 (64bit)" "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
  SetRegView 64
39
FunctionEnd
40

                
41
;--------------------------------
42

                
43
; Pages
44

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

                
51
UninstPage uninstConfirm
52
UninstPage instfiles
53

                
54
;--------------------------------
55

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

                
59
  SectionIn RO
60
  
61
  SetOutPath $INSTDIR\bin
62
  File "dist\bin\exchndl.dll"
63
  File "dist\bin\libffi-6.dll"
64
  File "dist\bin\gspawn-win64-helper.exe"
65
  File "dist\bin\gspawn-win64-helper-console.exe"
66
  File "dist\bin\libgcc_s_sjlj-1.dll"
67
  File "dist\bin\libgio-2.0-0.dll"
68
  File "dist\bin\libglib-2.0-0.dll"
69
  File "dist\bin\libgmodule-2.0-0.dll"
70
  File "dist\bin\libgobject-2.0-0.dll"
71
  File "dist\bin\libgthread-2.0-0.dll"
72
  File "dist\bin\iconv.dll"
73
  File "dist\bin\libintl-8.dll"
74
  File "dist\bin\libnntpgrab_automation-0.dll"
75
  File "dist\bin\libnntpgrab_utils-0.dll"
76
  File "dist\bin\libnntpgrab_glue-0.dll"
77
  File "dist\bin\libnntpgrab-0.dll"
78
  File "dist\bin\libpng15-15.dll"
79
  File "dist\bin\libproxy.dll"
80
  File "dist\bin\QtCore4.dll"
81
  File "dist\bin\QtNetwork4.dll"
82
  File "dist\bin\QtGui4.dll"
83
  File "dist\bin\libssp-0.dll"
84
  File "dist\bin\libstdc++-6.dll"
85
  File "dist\bin\libsoup-2.4-1.dll"
86
  File "dist\bin\libxml2-2.dll"
87
  File "dist\bin\nntpgrab_gui.exe"
88
  File "dist\bin\nntpgrab_gui_debug.exe"
89
  File "dist\bin\nntpgrab_server.exe"
90
  File "dist\bin\nntpgrab_server_qt.exe"
91
  File "dist\bin\par2.exe"
92
  File "dist\bin\UnRAR.exe"
93
  File "dist\bin\zlib1.dll"
94
  File "client\gui\nntpgrab.ico"
95

                
96
  # Start GnuTLS libraries
97
  File "dist\bin\libgpg-error-0.dll"
98
  File "dist\bin\libgcrypt-11.dll"
99
  File "dist\bin\libgnutls-26.dll"
100

                
101
  # Start GIO TLS module
102
  SetOutPath $INSTDIR\lib\gio\modules
103
  File "dist\lib\gio\modules\giomodule.cache"
104
  File "dist\lib\gio\modules\libgiognutls.dll"
105

                
106
  SetOutPath $INSTDIR\lib\nntpgrab
107
  File "dist\lib\nntpgrab\*.dll"
108

                
109
  SetOutPath $INSTDIR\share\nntpgrab\translations
110
  File "dist\share\nntpgrab\translations\*.qm"
111

                
112
  SetOutPath $INSTDIR\share\locale\nl\LC_MESSAGES
113
  File "dist\share\locale\nl\LC_MESSAGES\*.mo"
114

                
115
  ; Write the installation path into the registry
116
  WriteRegStr HKLM SOFTWARE\NNTPGrab "Install_Dir" "$INSTDIR"
117
  
118
  ; Write the uninstall keys for Windows
119
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab (64bit)" "DisplayName" "NNTPGrab (64bit)" 
120
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab (64bit)" "UninstallString" '"$INSTDIR\uninstall.exe"'
121
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab (64bit)" "NoModify" 1
122
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab (64bit)" "NoRepair" 1
123
  WriteUninstaller "uninstall.exe"
124

                
125
  SetOutPath $INSTDIR\bin
126
  CreateDirectory "$SMPROGRAMS\NNTPGrab"
127
;  CreateShortCut "$SMPROGRAMS\NNTPGrab\License.lnk" "$INSTDIR\COPYING.txt" "" "$INSTDIR\COPYING.txt" 0
128
  CreateShortCut "$SMPROGRAMS\NNTPGrab\Uninstall (64bit).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
129
  CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab (64bit).lnk" "$INSTDIR\bin\nntpgrab_gui.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0
130
  CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab Server (64bit).lnk" "$INSTDIR\bin\nntpgrab_server_qt.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0
131
  
132
SectionEnd
133

                
134
; Optional section (can be disabled by the user)
135
Section "GTK frontend (deprecated)"
136

                
137
  SetOutPath $INSTDIR\bin
138
  File "dist\bin\libatk-1.0-0.dll"
139
  File "dist\bin\libcairo-2.dll"
140
  File "dist\bin\libgailutil-18.dll"
141
  File "dist\bin\libgdk_pixbuf-2.0-0.dll"
142
  File "dist\bin\libgdk-win32-2.0-0.dll"
143
  File "dist\bin\libgtk-win32-2.0-0.dll"
144
  File "dist\bin\libnntpgrab_gui_base-0.dll"
145
  File "dist\bin\libpango-1.0-0.dll"
146
  File "dist\bin\libpangocairo-1.0-0.dll"
147
  File "dist\bin\libpangowin32-1.0-0.dll"
148
  File "dist\bin\libpixman-1-0.dll"
149
  File "dist\bin\nntpgrab_gui_gtk.exe"
150

                
151
  SetOutPath $INSTDIR\etc\pango
152
  File "dist\etc\pango\pango.modules"
153

                
154
  SetOutPath $INSTDIR\etc\gtk-2.0
155
  File "dist\etc\gtk-2.0\gdk-pixbuf.loaders"
156
  File "dist\etc\gtk-2.0\gtkrc"
157

                
158
  SetOutPath $INSTDIR\lib\pango\1.6.0\modules
159
  File "dist\lib\pango\1.6.0\modules\pango-basic-win32.dll"
160

                
161
  SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines
162
  File "dist\lib\gtk-2.0\2.10.0\engines\libpixmap.dll"
163
  File "dist\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
164
  
165
  SetOutPath $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders
166
  File "dist\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-png.dll"
167
  File "dist\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-xpm.dll"
168

                
169
  SetOutPath $INSTDIR\share\nntpgrab
170
  File "dist\share\nntpgrab\nntpgrab_gui.ui"
171
  File "dist\share\nntpgrab\nntpgrab_server.ui"
172

                
173
  SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0
174
  File "dist\share\themes\MS-Windows\gtk-2.0\gtkrc"
175

                
176
  SetOutPath $INSTDIR\bin
177
  CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab (GTK frontend 64bit).lnk" "$INSTDIR\bin\nntpgrab_gui_gtk.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0
178

                
179
SectionEnd
180

                
181
Section ".NZB File association"
182

                
183
  ${registerExtension} "$INSTDIR\bin\nntpgrab_gui.exe" ".nzb" "NNTPGrab (64bit)"
184

                
185
SectionEnd
186

                
187
Section "Webinterface"
188

                
189
  SetOutPath $INSTDIR\webinterface
190
  File "plugins\jsonrpc\web\*.html"
191

                
192
  SetOutPath $INSTDIR\webinterface\css
193
  File "plugins\jsonrpc\web\css\*.css"
194

                
195
  SetOutPath $INSTDIR\webinterface\css\images
196
  File "plugins\jsonrpc\web\css\images\*.png"
197

                
198
  SetOutPath $INSTDIR\webinterface\javascript
199
  File "plugins\jsonrpc\web\javascript\*.js"
200

                
201
SectionEnd
202

                
203
;--------------------------------
204

                
205
; Uninstaller
206

                
207
Section "Uninstall"
208
  
209
  ; Remove registry keys
210
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab (64bit)"
211
  DeleteRegKey HKLM "SOFTWARE\NNTPGrab (64bit)"
212

                
213
  ; Remove files and uninstaller
214
  Delete $INSTDIR\webinterface\javascript\*.*
215
  RMDir  $INSTDIR\webinterface\javascript
216
  Delete $INSTDIR\webinterface\css\images\*.*
217
  RMDir  $INSTDIR\webinterface\css\images
218
  Delete $INSTDIR\webinterface\css\*.*
219
  RMDir  $INSTDIR\webinterface\css
220
  Delete $INSTDIR\webinterface\*.*
221
  RMDir  $INSTDIR\webinterface
222
  Delete $INSTDIR\share\themes\MS-Windows\gtk-2.0\*.*
223
  RMDir  $INSTDIR\share\themes\MS-Windows\gtk-2.0
224
  RMDir  $INSTDIR\share\themes\MS-Windows
225
  RMDir  $INSTDIR\share\themes
226
  Delete $INSTDIR\share\locale\nl\LC_MESSAGES\*.*
227
  RMDir  $INSTDIR\share\locale\nl\LC_MESSAGES
228
  Delete $INSTDIR\share\locale\nl\*.*
229
  RMDir  $INSTDIR\share\locale\nl
230
  Delete $INSTDIR\share\locale\*.*
231
  RMDir  $INSTDIR\share\locale
232
  Delete $INSTDIR\share\nntpgrab\translations\*.*
233
  RMDir  $INSTDIR\share\nntpgrab\translations
234
  Delete $INSTDIR\share\nntpgrab\*.*
235
  RMDir  $INSTDIR\share\nntpgrab
236
  RMDir  $INSTDIR\share
237

                
238
  Delete $INSTDIR\lib\nntpgrab\*.*
239
  RMDir  $INSTDIR\lib\nntpgrab
240
  Delete $INSTDIR\lib\pango\1.6.0\modules\*.*
241
  RMDir  $INSTDIR\lib\pango\1.6.0\modules
242
  RMDir  $INSTDIR\lib\pango\1.6.0
243
  RMDir  $INSTDIR\lib\pango
244
  Delete $INSTDIR\lib\gtk-2.0\2.10.0\loaders\*.*
245
  RMDir  $INSTDIR\lib\gtk-2.0\2.10.0\loaders
246
  Delete $INSTDIR\lib\gtk-2.0\2.10.0\engines\*.*
247
  RMDir  $INSTDIR\lib\gtk-2.0\2.10.0\engines
248
  RMDir  $INSTDIR\lib\gtk-2.0\2.10.0
249
  RMDir  $INSTDIR\lib\gtk-2.0
250
  Delete $INSTDIR\lib\gio\modules\*.*
251
  RMDir  $INSTDIR\lib\gio\modules
252
  RMDir  $INSTDIR\lib\gio
253
  Delete $INSTDIR\lib\*.*
254
  RMDir  $INSTDIR\lib
255

                
256
  Delete $INSTDIR\etc\pango\*.*
257
  RMDir  $INSTDIR\etc\pango
258
  Delete $INSTDIR\etc\gtk-2.0\*.*
259
  RMDir  $INSTDIR\etc\gtk-2.0
260
  RMDir  $INSTDIR\etc
261

                
262
  Delete $INSTDIR\bin\*.*
263
  RMDir  $INSTDIR\bin
264

                
265
  Delete $INSTDIR\*.*
266
  RMDir  $INSTDIR
267

                
268
  ; Remove shortcuts, if any
269
  Delete "$SMPROGRAMS\NNTPGrab\*.*"
270

                
271
  ; Remove directories used
272
  RMDir "$SMPROGRAMS\NNTPGrab"
273
  RMDir "$INSTDIR"
274

                
275
  ; Delete file associations
276
  ${unregisterExtension} ".nzb" "NZB File"
277
SectionEnd