Statistics
| Revision:

root / nsis / sylpheed.nsi @ 2732

History | View | Annotate | Download (16.7 kB)

1
; Script generated by the HM NIS Edit Script Wizard.
2
; Modified by Ikuya Awashiro <ikuya@fruitsbasket.info>
3
; Modified by Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>
4
5
; This script requires NsProcess plugin:
6
; http://nsis.sourceforge.net/NsProcess_plugin
7
8
!include "sylpheed-defs.nsh"
9
10
SetCompressor /SOLID lzma
11
12
!include "nsProcess.nsh"
13
!include "Memento.nsh"
14
15
; MUI 1.67 compatible ------
16
!include "MUI.nsh"
17
!include "Sections.nsh"
18
!include "LogicLib.nsh"
19
20
; MUI Settings
21
!define MUI_ABORTWARNING
22
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue.ico"
23
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-blue.ico"
24
25
; Welcome page
26
!insertmacro MUI_PAGE_WELCOME
27
; License page
28
!define MUI_LICENSEPAGE_RADIOBUTTONS
29
!insertmacro MUI_PAGE_LICENSE $(license)
30
; Components page
31
!insertmacro MUI_PAGE_COMPONENTS
32
; Directory page
33
!insertmacro MUI_PAGE_DIRECTORY
34
; Instfiles page
35
!insertmacro MUI_PAGE_INSTFILES
36
; Finish page
37
;!define MUI_FINISHPAGE_RUN "$INSTDIR\sylpheed.exe"
38
;!define MUI_FINISHPAGE_RUN_NOTCHECKED
39
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
40
;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README-win32.txt"
41
;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README-win32-ja.txt"
42
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "ShowReadme"
43
!define MUI_FINISHPAGE_SHOWREADME_TEXT "$(readme)"
44
!define MUI_FINISHPAGE_LINK "$(jump)"
45
!define MUI_FINISHPAGE_LINK_LOCATION ${PRODUCT_WEB_SITE}
46
!insertmacro MUI_PAGE_FINISH
47
48
; Uninstaller pages
49
!insertmacro MUI_UNPAGE_WELCOME
50
!insertmacro MUI_UNPAGE_CONFIRM
51
!insertmacro MUI_UNPAGE_COMPONENTS
52
!insertmacro MUI_UNPAGE_INSTFILES
53
!insertmacro MUI_UNPAGE_FINISH
54
55
; Language files
56
!insertmacro MUI_LANGUAGE "English" # ${LANG_ENGLISH}
57
!insertmacro MUI_LANGUAGE "Spanish" # ${LANG_SPANISH}
58
!insertmacro MUI_LANGUAGE "Japanese" # ${LANG_JAPANESE}
59
60
; Reserve files
61
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
62
63
; MUI end ------
64
65
!include "English.nsh"
66
!include "Spanish.nsh"
67
!include "Japanese.nsh"
68
69
Var ISSILENT
70
71
;Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
72
;OutFile "${PRODUCT_NAME}-${PRODUCT_VERSION}_setup.exe"
73
Name "${INST_NAME} ${INST_VERSION}"
74
OutFile "${INST_FILENAME}-${INST_VERSION}_setup.exe"
75
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
76
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
77
RequestExecutionLevel admin
78
ShowInstDetails hide
79
ShowUnInstDetails hide
80
XPStyle on
81
BrandingText "${INST_NAME} ${INST_VERSION}"
82
83
${MementoSection} "!Sylpheed" sec_sylpheed
84
  SetShellVarContext all
85
  SectionIn RO
86
  SetOutPath "$INSTDIR"
87
  File /r "Sylpheed\"
88
  CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
89
  ${If} $LANGUAGE = "${LANG_JAPANESE}"
90
    CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk" "$INSTDIR\doc\manual\ja\Sylpheed.html"
91
    CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README-win32-ja.txt"
92
    File /oname=README.txt "Sylpheed\README-win32-ja.txt"
93
  ${ElseIf} $LANGUAGE = "${LANG_SPANISH}"
94
    CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk" "$INSTDIR\doc\manual\en\Sylpheed.html"
95
    CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README-win32-es.txt"
96
    File /oname=README.txt "Sylpheed\README-win32-es.txt"
97
  ${Else}
98
    CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk" "$INSTDIR\doc\manual\en\Sylpheed.html"
99
    CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README-win32.txt"
100
    File /oname=README.txt "Sylpheed\README-win32.txt"
101
  ${EndIf}
102
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed.lnk" "$INSTDIR\sylpheed.exe"
103
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed (debug mode).lnk" "$INSTDIR\sylpheed.exe" "--debug"
104
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed All Quit.lnk" "$INSTDIR\sylpheed.exe" "--exit"
105
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${ORIG_WEB_SITE}"
106
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Homepage.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
107
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe"
108
${MementoSectionEnd}
109
110
SectionGroup /e "$(plugins)" sec_plugins
111
112
!ifdef SYLPHEED_PRO
113
${MementoSection} "Sylpheed Pro" sec_sylpheed_pro
114
  SetShellVarContext all
115
  SetOutPath "$INSTDIR"
116
  File /r "Sylpheed-Pro\"
117
  WriteIniStr "$INSTDIR\${INST_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
118
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Homepage.lnk" "$INSTDIR\${INST_NAME}.url"
119
  CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Manual.lnk" "$INSTDIR\doc\manual\sylpheed-pro\ja\search-plugin.html"
120
${MementoSectionEnd}
121
!endif
122
123
${MementoSection} "$(attachment_tool_plugin)" sec_attachment_tool_plugin
124
  SetOutPath "$INSTDIR\plugins"
125
  File "plugins\plugins\attachment_tool.dll"
126
  SetOutPath "$INSTDIR\doc\plugins"
127
  File "plugins\doc\plugins\README.attachment_tool.txt"
128
${MementoSectionEnd}
129
130
SectionGroupEnd
131
132
${MementoSection} "bsfilter" sec_bsfilter
133
  SetOutPath "$INSTDIR"
134
  File /r "bsfilter\"
135
${MementoSectionEnd}
136
137
${MementoSection} "$(desktop_shortcut)" sec_desktop_shortcut
138
  SetShellVarContext current
139
  CreateShortCut "$DESKTOP\Sylpheed.lnk" "$INSTDIR\sylpheed.exe"
140
${MementoSectionEnd}
141
142
${MementoUnselectedSection} "$(quick_shortcut)" sec_quick_shortcut
143
  SetShellVarContext current
144
  CreateShortCut "$QUICKLAUNCH\Sylpheed.lnk" "$INSTDIR\sylpheed.exe"
145
${MementoSectionEnd}
146
147
${MementoSection} "$(handler)" sec_handler
148
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed" "" "Sylpheed"
149
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Protocols\mailto" "" "URL:MailTo Protocol"
150
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Protocols\mailto" "URL Protocol" ""
151
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Protocols\mailto\shell\open\command" "" "$\"$INSTDIR\sylpheed.exe$\" --compose $\"%1$\""
152
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\shell\open\command" "" "$\"$INSTDIR\sylpheed.exe$\""
153
154
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Capabilities" "ApplicationName" "Sylpheed"
155
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Capabilities" "ApplicationDescription" "Sylpheed - lightweight and user-friendly e-mail client"
156
   WriteRegStr HKLM "Software\RegisteredApplications" "Sylpheed" "SOFTWARE\Clients\Mail\Sylpheed\Capabilities"
157
   WriteRegStr HKLM "Software\Clients\Mail\Sylpheed\Capabilities\URLAssociations" "mailto" "Sylpheed.Url.MailTo"
158
   WriteRegStr HKCR "Sylpheed.Url.MailTo" "" "URL:MailTo Protocol"
159
   WriteRegStr HKCR "Sylpheed.Url.MailTo" "FriendlyTypeName" "Sylpheed MailTo"
160
   WriteRegDWORD HKCR "Sylpheed.Url.MailTo" "EditFlags" 0x00000002
161
   WriteRegStr HKCR "Sylpheed.Url.MailTo" "URL Protocol" ""
162
   WriteRegStr HKCR "Sylpheed.Url.MailTo\shell\open\command" "" "$\"$INSTDIR\sylpheed.exe$\" --compose $\"%1$\""
163
${MementoSectionEnd}
164
165
${MementoSectionDone}
166
167
Section -Post
168
  WriteUninstaller "$INSTDIR\uninst.exe"
169
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\sylpheed.exe"
170
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
171
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
172
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\sylpheed.exe"
173
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
174
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
175
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
176
SectionEnd
177
178
Section "!un.Sylpheed" sec_un_sylpheed
179
  SetShellVarContext all
180
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Manual.lnk"
181
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\README.lnk"
182
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed.lnk"
183
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed (debug mode).lnk"
184
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed All Quit.lnk"
185
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Homepage.lnk"
186
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk"
187
  SetShellVarContext current
188
189
  Delete "$INSTDIR\plugin-updater.exe"
190
  Delete "$INSTDIR\update-manager.exe"
191
192
  Delete "$INSTDIR\curl.exe"
193
  Delete "$INSTDIR\gpgme-w32spawn.exe"
194
  Delete "$INSTDIR\gspawn-win32-helper-console.exe"
195
  Delete "$INSTDIR\gspawn-win32-helper.exe"
196
  Delete "$INSTDIR\iconv.dll"
197
  Delete "$INSTDIR\intl.dll"
198
  Delete "$INSTDIR\jpeg62.dll"
199
  Delete "$INSTDIR\libatk-1.0-0.dll"
200
  Delete "$INSTDIR\libcairo-2.dll"
201
  Delete "$INSTDIR\libcompface.dll"
202
  Delete "$INSTDIR\libeay32.dll"
203
  Delete "$INSTDIR\libgdk-win32-2.0-0.dll"
204
  Delete "$INSTDIR\libgdk_pixbuf-2.0-0.dll"
205
  Delete "$INSTDIR\libglib-2.0-0.dll"
206
  Delete "$INSTDIR\libgmodule-2.0-0.dll"
207
  Delete "$INSTDIR\libgobject-2.0-0.dll"
208
  Delete "$INSTDIR\libgpg-error-0.dll"
209
  Delete "$INSTDIR\libgpgme-11.dll"
210
  Delete "$INSTDIR\libgthread-2.0-0.dll"
211
  Delete "$INSTDIR\libgtk-win32-2.0-0.dll"
212
  Delete "$INSTDIR\libonig.dll"
213
  Delete "$INSTDIR\libpango-1.0-0.dll"
214
  Delete "$INSTDIR\libpangocairo-1.0-0.dll"
215
  Delete "$INSTDIR\libpangowin32-1.0-0.dll"
216
  Delete "$INSTDIR\libpng13.dll"
217
  Delete "$INSTDIR\libsylph-0-1.dll"
218
  Delete "$INSTDIR\libsylpheed-plugin-0-1.dll"
219
  Delete "$INSTDIR\libtiff3.dll"
220
  Delete "$INSTDIR\README-win32-es.txt"
221
  Delete "$INSTDIR\README-win32-ja.txt"
222
  Delete "$INSTDIR\README-win32.txt"
223
  Delete "$INSTDIR\README.txt"
224
  Delete "$INSTDIR\sample-sylpheed.ini"
225
  Delete "$INSTDIR\ssleay32.dll"
226
  Delete "$INSTDIR\sylpheed-128x128.png"
227
  Delete "$INSTDIR\sylpheed-64x64.png"
228
  Delete "$INSTDIR\sylpheed-mailto-protocol.reg"
229
  Delete "$INSTDIR\sylpheed.exe"
230
  Delete "$INSTDIR\sylpheed.png"
231
  Delete "$INSTDIR\${PRODUCT_NAME}.url"
232
  Delete "$INSTDIR\uninst.exe"
233
  Delete "$INSTDIR\wabread.exe"
234
  Delete "$INSTDIR\zlib1.dll"
235
  RMDir /r "$INSTDIR\doc"
236
  RMDir /r "$INSTDIR\etc"
237
  RMDir /r "$INSTDIR\lib"
238
  RMDir /r "$INSTDIR\share\themes"
239
  RMDir "$INSTDIR\share"
240
SectionEnd
241
242
SectionGroup /e "un.$(plugins)" sec_un_plugins
243
244
!ifdef SYLPHEED_PRO
245
Section "un.Sylpheed Pro" sec_un_sylpheed_pro
246
  SetShellVarContext all
247
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Homepage.lnk"
248
  Delete "$SMPROGRAMS\${PRODUCT_NAME}\Sylpheed Pro Manual.lnk"
249
  SetShellVarContext current
250
251
  ; Sylpheed Pro components
252
  Delete "$INSTDIR\bzip2.dll"
253
  Delete "$INSTDIR\dbimport-ext.exe"
254
  Delete "$INSTDIR\dts-indexer.exe"
255
  Delete "$INSTDIR\libarchive2.dll"
256
  Delete "$INSTDIR\libmecab.dll"
257
  Delete "$INSTDIR\libpq.dll"
258
  Delete "$INSTDIR\mecabrc"
259
  Delete "$INSTDIR\Sylpheed Pro.url"
260
  Delete "$INSTDIR\plugins\dbimport.dll"
261
  Delete "$INSTDIR\plugins\scheduler.dll"
262
  RMDir /r "$INSTDIR\dic"
263
  RMDir /r "$INSTDIR\pgsql"
264
  RMDir /r "$INSTDIR\pgsql83"
265
  RMDir /r "$INSTDIR\share\sylpheed-pro"
266
  RMDir "$INSTDIR\share"
267
SectionEnd
268
!endif
269
270
Section "un.$(attachment_tool_plugin)" sec_un_attachment_tool_plugin
271
  Delete "$INSTDIR\plugins\attachment_tool.dll"
272
  Delete "$INSTDIR\doc\plugins\README.attachment_tool.txt"
273
SectionEnd
274
275
SectionGroupEnd
276
277
Section "un.bsfilter" sec_un_bsfilter
278
  ; bsfilter components
279
  Delete "$INSTDIR\bsfilter"
280
  Delete "$INSTDIR\bsfilterw.exe"
281
SectionEnd
282
283
Section "un.$(desktop_shortcut)" sec_un_desktop_shortcut
284
  SetShellVarContext current
285
  Delete "$DESKTOP\Sylpheed.lnk"
286
SectionEnd
287
288
Section "un.$(quick_shortcut)" sec_un_quick_shortcut
289
  SetShellVarContext current
290
  Delete "$QUICKLAUNCH\Sylpheed.lnk"
291
SectionEnd
292
293
Section "-un.install"
294
  SetShellVarContext all
295
  RMDir "$SMPROGRAMS\Sylpheed"
296
  SetShellVarContext current
297
298
  ; remove plug-ins dir only when empty
299
  RMDir "$INSTDIR\plugins"
300
  RMDir "$INSTDIR"
301
302
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
303
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}"
304
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "Software\Clients\Mail\Sylpheed"
305
  DeleteRegKey ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}"
306
  SetAutoClose true
307
SectionEnd
308
309
; Section descriptions
310
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
311
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_sylpheed} "$(sylpheed_description)"
312
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_plugins} "$(plugins_description)"
313
!ifdef SYLPHEED_PRO
314
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_sylpheed_pro} "$(sylpheed_pro_description)"
315
!endif
316
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_attachment_tool_plugin} "$(attachment_tool_plugin_description)"
317
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_bsfilter} "$(bsfilter_description)"
318
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_desktop_shortcut} "$(desktop_shortcut_description)"
319
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_quick_shortcut} "$(quick_shortcut_description)"
320
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_handler} "$(handler_description)"
321
!insertmacro MUI_FUNCTION_DESCRIPTION_END
322
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
323
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_sylpheed} "$(un_sylpheed_description)"
324
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_plugins} "$(un_plugins_description)"
325
!ifdef SYLPHEED_PRO
326
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_sylpheed_pro} "$(un_sylpheed_pro_description)"
327
!endif
328
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_attachment_tool_plugin} "$(un_attachment_tool_plugin_description)"
329
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_bsfilter} "$(un_bsfilter_description)"
330
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_desktop_shortcut} "$(un_desktop_shortcut_description)"
331
  !insertmacro MUI_DESCRIPTION_TEXT ${sec_un_quick_shortcut} "$(un_quick_shortcut_description)"
332
  ; handler is not uninstallable.
333
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
334
335
Function .onInit
336
  ${MementoSectionRestore}
337
338
  StrCpy $1 ${sec_sylpheed}
339
340
; Prevent install while Sylpheed is running
341
check_app_running:
342
  ${nsProcess::FindProcess} "sylpheed.exe" $R0
343
  StrCmp $R0 "0" 0 +3
344
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$(app_running)" IDOK check_app_running
345
  Abort
346
347
; Auto-uninstall old before installing new
348
; http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new
349
  ReadRegStr $R0 HKLM \
350
  "${PRODUCT_UNINST_KEY}" "UninstallString"
351
  StrCmp $R0 "" done_
352
 
353
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
354
  "$(delete_caution)" \
355
  /SD IDOK \
356
  IDOK uninst
357
  Abort
358
  
359
;Run the uninstaller
360
uninst:
361
  ClearErrors
362
  StrCpy $ISSILENT "/S"
363
  IfSilent +2
364
    StrCpy $ISSILENT ""
365
  ExecWait '$R0 $ISSILENT _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
366
 
367
  IfErrors no_remove_uninstaller
368
  no_remove_uninstaller:
369
  
370
; label "done" used in MementoSectionRestore
371
done_:
372
FunctionEnd
373
374
Function .onInstSuccess
375
  ${MementoSectionSave}
376
FunctionEnd
377
378
Function .onSelChange
379
  !insertmacro StartRadioButtons $1
380
    !insertmacro RadioButton ${sec_sylpheed}
381
  !insertmacro EndRadioButtons
382
FunctionEnd
383
384
Function un.onInit
385
check_app_running:
386
  ; Prevent uninstall while Sylpheed is running
387
  ${nsProcess::FindProcess} "sylpheed.exe" $R0
388
  StrCmp $R0 "0" 0 +3
389
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$(app_running_uninst)" IDOK check_app_running
390
  Abort
391
392
  ${nsProcess::KillProcess} "sylpheed.exe" $R0
393
  ${nsProcess::KillProcess} "dts-indexer.exe" $R0
394
  ${nsProcess::KillProcess} "postgres.exe" $R0
395
396
  SetShellVarContext current
397
398
  IfFileExists "$INSTDIR\sylpheed.exe" sylpheed_file_exists
399
  !insertmacro UnselectSection ${sec_un_sylpheed}
400
  sylpheed_file_exists:
401
  !insertmacro SetSectionFlag ${sec_un_sylpheed} ${SF_RO}
402
403
!ifdef SYLPHEED_PRO
404
  IfFileExists "$INSTDIR\plugins\dbimport.dll" sylpheed_pro_file_exists
405
  !insertmacro UnselectSection ${sec_un_sylpheed_pro}
406
  !insertmacro SetSectionFlag ${sec_un_sylpheed_pro} ${SF_RO}
407
  sylpheed_pro_file_exists:
408
!endif
409
410
  IfFileExists "$INSTDIR\plugins\attachment_tool.dll" attachment_tool_plugin_file_exists
411
  !insertmacro UnselectSection ${sec_un_attachment_tool_plugin}
412
  !insertmacro SetSectionFlag ${sec_un_attachment_tool_plugin} ${SF_RO}
413
  attachment_tool_plugin_file_exists:
414
415
  IfFileExists "$INSTDIR\bsfilter" bsfilter_file_exists
416
  !insertmacro UnselectSection ${sec_un_bsfilter}
417
  !insertmacro SetSectionFlag ${sec_un_bsfilter} ${SF_RO}
418
  bsfilter_file_exists:
419
420
  SetShellVarContext current
421
  IfFileExists "$DESKTOP\Sylpheed.lnk" desktop_shortcut_file_exists
422
  !insertmacro UnselectSection ${sec_un_desktop_shortcut}
423
  !insertmacro SetSectionFlag ${sec_un_desktop_shortcut} ${SF_RO}
424
  desktop_shortcut_file_exists:
425
426
  SetShellVarContext current
427
  IfFileExists "$QUICKLAUNCH\Sylpheed.lnk" quick_shortcut_file_exists
428
  !insertmacro UnselectSection ${sec_un_quick_shortcut}
429
  !insertmacro SetSectionFlag ${sec_un_quick_shortcut} ${SF_RO}
430
  quick_shortcut_file_exists:
431
FunctionEnd
432
433
Function ShowReadme
434
  ExecShell open "$INSTDIR\README.txt"
435
!ifdef SYLPHEED_PRO
436
  ${If} $LANGUAGE = "${LANG_JAPANESE}"
437
    IfFileExists "$INSTDIR\doc\manual\sylpheed-pro\ja\search-plugin.html" 0 +2
438
      ExecShell open "$INSTDIR\doc\manual\sylpheed-pro\ja\search-plugin.html"
439
  ${EndIf}
440
!endif
441
FunctionEnd