Statistics
| Revision:

root / trunk / nntpgrab_x64.nsi @ 1919

History | View | Annotate | Download (6.5 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\libsoup-gnome-2.4-1.dll"
87
  File "dist\bin\libsqlite3-0.dll"
88
  File "dist\bin\libtasn1-3.dll"
89
  File "dist\bin\libxml2-2.dll"
90
  File "dist\bin\nntpgrab_gui.exe"
91
  File "dist\bin\nntpgrab_gui_debug.exe"
92
  File "dist\bin\nntpgrab_server.exe"
93
  File "dist\bin\nntpgrab_server_qt.exe"
94
  File "dist\bin\par2.exe"
95
  File "dist\bin\UnRAR.exe"
96
  File "dist\bin\zlib1.dll"
97
  File "client\gui\nntpgrab.ico"
98

                
99
  # Start GnuTLS libraries
100
  File "dist\bin\libgpg-error-0.dll"
101
  File "dist\bin\libgcrypt-11.dll"
102
  File "dist\bin\libp11-kit-0.dll"
103
  File "dist\bin\libgnutls-26.dll"
104

                
105
  # Start GIO TLS module
106
  SetOutPath $INSTDIR\lib\gio\modules
107
  File "dist\lib\gio\modules\giomodule.cache"
108
  File "dist\lib\gio\modules\libgiognutls.dll"
109

                
110
  SetOutPath $INSTDIR\lib\nntpgrab
111
  File "dist\lib\nntpgrab\*.dll"
112

                
113
  SetOutPath $INSTDIR\share\nntpgrab\translations
114
  File "dist\share\nntpgrab\translations\*.qm"
115

                
116
  SetOutPath $INSTDIR\share\locale\nl\LC_MESSAGES
117
  File "dist\share\locale\nl\LC_MESSAGES\*.mo"
118

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

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

                
138
Section ".NZB File association"
139

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

                
142
SectionEnd
143

                
144
Section "Webinterface"
145

                
146
  SetOutPath $INSTDIR\webinterface
147
  File "plugins\jsonrpc\web\*.html"
148

                
149
  SetOutPath $INSTDIR\webinterface\css
150
  File "plugins\jsonrpc\web\css\*.css"
151

                
152
  SetOutPath $INSTDIR\webinterface\css\images
153
  File "plugins\jsonrpc\web\css\images\*.png"
154

                
155
  SetOutPath $INSTDIR\webinterface\javascript
156
  File "plugins\jsonrpc\web\javascript\*.js"
157

                
158
SectionEnd
159

                
160
;--------------------------------
161

                
162
; Uninstaller
163

                
164
Section "Uninstall"
165
  
166
  ; Remove registry keys
167
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab (64bit)"
168
  DeleteRegKey HKLM "SOFTWARE\NNTPGrab (64bit)"
169

                
170
  ; Remove files and uninstaller
171
  Delete $INSTDIR\webinterface\javascript\*.*
172
  RMDir  $INSTDIR\webinterface\javascript
173
  Delete $INSTDIR\webinterface\css\images\*.*
174
  RMDir  $INSTDIR\webinterface\css\images
175
  Delete $INSTDIR\webinterface\css\*.*
176
  RMDir  $INSTDIR\webinterface\css
177
  Delete $INSTDIR\webinterface\*.*
178
  RMDir  $INSTDIR\webinterface
179
  Delete $INSTDIR\share\locale\nl\LC_MESSAGES\*.*
180
  RMDir  $INSTDIR\share\locale\nl\LC_MESSAGES
181
  Delete $INSTDIR\share\locale\nl\*.*
182
  RMDir  $INSTDIR\share\locale\nl
183
  Delete $INSTDIR\share\locale\*.*
184
  RMDir  $INSTDIR\share\locale
185
  Delete $INSTDIR\share\nntpgrab\translations\*.*
186
  RMDir  $INSTDIR\share\nntpgrab\translations
187
  Delete $INSTDIR\share\nntpgrab\*.*
188
  RMDir  $INSTDIR\share\nntpgrab
189
  RMDir  $INSTDIR\share
190

                
191
  Delete $INSTDIR\lib\nntpgrab\*.*
192
  RMDir  $INSTDIR\lib\nntpgrab
193
  Delete $INSTDIR\lib\gio\modules\*.*
194
  RMDir  $INSTDIR\lib\gio\modules
195
  RMDir  $INSTDIR\lib\gio
196
  Delete $INSTDIR\lib\*.*
197
  RMDir  $INSTDIR\lib
198

                
199
  Delete $INSTDIR\bin\*.*
200
  RMDir  $INSTDIR\bin
201

                
202
  Delete $INSTDIR\*.*
203
  RMDir  $INSTDIR
204

                
205
  ; Remove shortcuts, if any
206
  Delete "$SMPROGRAMS\NNTPGrab\*.*"
207

                
208
  ; Remove directories used
209
  RMDir "$SMPROGRAMS\NNTPGrab"
210
  RMDir "$INSTDIR"
211

                
212
  ; Delete file associations
213
  ${unregisterExtension} ".nzb" "NZB File"
214
SectionEnd