root / trunk / nntpgrab.nsi @ 1840
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" |
| 12 |
|
| 13 |
; The file to write |
| 14 |
OutFile "nntpgrab_trunk_snapshot_svn_r@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\libgcc_s_sjlj-1.dll" |
| 65 |
File "dist\bin\libgio-2.0-0.dll" |
| 66 |
File "dist\bin\libglib-2.0-0.dll" |
| 67 |
File "dist\bin\libgmodule-2.0-0.dll" |
| 68 |
File "dist\bin\libgobject-2.0-0.dll" |
| 69 |
File "dist\bin\libgthread-2.0-0.dll" |
| 70 |
File "dist\bin\libiconv.dll" |
| 71 |
File "dist\bin\libintl-8.dll" |
| 72 |
File "dist\bin\libnntpgrab_automation-0.dll" |
| 73 |
File "dist\bin\libnntpgrab_utils-0.dll" |
| 74 |
File "dist\bin\libnntpgrab_glue-0.dll" |
| 75 |
File "dist\bin\libnntpgrab-0.dll" |
| 76 |
File "dist\bin\libpng15-15.dll" |
| 77 |
File "dist\bin\libproxy.dll" |
| 78 |
File "dist\bin\QtCore4.dll" |
| 79 |
File "dist\bin\QtNetwork4.dll" |
| 80 |
File "dist\bin\QtGui4.dll" |
| 81 |
File "dist\bin\libsoup-2.4-1.dll" |
| 82 |
File "dist\bin\libxml2-2.dll" |
| 83 |
File "dist\bin\libstdc++-6.dll" |
| 84 |
File "dist\bin\nntpgrab_gui.exe" |
| 85 |
File "dist\bin\nntpgrab_gui_debug.exe" |
| 86 |
File "dist\bin\nntpgrab_server.exe" |
| 87 |
File "dist\bin\nntpgrab_server_qt.exe" |
| 88 |
File "dist\bin\par2.exe" |
| 89 |
File "dist\bin\UnRAR.exe" |
| 90 |
File "dist\bin\zlib1.dll" |
| 91 |
File "client\gui\nntpgrab.ico" |
| 92 |
|
| 93 |
# Start GnuTLS libraries |
| 94 |
File "dist\bin\libgpg-error-0.dll" |
| 95 |
File "dist\bin\libgcrypt-11.dll" |
| 96 |
File "dist\bin\libgnutls-26.dll" |
| 97 |
|
| 98 |
# Start GIO TLS module |
| 99 |
SetOutPath $INSTDIR\lib\gio |
| 100 |
File "dist\lib\gio\modules\libgiognutls.dll" |
| 101 |
|
| 102 |
SetOutPath $INSTDIR\lib\nntpgrab |
| 103 |
File "dist\lib\nntpgrab\*.dll" |
| 104 |
|
| 105 |
SetOutPath $INSTDIR\share\nntpgrab\translations |
| 106 |
File "dist\share\nntpgrab\translations\*.qm" |
| 107 |
|
| 108 |
SetOutPath $INSTDIR\share\locale\nl\LC_MESSAGES |
| 109 |
File "dist\share\locale\nl\LC_MESSAGES\*.mo" |
| 110 |
|
| 111 |
; Write the installation path into the registry |
| 112 |
WriteRegStr HKLM SOFTWARE\NNTPGrab "Install_Dir" "$INSTDIR" |
| 113 |
|
| 114 |
; Write the uninstall keys for Windows |
| 115 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "DisplayName" "NNTPGrab" |
| 116 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "UninstallString" '"$INSTDIR\uninstall.exe"' |
| 117 |
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "NoModify" 1 |
| 118 |
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" "NoRepair" 1 |
| 119 |
WriteUninstaller "uninstall.exe" |
| 120 |
|
| 121 |
SetOutPath $INSTDIR\bin |
| 122 |
CreateDirectory "$SMPROGRAMS\NNTPGrab" |
| 123 |
; CreateShortCut "$SMPROGRAMS\NNTPGrab\License.lnk" "$INSTDIR\COPYING.txt" "" "$INSTDIR\COPYING.txt" 0 |
| 124 |
CreateShortCut "$SMPROGRAMS\NNTPGrab\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
| 125 |
CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab.lnk" "$INSTDIR\bin\nntpgrab_gui.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0 |
| 126 |
CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab Server.lnk" "$INSTDIR\bin\nntpgrab_server_qt.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0 |
| 127 |
|
| 128 |
SectionEnd |
| 129 |
|
| 130 |
; Optional section (can be disabled by the user) |
| 131 |
Section "GTK frontend (deprecated)" |
| 132 |
|
| 133 |
SetOutPath $INSTDIR\bin |
| 134 |
File "dist\bin\libatk-1.0-0.dll" |
| 135 |
File "dist\bin\libcairo-2.dll" |
| 136 |
File "dist\bin\libgailutil-18.dll" |
| 137 |
File "dist\bin\libgdk_pixbuf-2.0-0.dll" |
| 138 |
File "dist\bin\libgdk-win32-2.0-0.dll" |
| 139 |
File "dist\bin\libgtk-win32-2.0-0.dll" |
| 140 |
File "dist\bin\libnntpgrab_gui_base-0.dll" |
| 141 |
File "dist\bin\libpango-1.0-0.dll" |
| 142 |
File "dist\bin\libpangocairo-1.0-0.dll" |
| 143 |
File "dist\bin\libpangowin32-1.0-0.dll" |
| 144 |
File "dist\bin\libpixman-1-0.dll" |
| 145 |
File "dist\bin\nntpgrab_gui_gtk.exe" |
| 146 |
|
| 147 |
SetOutPath $INSTDIR\etc\pango |
| 148 |
File "dist\etc\pango\pango.modules" |
| 149 |
|
| 150 |
SetOutPath $INSTDIR\etc\gtk-2.0 |
| 151 |
File "dist\etc\gtk-2.0\gtkrc" |
| 152 |
|
| 153 |
SetOutPath $INSTDIR\lib\pango\1.6.0\modules |
| 154 |
File "dist\lib\pango\1.6.0\modules\pango-basic-win32.dll" |
| 155 |
|
| 156 |
SetOutPath $INSTDIR\lib\gtk-2.0\2.10.0\engines |
| 157 |
File "dist\lib\gtk-2.0\2.10.0\engines\libpixmap.dll" |
| 158 |
File "dist\lib\gtk-2.0\2.10.0\engines\libwimp.dll" |
| 159 |
|
| 160 |
SetOutPath $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0 |
| 161 |
File "dist\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache" |
| 162 |
|
| 163 |
SetOutPath $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders |
| 164 |
File "dist\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-png.dll" |
| 165 |
File "dist\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-xpm.dll" |
| 166 |
|
| 167 |
SetOutPath $INSTDIR\share\nntpgrab |
| 168 |
File "dist\share\nntpgrab\nntpgrab_gui.ui" |
| 169 |
File "dist\share\nntpgrab\nntpgrab_server.ui" |
| 170 |
|
| 171 |
SetOutPath $INSTDIR\share\themes\MS-Windows\gtk-2.0 |
| 172 |
File "dist\share\themes\MS-Windows\gtk-2.0\gtkrc" |
| 173 |
|
| 174 |
SetOutPath $INSTDIR\bin |
| 175 |
CreateShortCut "$SMPROGRAMS\NNTPGrab\NNTPGrab (GTK frontend).lnk" "$INSTDIR\bin\nntpgrab_gui_gtk.exe" "" "$INSTDIR\bin\nntpgrab.ico" 0 |
| 176 |
|
| 177 |
SectionEnd |
| 178 |
|
| 179 |
Section ".NZB File association" |
| 180 |
|
| 181 |
${registerExtension} "$INSTDIR\bin\nntpgrab_gui.exe" ".nzb" "NNTPGrab"
|
| 182 |
|
| 183 |
SectionEnd |
| 184 |
|
| 185 |
Section "Webinterface" |
| 186 |
|
| 187 |
SetOutPath $INSTDIR\webinterface |
| 188 |
File "plugins\jsonrpc\web\*.html" |
| 189 |
|
| 190 |
SetOutPath $INSTDIR\webinterface\css |
| 191 |
File "plugins\jsonrpc\web\css\*.css" |
| 192 |
|
| 193 |
SetOutPath $INSTDIR\webinterface\css\images |
| 194 |
File "plugins\jsonrpc\web\css\images\*.png" |
| 195 |
|
| 196 |
SetOutPath $INSTDIR\webinterface\javascript |
| 197 |
File "plugins\jsonrpc\web\javascript\*.js" |
| 198 |
|
| 199 |
SectionEnd |
| 200 |
|
| 201 |
;-------------------------------- |
| 202 |
|
| 203 |
; Uninstaller |
| 204 |
|
| 205 |
Section "Uninstall" |
| 206 |
|
| 207 |
; Remove registry keys |
| 208 |
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NNTPGrab" |
| 209 |
DeleteRegKey HKLM SOFTWARE\NNTPGrab |
| 210 |
|
| 211 |
; Remove files and uninstaller |
| 212 |
Delete $INSTDIR\webinterface\javascript\*.* |
| 213 |
RMDir $INSTDIR\webinterface\javascript |
| 214 |
Delete $INSTDIR\webinterface\css\images\*.* |
| 215 |
RMDir $INSTDIR\webinterface\css\images |
| 216 |
Delete $INSTDIR\webinterface\css\*.* |
| 217 |
RMDir $INSTDIR\webinterface\css |
| 218 |
Delete $INSTDIR\webinterface\*.* |
| 219 |
RMDir $INSTDIR\webinterface |
| 220 |
Delete $INSTDIR\share\themes\MS-Windows\gtk-2.0\*.* |
| 221 |
RMDir $INSTDIR\share\themes\MS-Windows\gtk-2.0 |
| 222 |
RMDir $INSTDIR\share\themes\MS-Windows |
| 223 |
RMDir $INSTDIR\share\themes |
| 224 |
Delete $INSTDIR\share\locale\nl\LC_MESSAGES\*.* |
| 225 |
RMDir $INSTDIR\share\locale\nl\LC_MESSAGES |
| 226 |
Delete $INSTDIR\share\locale\nl\*.* |
| 227 |
RMDir $INSTDIR\share\locale\nl |
| 228 |
Delete $INSTDIR\share\locale\*.* |
| 229 |
RMDir $INSTDIR\share\locale |
| 230 |
Delete $INSTDIR\share\nntpgrab\translations\*.* |
| 231 |
RMDir $INSTDIR\share\nntpgrab\translations |
| 232 |
Delete $INSTDIR\share\nntpgrab\*.* |
| 233 |
RMDir $INSTDIR\share\nntpgrab |
| 234 |
RMDir $INSTDIR\share |
| 235 |
|
| 236 |
Delete $INSTDIR\lib\nntpgrab\*.* |
| 237 |
RMDir $INSTDIR\lib\nntpgrab |
| 238 |
Delete $INSTDIR\lib\pango\1.6.0\modules\*.* |
| 239 |
RMDir $INSTDIR\lib\pango\1.6.0\modules |
| 240 |
RMDir $INSTDIR\lib\pango\1.6.0 |
| 241 |
RMDir $INSTDIR\lib\pango |
| 242 |
Delete $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\*.* |
| 243 |
RMDir $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders |
| 244 |
Delete $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\*.* |
| 245 |
RMDir $INSTDIR\lib\gdk-pixbuf-2.0\2.10.0 |
| 246 |
RMDir $INSTDIR\lib\gdk-pixbuf-2.0 |
| 247 |
Delete $INSTDIR\lib\gtk-2.0\2.10.0\engines\*.* |
| 248 |
RMDir $INSTDIR\lib\gtk-2.0\2.10.0\engines |
| 249 |
RMDir $INSTDIR\lib\gtk-2.0\2.10.0 |
| 250 |
RMDir $INSTDIR\lib\gtk-2.0 |
| 251 |
Delete $INSTDIR\lib\gio\modules\*.* |
| 252 |
RMDir $INSTDIR\lib\gio\modules |
| 253 |
RMDir $INSTDIR\lib\gio |
| 254 |
Delete $INSTDIR\lib\*.* |
| 255 |
RMDir $INSTDIR\lib |
| 256 |
|
| 257 |
Delete $INSTDIR\etc\pango\*.* |
| 258 |
RMDir $INSTDIR\etc\pango |
| 259 |
Delete $INSTDIR\etc\gtk-2.0\*.* |
| 260 |
RMDir $INSTDIR\etc\gtk-2.0 |
| 261 |
RMDir $INSTDIR\etc |
| 262 |
|
| 263 |
Delete $INSTDIR\bin\*.* |
| 264 |
RMDir $INSTDIR\bin |
| 265 |
|
| 266 |
Delete $INSTDIR\*.* |
| 267 |
RMDir $INSTDIR |
| 268 |
|
| 269 |
; Remove shortcuts, if any |
| 270 |
Delete "$SMPROGRAMS\NNTPGrab\*.*" |
| 271 |
|
| 272 |
; Remove directories used |
| 273 |
RMDir "$SMPROGRAMS\NNTPGrab" |
| 274 |
RMDir "$INSTDIR" |
| 275 |
|
| 276 |
; Delete file associations |
| 277 |
${unregisterExtension} ".nzb" "NZB File"
|
| 278 |
SectionEnd |
NNTPGrab

