2007-08-30 Marcus Brinkmann <marcus@g10code.de>
[gpg4win.git] / src / inst-sections.nsi
1 # inst-sections.nsi - Installer for GPG4Win sections.  -*- coding: latin-1; -*-
2 # Copyright (C) 2005, 2006, 2007 g10 Code GmbH
3
4 # This file is part of GPG4Win.
5
6 # GPG4Win is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # GPG4Win is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 # USA.
20
21
22 # Sections
23
24 !include "inst-gpg4win.nsi"
25
26 !ifdef HAVE_PKG_GNUPG
27 !include "inst-gnupg.nsi"
28 !endif
29 !ifdef HAVE_PKG_GNUPG2
30 !include "inst-gnupg2.nsi"
31 !endif
32 !ifdef HAVE_PKG_PINENTRY
33 !include "inst-pinentry.nsi"
34 !endif
35 !ifdef HAVE_PKG_LIBGPG_ERROR
36 !include "inst-libgpg-error.nsi"
37 !endif
38 !ifdef HAVE_PKG_W32PTH
39 !include "inst-w32pth.nsi"
40 !endif
41 !ifdef HAVE_PKG_LIBASSUAN
42 !include "inst-libassuan.nsi"
43 !endif
44 !ifdef HAVE_PKG_LIBKSBA
45 !include "inst-libksba.nsi"
46 !endif
47 !ifdef HAVE_PKG_LIBGCRYPT
48 !include "inst-libgcrypt.nsi"
49 !endif
50 !ifdef HAVE_PKG_LIBICONV
51 !include "inst-libiconv.nsi"
52 !endif
53 !ifdef HAVE_PKG_PKGCONFIG
54 !include "inst-pkgconfig.nsi"
55 !endif
56 !ifdef HAVE_PKG_ZLIB
57 !include "inst-zlib.nsi"
58 !endif
59 !ifdef HAVE_PKG_CRYPT
60 !include "inst-crypt.nsi"
61 !endif
62 !ifdef HAVE_PKG_REGEX
63 !include "inst-regex.nsi"
64 !endif
65 !ifdef HAVE_PKG_DIRMNGR
66 !include "inst-dirmngr.nsi"
67 !endif
68 !ifdef HAVE_PKG_PTHREADS_W32
69 !include "inst-pthreads-w32.nsi"
70 !endif
71 !ifdef HAVE_PKG_GPGME
72 !include "inst-gpgme.nsi"
73 !endif
74 !ifdef HAVE_PKG_GETTEXT
75 !include "inst-gettext.nsi"
76 !endif
77 !ifdef HAVE_PKG_GLIB
78 !include "inst-glib.nsi"
79 !endif
80 !ifdef HAVE_PKG_LIBPNG
81 !include "inst-libpng.nsi"
82 !endif
83 !ifdef HAVE_PKG_JPEG
84 !include "inst-jpeg.nsi"
85 !endif
86 !ifdef HAVE_PKG_GPGOL
87 !include "inst-gpgol.nsi"
88 !endif
89 !ifdef HAVE_PKG_GPGEX
90 !include "inst-gpgex.nsi"
91 !endif
92 !ifdef HAVE_PKG_PANGO
93 !include "inst-pango.nsi"
94 !endif
95 !ifdef HAVE_PKG_CAIRO
96 !include "inst-cairo.nsi"
97 !endif
98 !ifdef HAVE_PKG_ATK
99 !include "inst-atk.nsi"
100 !endif
101 !ifdef HAVE_PKG_GTK_
102 !include "inst-gtk+.nsi"
103 !endif
104 !ifdef HAVE_PKG_GPA
105 !include "inst-gpa.nsi"
106 !endif
107 !ifdef HAVE_PKG_WINPT
108 !include "inst-winpt.nsi"
109 !endif
110 !ifdef HAVE_PKG_GPGEE
111 !include "inst-gpgee.nsi"
112 !endif
113 !ifdef HAVE_PKG_SYLPHEED_CLAWS
114 !include "inst-sylpheed-claws.nsi"
115 !endif
116 !ifdef HAVE_PKG_CLAWS_MAIL
117 !include "inst-claws-mail.nsi"
118 !endif
119 #!ifdef HAVE_PKG_EUDORAGPG
120 #!include "inst-eudoragpg.nsi"
121 #!endif
122 !ifdef HAVE_PKG_QT
123 !include "inst-qt.nsi"
124 !endif
125 !ifdef HAVE_PKG_MAN_NOVICE_EN
126 !include "inst-man_novice_en.nsi"
127 !endif
128 !ifdef HAVE_PKG_MAN_ADVANCED_EN
129 !include "inst-man_advanced_en.nsi"
130 !endif
131 !ifdef HAVE_PKG_MAN_NOVICE_DE
132 !include "inst-man_novice_de.nsi"
133 !endif
134 !ifdef HAVE_PKG_MAN_ADVANCED_DE
135 !include "inst-man_advanced_de.nsi"
136 !endif
137
138 # We have to invoke the uninstallers in reverse order!
139
140 !ifdef HAVE_PKG_MAN_ADVANCED_DE
141 !include "uninst-man_advanced_de.nsi"
142 !endif
143 !ifdef HAVE_PKG_MAN_NOVICE_DE
144 !include "uninst-man_novice_de.nsi"
145 !endif
146 !ifdef HAVE_PKG_MAN_ADVANCED_EN
147 !include "uninst-man_advanced_en.nsi"
148 !endif
149 !ifdef HAVE_PKG_MAN_NOVICE_EN
150 !include "uninst-man_novice_en.nsi"
151 !endif
152 !ifdef HAVE_PKG_QT
153 !include "uninst-qt.nsi"
154 !endif
155 #!ifdef HAVE_PKG_EUDORAGPG
156 #!include "uninst-eudoragpg.nsi"
157 #!endif
158 !ifdef HAVE_PKG_CLAWS_MAIL
159 !include "uninst-claws-mail.nsi"
160 !endif
161 !ifdef HAVE_PKG_SYLPHEED_CLAWS
162 !include "uninst-sylpheed-claws.nsi"
163 !endif
164 !ifdef HAVE_PKG_GPGEE
165 !include "uninst-gpgee.nsi"
166 !endif
167 !ifdef HAVE_PKG_WINPT
168 !include "uninst-winpt.nsi"
169 !endif
170 !ifdef HAVE_PKG_GPA
171 !include "uninst-gpa.nsi"
172 !endif
173 !ifdef HAVE_PKG_GTK_
174 !include "uninst-gtk+.nsi"
175 !endif
176 !ifdef HAVE_PKG_ATK
177 !include "uninst-atk.nsi"
178 !endif
179 !ifdef HAVE_PKG_CAIRO
180 !include "uninst-cairo.nsi"
181 !endif
182 !ifdef HAVE_PKG_PANGO
183 !include "uninst-pango.nsi"
184 !endif
185 !ifdef HAVE_PKG_GPGEX
186 !include "uninst-gpgex.nsi"
187 !endif
188 !ifdef HAVE_PKG_GPGOL
189 !include "uninst-gpgol.nsi"
190 !endif
191 !ifdef HAVE_PKG_LIBPNG
192 !include "uninst-libpng.nsi"
193 !endif
194 !ifdef HAVE_PKG_JPEG
195 !include "uninst-jpeg.nsi"
196 !endif
197 !ifdef HAVE_PKG_GLIB
198 !include "uninst-glib.nsi"
199 !endif
200 !ifdef HAVE_PKG_GETTEXT
201 !include "uninst-gettext.nsi"
202 !endif
203 !ifdef HAVE_PKG_GPGME
204 !include "uninst-gpgme.nsi"
205 !endif
206 !ifdef HAVE_PKG_PTHREADS_W32
207 !include "uninst-pthreads-w32.nsi"
208 !endif
209 !ifdef HAVE_PKG_DIRMNGR
210 !include "uninst-dirmngr.nsi"
211 !endif
212 !ifdef HAVE_PKG_REGEX
213 !include "uninst-regex.nsi"
214 !endif
215 !ifdef HAVE_PKG_CRYPT
216 !include "uninst-crypt.nsi"
217 !endif
218 !ifdef HAVE_PKG_ZLIB
219 !include "uninst-zlib.nsi"
220 !endif
221 !ifdef HAVE_PKG_PKGCONFIG
222 !include "uninst-pkgconfig.nsi"
223 !endif
224 !ifdef HAVE_PKG_LIBICONV
225 !include "uninst-libiconv.nsi"
226 !endif
227 !ifdef HAVE_PKG_LIBGCRYPT
228 !include "uninst-libgcrypt.nsi"
229 !endif
230 !ifdef HAVE_PKG_LIBKSBA
231 !include "uninst-libksba.nsi"
232 !endif
233 !ifdef HAVE_PKG_LIBASSUAN
234 !include "uninst-libassuan.nsi"
235 !endif
236 !ifdef HAVE_PKG_W32PTH
237 !include "uninst-w32pth.nsi"
238 !endif
239 !ifdef HAVE_PKG_LIBGPG_ERROR
240 # Note that the uninstaller of libgpg-error is supposed to remove the shareed
241 # directories.  We might want to move this to an extra section.
242 !include "uninst-libgpg-error.nsi"
243 !endif
244 !ifdef HAVE_PKG_PINENTRY
245 !include "uninst-pinentry.nsi"
246 !endif
247 !ifdef HAVE_PKG_GNUPG2
248 !include "uninst-gnupg2.nsi"
249 !endif
250 !ifdef HAVE_PKG_GNUPG
251 !include "uninst-gnupg.nsi"
252 !endif
253
254 !include "uninst-gpg4win.nsi"
255
256
257 # Dependency Management
258
259 !include "Sections.nsh"
260
261
262 Function CalcDefaults
263
264 # The defaults for the installer-options.ini file.
265 g4wihelp::config_fetch_bool "inst_start_menu"
266 StrCmp $R0 "" +2
267 !insertmacro MUI_INSTALLOPTIONS_WRITE "installer-options.ini" \
268         "Field 2" "State" $R0
269
270 g4wihelp::config_fetch_bool "inst_desktop"
271 StrCmp $R0 "" +2
272 !insertmacro MUI_INSTALLOPTIONS_WRITE "installer-options.ini" \
273         "Field 3" "State" $R0
274
275 g4wihelp::config_fetch_bool "inst_quick_launch_bar"
276 StrCmp $R0 "" +2
277 !insertmacro MUI_INSTALLOPTIONS_WRITE "installer-options.ini" \
278         "Field 4" "State" $R0
279
280
281
282 !ifdef HAVE_PKG_GNUPG2
283   g4wihelp::config_fetch_bool "inst_gnupg2"
284   StrCmp $R0 "1" 0 calc_defaults_gnupg2_not_one
285    !insertmacro SelectSection ${SEC_gnupg2}
286    Goto calc_defaults_gnupg2_done
287   calc_defaults_gnupg2_not_one:
288   StrCmp $R0 "0" 0 calc_defaults_gnupg2_done
289    !insertmacro UnselectSection ${SEC_gnupg2}
290 calc_defaults_gnupg2_done:
291 !endif
292
293 !ifdef HAVE_PKG_GPGOL
294   g4wihelp::config_fetch_bool "inst_gpgol"
295   StrCmp $R0 "1" 0 calc_defaults_gpgol_not_one
296    !insertmacro SelectSection ${SEC_gpgol}
297    Goto calc_defaults_gpgol_done
298   calc_defaults_gpgol_not_one:
299   StrCmp $R0 "0" 0 calc_defaults_gpgol_done
300    !insertmacro UnselectSection ${SEC_gpgol}
301 calc_defaults_gpgol_done:
302 !endif
303
304 !ifdef HAVE_PKG_GPGEX
305   g4wihelp::config_fetch_bool "inst_gpgex"
306   StrCmp $R0 "1" 0 calc_defaults_gpgex_not_one
307    !insertmacro SelectSection ${SEC_gpgex}
308    Goto calc_defaults_gpgex_done
309   calc_defaults_gpgex_not_one:
310   StrCmp $R0 "0" 0 calc_defaults_gpgex_done
311    !insertmacro UnselectSection ${SEC_gpgex}
312 calc_defaults_gpgex_done:
313 !endif
314
315 !ifdef HAVE_PKG_GPA
316   g4wihelp::config_fetch_bool "inst_gpa"
317   StrCmp $R0 "1" 0 calc_defaults_gpa_not_one
318    !insertmacro SelectSection ${SEC_gpa}
319    Goto calc_defaults_gpa_done
320   calc_defaults_gpa_not_one:
321   StrCmp $R0 "0" 0 calc_defaults_gpa_done
322    !insertmacro UnselectSection ${SEC_gpa}
323 calc_defaults_gpa_done:
324 !endif
325
326 !ifdef HAVE_PKG_WINPT
327   g4wihelp::config_fetch_bool "inst_winpt"
328   StrCmp $R0 "1" 0 calc_defaults_winpt_not_one
329    !insertmacro SelectSection ${SEC_winpt}
330    Goto calc_defaults_winpt_done
331   calc_defaults_winpt_not_one:
332   StrCmp $R0 "0" 0 calc_defaults_winpt_done
333    !insertmacro UnselectSection ${SEC_winpt}
334 calc_defaults_winpt_done:
335 !endif
336
337 !ifdef HAVE_PKG_GPGEE
338   g4wihelp::config_fetch_bool "inst_gpgee"
339   StrCmp $R0 "1" 0 calc_defaults_gpgee_not_one
340    !insertmacro SelectSection ${SEC_gpgee}
341    Goto calc_defaults_gpgee_done
342   calc_defaults_gpgee_not_one:
343   StrCmp $R0 "0" 0 calc_defaults_gpgee_done
344    !insertmacro UnselectSection ${SEC_gpgee}
345 calc_defaults_gpgee_done:
346 !endif
347
348 !ifdef HAVE_PKG_CLAWS_MAIL
349   g4wihelp::config_fetch_bool "inst_claws_mail"
350   StrCmp $R0 "1" 0 calc_defaults_claws_mail_not_one
351    !insertmacro SelectSection ${SEC_claws_mail}
352    Goto calc_defaults_claws_mail_done
353   calc_defaults_claws_mail_not_one:
354   StrCmp $R0 "0" 0 calc_defaults_claws_mail_done
355    !insertmacro UnselectSection ${SEC_claws_mail}
356 calc_defaults_claws_mail_done:
357 !endif
358
359 !ifdef HAVE_PKG_MAN_NOVICE_DE
360   g4wihelp::config_fetch_bool "inst_man_novice_de"
361   StrCmp $R0 "1" 0 calc_defaults_man_novice_de_not_one
362    !insertmacro SelectSection ${SEC_man_novice_de}
363    Goto calc_defaults_man_novice_de_done
364   calc_defaults_man_novice_de_not_one:
365   StrCmp $R0 "0" 0 calc_defaults_man_novice_de_done
366    !insertmacro UnselectSection ${SEC_man_novice_de}
367 calc_defaults_man_novice_de_done:
368 !endif
369
370 !ifdef HAVE_PKG_MAN_NOVICE_EN
371   g4wihelp::config_fetch_bool "inst_man_novice_en"
372   StrCmp $R0 "1" 0 calc_defaults_man_novice_en_not_one
373    !insertmacro SelectSection ${SEC_man_novice_en}
374    Goto calc_defaults_man_novice_en_done
375   calc_defaults_man_novice_en_not_one:
376   StrCmp $R0 "0" 0 calc_defaults_man_novice_en_done
377    !insertmacro UnselectSection ${SEC_man_novice_en}
378 calc_defaults_man_novice_en_done:
379 !endif
380
381 !ifdef HAVE_PKG_MAN_ADVANCED_DE
382   g4wihelp::config_fetch_bool "inst_man_advanced_de"
383   StrCmp $R0 "1" 0 calc_defaults_man_advanced_de_not_one
384    !insertmacro SelectSection ${SEC_man_advanced_de}
385    Goto calc_defaults_man_advanced_de_done
386   calc_defaults_man_advanced_de_not_one:
387   StrCmp $R0 "0" 0 calc_defaults_man_advanced_de_done
388    !insertmacro UnselectSection ${SEC_man_advanced_de}
389 calc_defaults_man_advanced_de_done:
390 !endif
391
392 !ifdef HAVE_PKG_MAN_ADVANCED_EN
393   g4wihelp::config_fetch_bool "inst_man_advanced_en"
394   StrCmp $R0 "1" 0 calc_defaults_man_advanced_en_not_one
395    !insertmacro SelectSection ${SEC_man_advanced_en}
396    Goto calc_defaults_man_advanced_en_done
397   calc_defaults_man_advanced_en_not_one:
398   StrCmp $R0 "0" 0 calc_defaults_man_advanced_en_done
399    !insertmacro UnselectSection ${SEC_man_advanced_en}
400 calc_defaults_man_advanced_en_done:
401 !endif
402
403 FunctionEnd
404
405
406 Function CalcDepends
407   # This section could very well be autogenerated from the
408   # information in configure.ac.  Note that it doesn't hurt to have
409   # stuff here for packages that we don't include.
410
411   # First clear all indirect dependencies.
412 !ifdef HAVE_PKG_LIBICONV
413   !insertmacro UnselectSection ${SEC_libiconv}
414 !endif
415 !ifdef HAVE_PKG_GETTEXT
416   !insertmacro UnselectSection ${SEC_gettext}
417 !endif
418 !ifdef HAVE_PKG_ZLIB
419   !insertmacro UnselectSection ${SEC_zlib}
420 !endif
421 !ifdef HAVE_PKG_CRYPT
422   !insertmacro UnselectSection ${SEC_crypt}
423 !endif
424 !ifdef HAVE_PKG_REGEX
425   !insertmacro UnselectSection ${SEC_regex}
426 !endif
427 !ifdef HAVE_PKG_DIRMNGR
428   !insertmacro UnselectSection ${SEC_dirmngr}
429 !endif
430 !ifdef HAVE_PKG_PTHREADS_W32
431   !insertmacro UnselectSection ${SEC_pthreads_w32}
432 !endif
433 !ifdef HAVE_PKG_LIBPNG
434   !insertmacro UnselectSection ${SEC_libpng}
435 !endif
436 !ifdef HAVE_PKG_JPEG
437   !insertmacro UnselectSection ${SEC_jpeg}
438 !endif
439 !ifdef HAVE_PKG_PKGCONFIG
440   !insertmacro UnselectSection ${SEC_pkgconfig}
441 !endif
442 !ifdef HAVE_PKG_GLIB
443   !insertmacro UnselectSection ${SEC_glib}
444 !endif
445 !ifdef HAVE_PKG_ATK
446   !insertmacro UnselectSection ${SEC_atk}
447 !endif
448 !ifdef HAVE_PKG_CAIRO
449   !insertmacro UnselectSection ${SEC_cairo}
450 !endif
451 !ifdef HAVE_PKG_PANGO
452   !insertmacro UnselectSection ${SEC_pango}
453 !endif
454 !ifdef HAVE_PKG_GTK_
455   !insertmacro UnselectSection ${SEC_gtk_}
456 !endif
457 !ifdef HAVE_PKG_LIBGPG_ERROR
458   !insertmacro UnselectSection ${SEC_libgpg_error}
459 !endif
460 !ifdef HAVE_PKG_GPGME
461   !insertmacro UnselectSection ${SEC_gpgme}
462 !endif
463 !ifdef HAVE_PKG_LIBKSBA
464   !insertmacro UnselectSection ${SEC_libksba}
465 !endif
466 !ifdef HAVE_PKG_W32PTH
467   !insertmacro UnselectSection ${SEC_w32pth}
468 !endif
469 !ifdef HAVE_PKG_LIBASSUAN
470   !insertmacro UnselectSection ${SEC_libassuan}
471 !endif
472 !ifdef HAVE_PKG_LIBGCRYPT
473   !insertmacro UnselectSection ${SEC_libgcrypt}
474 !endif
475 !ifdef HAVE_PKG_PINENTRY
476   !insertmacro UnselectSection ${SEC_pinentry}
477 !endif
478 !ifdef HAVE_PKG_QT
479   !insertmacro UnselectSection ${SEC_qt}
480 !endif
481
482   # Then enable all dependencies in reverse build list order!
483
484 !ifdef HAVE_PKG_GNUPG2
485   !insertmacro SectionFlagIsSet ${SEC_gnupg2} ${SF_SELECTED} have_gnupg2 skip_gnupg2
486   have_gnupg2:
487   !insertmacro SelectSection ${SEC_libiconv}
488   !insertmacro SelectSection ${SEC_libgcrypt}
489   !insertmacro SelectSection ${SEC_libksba}
490   !insertmacro SelectSection ${SEC_libassuan}
491   !insertmacro SelectSection ${SEC_libgpg_error}
492   !insertmacro SelectSection ${SEC_w32pth}
493   !insertmacro SelectSection ${SEC_zlib}
494   !insertmacro SelectSection ${SEC_pinentry}
495   !insertmacro SelectSection ${SEC_dirmngr}
496   skip_gnupg2:
497 !endif
498
499 !ifdef HAVE_PKG_GPGEE
500   !insertmacro SectionFlagIsSet ${SEC_gpgee} ${SF_SELECTED} have_gpgee skip_gpgee
501   have_gpgee:
502   !insertmacro SelectSection ${SEC_gpgme}
503   !insertmacro SelectSection ${SEC_gnupg}
504   skip_gpgee:
505 !endif
506
507 !ifdef HAVE_PKG_WINPT
508   !insertmacro SectionFlagIsSet ${SEC_winpt} ${SF_SELECTED} have_winpt skip_winpt
509   have_winpt:
510   !insertmacro SelectSection ${SEC_gpgme}
511   !insertmacro SelectSection ${SEC_gnupg}
512   skip_winpt:
513 !endif
514
515 !ifdef HAVE_PKG_GPA
516   !insertmacro SectionFlagIsSet ${SEC_gpa} ${SF_SELECTED} have_gpa skip_gpa
517   have_gpa:
518   !insertmacro SelectSection ${SEC_zlib}
519   !insertmacro SelectSection ${SEC_gtk_}
520   !insertmacro SelectSection ${SEC_libpng}
521   !insertmacro SelectSection ${SEC_glib}
522   !insertmacro SelectSection ${SEC_gpgme}
523   !insertmacro SelectSection ${SEC_gnupg}
524   skip_gpa:
525 !endif
526
527 !ifdef HAVE_PKG_SYLPHEED_CLAWS
528   !insertmacro SectionFlagIsSet ${SEC_sylpheed} ${SF_SELECTED} have_sylpheed skip_sylpheed
529   have_sylpheed:
530   !insertmacro SelectSection ${SEC_zlib}
531   !insertmacro SelectSection ${SEC_gtk_}
532   !insertmacro SelectSection ${SEC_libpng}
533   !insertmacro SelectSection ${SEC_jpeg}
534   !insertmacro SelectSection ${SEC_glib}
535   !insertmacro SelectSection ${SEC_gpgme}
536   !insertmacro SelectSection ${SEC_gnupg}
537   !insertmacro SelectSection ${SEC_pthreads_w32}
538   !insertmacro SelectSection ${SEC_crypt}
539   !insertmacro SelectSection ${SEC_regex}
540   skip_sylpheed:
541 !endif
542
543
544 !ifdef HAVE_PKG_CLAWS_MAIL
545   !insertmacro SectionFlagIsSet ${SEC_claws_mail} ${SF_SELECTED} have_claws_mail skip_claws_mail
546   have_claws_mail:
547   !insertmacro SelectSection ${SEC_zlib}
548   !insertmacro SelectSection ${SEC_gtk_}
549   !insertmacro SelectSection ${SEC_libpng}
550   !insertmacro SelectSection ${SEC_jpeg}
551   !insertmacro SelectSection ${SEC_glib}
552   !insertmacro SelectSection ${SEC_gpgme}
553   !insertmacro SelectSection ${SEC_gnupg}
554   !insertmacro SelectSection ${SEC_pthreads_w32}
555   !insertmacro SelectSection ${SEC_crypt}
556   !insertmacro SelectSection ${SEC_regex}
557   skip_claws_mail:
558 !endif
559
560
561 !ifdef HAVE_PKG_GTK_
562   !insertmacro SectionFlagIsSet ${SEC_gtk_} \
563                 ${SF_SELECTED} have_gtk_ skip_gtk_
564   have_gtk_:
565   !insertmacro SelectSection ${SEC_atk}
566   !insertmacro SelectSection ${SEC_cairo}
567   !insertmacro SelectSection ${SEC_pango}
568   !insertmacro SelectSection ${SEC_glib}
569   !insertmacro SelectSection ${SEC_libiconv}
570   !insertmacro SelectSection ${SEC_gettext}
571   !insertmacro SelectSection ${SEC_pkgconfig}
572   skip_gtk_:
573 !endif
574
575 !ifdef HAVE_PKG_ATK
576   !insertmacro SectionFlagIsSet ${SEC_atk} \
577                 ${SF_SELECTED} have_atk skip_atk
578   have_atk:
579   !insertmacro SelectSection ${SEC_glib}
580   !insertmacro SelectSection ${SEC_pkgconfig}
581   skip_atk:
582 !endif
583
584 !ifdef HAVE_PKG_CAIRO
585   !insertmacro SectionFlagIsSet ${SEC_cairo} \
586                 ${SF_SELECTED} have_cairo skip_cairo
587   have_cairo:
588   !insertmacro SelectSection ${SEC_glib}
589   !insertmacro SelectSection ${SEC_pkgconfig}
590   skip_cairo:
591 !endif
592
593 !ifdef HAVE_PKG_PANGO
594   !insertmacro SectionFlagIsSet ${SEC_pango} \
595                 ${SF_SELECTED} have_pango skip_pango
596   have_pango:
597   !insertmacro SelectSection ${SEC_glib}
598   !insertmacro SelectSection ${SEC_pkgconfig}
599   skip_pango:
600 !endif
601
602 !ifdef HAVE_PKG_GPGOL
603   !insertmacro SectionFlagIsSet ${SEC_gpgol} \
604                 ${SF_SELECTED} have_gpgol skip_gpgol
605   have_gpgol:
606   !insertmacro SelectSection ${SEC_gpgme}
607   !insertmacro SelectSection ${SEC_gnupg}
608   skip_gpgol:
609 !endif
610
611 !ifdef HAVE_PKG_GPGEX
612   !insertmacro SectionFlagIsSet ${SEC_gpgex} \
613                 ${SF_SELECTED} have_gpgex skip_gpgex
614   have_gpgex:
615   # FIXME: Add Kleopatra as dependency.
616   skip_gpgex:
617 !endif
618
619 !ifdef HAVE_PKG_LIBPNG
620   !insertmacro SectionFlagIsSet ${SEC_libpng} \
621                 ${SF_SELECTED} have_libpng skip_libpng
622   have_libpng:
623   !insertmacro SelectSection ${SEC_pkgconfig}
624   skip_libpng:
625 !endif
626
627 !ifdef HAVE_PKG_DIRMNGR
628   !insertmacro SectionFlagIsSet ${SEC_dirmngr} ${SF_SELECTED} have_dirmngr skip_dirmngr
629   have_dirmngr:
630   !insertmacro SelectSection ${SEC_libgcrypt}
631   !insertmacro SelectSection ${SEC_libksba}
632   !insertmacro SelectSection ${SEC_libassuan}
633   !insertmacro SelectSection ${SEC_libgpg_error}
634   !insertmacro SelectSection ${SEC_w32pth}
635   skip_dirmngr:
636 !endif
637
638 !ifdef HAVE_PKG_GLIB
639   !insertmacro SectionFlagIsSet ${SEC_glib} \
640                 ${SF_SELECTED} have_glib skip_glib
641   have_glib:
642   !insertmacro SelectSection ${SEC_pkgconfig}
643   skip_glib:
644 !endif
645
646 !ifdef HAVE_PKG_GETTEXT
647   !insertmacro SectionFlagIsSet ${SEC_gettext} \
648                 ${SF_SELECTED} have_gettext skip_gettext
649   have_gettext:
650   !insertmacro SelectSection ${SEC_libiconv}
651   skip_gettext:
652 !endif
653
654 !ifdef HAVE_PKG_GPGME
655   !insertmacro SectionFlagIsSet ${SEC_gpgme} \
656                 ${SF_SELECTED} have_gpgme skip_gpgme
657   have_gpgme:
658   !insertmacro SelectSection ${SEC_libgpg_error}
659   skip_gpgme:
660 !endif
661
662   # Package "zlib" has no dependencies.
663   # Package "pkgconfig" has no dependencies.
664   # Package "libgpg-error" has no dependencies.
665
666 !ifdef HAVE_PKG_GNUPG
667   !insertmacro SectionFlagIsSet ${SEC_gnupg} ${SF_SELECTED} have_gnupg skip_gnupg
668   have_gnupg:
669   !insertmacro SelectSection ${SEC_libiconv}
670   skip_gnupg:
671 !endif
672
673   # Package "libiconv" has no dependencies.
674   # Package "qt" has no dependencies.
675
676 FunctionEnd
677
678
679 Function .onInit
680 Call G4wRunOnce
681
682   SetOutPath $TEMP
683 !ifdef SOURCES
684   File /oname=gpgspltmp.bmp "${TOP_SRCDIR}/doc/logo/gpg4win-logo-400px.bmp"
685   # We play the tune only for the source installer
686   File /oname=gpgspltmp.wav "${TOP_SRCDIR}/src/gpg4win-splash.wav"
687   g4wihelp::playsound $TEMP\gpgspltmp.wav
688   g4wihelp::showsplash 2500 $TEMP\gpgspltmp.bmp
689
690   Delete $TEMP\gpgspltmp.bmp
691   # Note that we delete gpgspltmp.wav in .onInst{Failed,Success}
692 !endif
693
694   # We can't use TOP_SRCDIR dir as the name of the file needs to be
695   # the same while building and running the installer.  Thus we
696   # generate the file from a template.
697   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "installer-options.ini"
698
699   Call CalcDefaults
700   Call CalcDepends
701   Call CheckOtherGnuPGApps
702 FunctionEnd
703
704
705 Function .onInstFailed
706   Delete $TEMP\gpgspltmp.wav
707 FunctionEnd
708
709 Function .onInstSuccess
710   Delete $TEMP\gpgspltmp.wav
711 FunctionEnd
712
713 Function .onSelChange
714   Call CalcDepends
715 FunctionEnd
716
717
718 # Note used anymore:
719 # This function is run from the finish page.
720 #Function RunOnFinish
721 #!ifdef HAVE_PKG_GPA
722 #    SectionGetFlags ${SEC_gpa} $R0 
723 #    IntOp $R0 $R0 & ${SF_SELECTED} 
724 #    IntCmp $R0 ${SF_SELECTED} 0 no_gpa_avail
725 #       Exec "$INSTDIR\gpa.exe"
726 #       Return
727 #   no_gpa_avail:
728 #!endif
729 #!ifdef HAVE_PKG_WINPT
730 #    SectionGetFlags ${SEC_winpt} $R0 
731 #    IntOp $R0 $R0 & ${SF_SELECTED} 
732 #    IntCmp $R0 ${SF_SELECTED} 0 no_winpt_avail
733 #       Exec "$INSTDIR\WinPT.exe --keymanager"
734 #       Return
735 #   no_winpt_avail:
736 #!endif
737 #  MessageBox MB_OK "$(T_NoKeyManager)"
738 #FunctionEnd
739
740
741 # This must be in a central place.  Urgs.
742
743 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
744 !ifdef HAVE_PKG_GNUPG
745   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg} $(DESC_SEC_gnupg)
746 !endif
747 !ifdef HAVE_PKG_GNUPG2
748   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg2} $(DESC_SEC_gnupg2)
749 !endif
750 !ifdef HAVE_PKG_GPGOL
751   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgol} $(DESC_SEC_gpgol)
752 !endif
753 !ifdef HAVE_PKG_GPGEX
754   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgex} $(DESC_SEC_gpgex)
755 !endif
756 !ifdef HAVE_PKG_GPA
757   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpa} $(DESC_SEC_gpa)
758 !endif
759 !ifdef HAVE_PKG_WINPT
760   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_winpt} $(DESC_SEC_winpt)
761 !endif
762 !ifdef HAVE_PKG_GPGEE
763   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgee} $(DESC_SEC_gpgee)
764 !endif
765 !ifdef HAVE_PKG_SYLPHEED_CLAWS
766   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_sylpheed} $(DESC_SEC_sylpheed)
767 !endif
768 !ifdef HAVE_PKG_CLAWS_MAIL
769   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_claws_mail} $(DESC_SEC_claws_mail)
770 !endif
771 #!ifdef HAVE_PKG_EUDORAGPG
772 #  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_eudoragpg} $(DESC_SEC_eudoragpg)
773 #!endif
774 !ifdef HAVE_PKG_MAN_NOVICE_EN
775   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_novice_en} $(DESC_SEC_man_novice_en)
776 !endif
777 !ifdef HAVE_PKG_MAN_ADVANCED_EN
778   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_advanced_en} $(DESC_SEC_man_advanced_en)
779 !endif
780 !ifdef HAVE_PKG_MAN_NOVICE_DE
781   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_novice_de} $(DESC_SEC_man_novice_de)
782 !endif
783 !ifdef HAVE_PKG_MAN_ADVANCED_DE
784   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_man_advanced_de} $(DESC_SEC_man_advanced_de)
785 !endif
786 !insertmacro MUI_FUNCTION_DESCRIPTION_END
787
788
789 # This also must be in a central place.  Also Urgs.
790
791 Section "-startmenu"
792
793 !ifdef HAVE_STARTMENU
794   # Make sure that the context of the automatic variables has been set to
795   # the "all users" shell folder.  This guarantees that the menu gets written
796   # for all users.  We have already checked that we are running as Admin; or
797   # we printed a warning that installation will not succeed.
798   SetShellVarContext all
799
800   # Check if the start menu entries where requested.
801   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
802         "Field 2" "State"
803   IntCmp $R0 0 no_start_menu
804
805 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
806     CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
807
808 !ifdef HAVE_PKG_WINPT
809     SectionGetFlags ${SEC_winpt} $R0 
810     IntOp $R0 $R0 & ${SF_SELECTED} 
811     IntCmp $R0 ${SF_SELECTED} 0 no_winpt_menu 
812     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\WinPT.lnk" \
813         "$INSTDIR\winpt.exe" \
814         "" "$INSTDIR\winpt.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_winpt)
815    no_winpt_menu:
816 !endif
817
818 !ifdef HAVE_PKG_GPA
819     SectionGetFlags ${SEC_gpa} $R0 
820     IntOp $R0 $R0 & ${SF_SELECTED} 
821     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_menu 
822     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GPA.lnk" \
823         "$INSTDIR\gpa.exe" \
824         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
825   no_gpa_menu:
826 !endif
827
828 !ifdef HAVE_PKG_SYLPHEED_CLAWS
829     SectionGetFlags ${SEC_sylpheed} $R0 
830     IntOp $R0 $R0 & ${SF_SELECTED} 
831     IntCmp $R0 ${SF_SELECTED} 0 no_sylpheed_menu 
832     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Sylpheed-Claws.lnk" \
833         "$INSTDIR\sylpheed-claws.exe" \
834         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed)
835 !ifndef GPG4WIN_LIGHT
836     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Sylpheed-Claws Manual.lnk" \
837         "$INSTDIR\sylpheed-claws-manual.pdf" \
838         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed_pdf)
839 !endif
840   no_sylpheed_menu:
841 !endif
842
843 !ifdef HAVE_PKG_CLAWS_MAIL
844     SectionGetFlags ${SEC_claws_mail} $R0 
845     IntOp $R0 $R0 & ${SF_SELECTED} 
846     IntCmp $R0 ${SF_SELECTED} 0 no_claws_mail_menu 
847     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Claws-Mail.lnk" \
848         "$INSTDIR\claws-mail.exe" \
849         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_claws_mail)
850 !ifndef GPG4WIN_LIGHT
851     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Claws-Mail Manual.lnk" \
852         "$INSTDIR\claws-mail-manual.pdf" \
853         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_claws_mail_pdf)
854 !endif
855   no_claws_mail_menu:
856 !endif
857
858 #!ifdef HAVE_PKG_EUDORAGPG
859 #    SectionGetFlags ${SEC_eudoragpg} $R0 
860 #    IntOp $R0 $R0 & ${SF_SELECTED} 
861 #    IntCmp $R0 ${SF_SELECTED} 0 no_eudoragpg_menu 
862 #    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\EudoraGPG Plugin.lnk" \
863 #       "$INSTDIR\share\eudoragpg\eudoragpg.html" \
864 #        "" "" "" SW_SHOWNORMAL "" ""
865 #  no_eudoragpg_menu:
866 #!endif
867
868 !ifdef HAVE_PKG_MAN_NOVICE_EN
869     SectionGetFlags ${SEC_man_novice_en} $R0 
870     IntOp $R0 $R0 & ${SF_SELECTED} 
871     IntCmp $R0 ${SF_SELECTED} 0 no_man_novice_en_menu 
872     CreateShortCut \
873         "$SMPROGRAMS\$STARTMENU_FOLDER\$(DESC_Name_man_novice_en).lnk" \
874         "$INSTDIR\share\gpg4win\novices.pdf" \
875         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_novice_en)
876   no_man_novice_en_menu:
877 !endif
878
879 !ifdef HAVE_PKG_MAN_ADVANCED_EN
880     SectionGetFlags ${SEC_man_advanced_en} $R0 
881     IntOp $R0 $R0 & ${SF_SELECTED} 
882     IntCmp $R0 ${SF_SELECTED} 0 no_man_advanced_en_menu 
883     CreateShortCut \
884         "$SMPROGRAMS\$STARTMENU_FOLDER\$(DESC_Name_man_advanced_en).lnk" \
885         "$INSTDIR\share\gpg4win\advanced.pdf" \
886         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_advanced_en)
887   no_man_advanced_en_menu:
888 !endif
889
890 !ifdef HAVE_PKG_MAN_NOVICE_DE
891     SectionGetFlags ${SEC_man_novice_de} $R0 
892     IntOp $R0 $R0 & ${SF_SELECTED} 
893     IntCmp $R0 ${SF_SELECTED} 0 no_man_novice_de_menu 
894     CreateShortCut \
895         "$SMPROGRAMS\$STARTMENU_FOLDER\$(DESC_Name_man_novice_de).lnk" \
896         "$INSTDIR\share\gpg4win\einsteiger.pdf" \
897         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_novice_de)
898   no_man_novice_de_menu:
899 !endif
900
901 !ifdef HAVE_PKG_MAN_ADVANCED_DE
902     SectionGetFlags ${SEC_man_advanced_de} $R0 
903     IntOp $R0 $R0 & ${SF_SELECTED} 
904     IntCmp $R0 ${SF_SELECTED} 0 no_man_advanced_de_menu 
905     CreateShortCut \
906         "$SMPROGRAMS\$STARTMENU_FOLDER\$(DESC_Name_man_advanced_de).lnk" \
907         "$INSTDIR\share\gpg4win\durchblicker.pdf" \
908         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_advanced_de)
909   no_man_advanced_de_menu:
910 !endif
911
912 !ifdef HAVE_PKG_GPGEE
913     SectionGetFlags ${SEC_gpgee} $R0 
914     IntOp $R0 $R0 & ${SF_SELECTED} 
915     IntCmp $R0 ${SF_SELECTED} 0 no_gpgee_menu 
916     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GPGee Manual.lnk" \
917         "$INSTDIR\GPGee.hlp" "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpgee_hlp)
918   no_gpgee_menu:
919 !endif
920
921     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG FAQ.lnk" \
922                    "$INSTDIR\share\gnupg\faq.html" \
923                    "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_faq)
924
925     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Gpg4Win README.lnk" \
926                    "$INSTDIR\share\gpg4win\README.$(T_LangCode).txt" \
927                    "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpg4win_readme)
928
929 # No more uninstall link because Windows has its own feature to call
930 #  the uninstaller.
931 #    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" \
932 #       "$INSTDIR\${PACKAGE}-uninstall.exe"
933 !insertmacro MUI_STARTMENU_WRITE_END
934
935  no_start_menu:
936
937
938
939   # Check if the desktop entries where requested.
940   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
941         "Field 3" "State"
942   IntCmp $R0 0 no_desktop
943
944 !ifdef HAVE_PKG_WINPT
945     SectionGetFlags ${SEC_winpt} $R0 
946     IntOp $R0 $R0 & ${SF_SELECTED}
947     IntCmp $R0 ${SF_SELECTED} 0 no_winpt_desktop
948     # Create link which directly starts the WinPT key manager
949     CreateShortCut "$DESKTOP\WinPT.lnk" \
950         "$INSTDIR\winpt.exe" \
951         "--keymanager" "$INSTDIR\winpt.exe" "" \
952         SW_SHOWNORMAL "" $(DESC_Menu_winpt)
953    no_winpt_desktop:
954 !endif
955
956 !ifdef HAVE_PKG_GPA
957     SectionGetFlags ${SEC_gpa} $R0 
958     IntOp $R0 $R0 & ${SF_SELECTED} 
959     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_desktop
960     CreateShortCut "$DESKTOP\GPA.lnk" \
961         "$INSTDIR\gpa.exe" \
962         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
963   no_gpa_desktop:
964 !endif
965
966 !ifdef HAVE_PKG_SYLPHEED_CLAWS
967     SectionGetFlags ${SEC_sylpheed} $R0 
968     IntOp $R0 $R0 & ${SF_SELECTED} 
969     IntCmp $R0 ${SF_SELECTED} 0 no_sylpheed_desktop
970     CreateShortCut "$DESKTOP\Sylpheed-Claws.lnk" \
971         "$INSTDIR\sylpheed-claws.exe" \
972         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed)
973 !ifndef GPG4WIN_LIGHT
974     CreateShortCut "$DESKTOP\Sylpheed-Claws Manual.lnk" \
975         "$INSTDIR\sylpheed-claws-manual.pdf" \
976         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed_pdf)
977 !endif
978   no_sylpheed_desktop:
979 !endif
980
981 !ifdef HAVE_PKG_CLAWS_MAIL
982     SectionGetFlags ${SEC_claws_mail} $R0 
983     IntOp $R0 $R0 & ${SF_SELECTED} 
984     IntCmp $R0 ${SF_SELECTED} 0 no_claws_mail_desktop
985     CreateShortCut "$DESKTOP\Claws-Mail.lnk" \
986         "$INSTDIR\claws-mail.exe" \
987         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_claws_mail)
988 !ifndef GPG4WIN_LIGHT
989     CreateShortCut "$DESKTOP\Claws-Mail Manual.lnk" \
990         "$INSTDIR\claws-mail-manual.pdf" \
991         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_claws_mail_pdf)
992 !endif
993   no_claws_mail_desktop:
994 !endif
995
996 !ifdef HAVE_PKG_MAN_NOVICE_EN
997     SectionGetFlags ${SEC_man_novice_en} $R0 
998     IntOp $R0 $R0 & ${SF_SELECTED} 
999     IntCmp $R0 ${SF_SELECTED} 0 no_man_novice_en_desktop
1000     CreateShortCut \
1001         "$DESKTOP\$(DESC_Name_man_novice_en).lnk" \
1002         "$INSTDIR\share\gpg4win\novices.pdf" \
1003         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_novice_en)
1004   no_man_novice_en_desktop:
1005 !endif
1006
1007 !ifdef HAVE_PKG_MAN_ADVANCED_EN
1008     SectionGetFlags ${SEC_man_advanced_en} $R0 
1009     IntOp $R0 $R0 & ${SF_SELECTED} 
1010     IntCmp $R0 ${SF_SELECTED} 0 no_man_advanced_en_desktop
1011     CreateShortCut \
1012         "$DESKTOP\$(DESC_Name_man_advanced_en).lnk" \
1013         "$INSTDIR\share\gpg4win\advanced.pdf" \
1014         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_advanced_en)
1015   no_man_advanced_en_desktop:
1016 !endif
1017
1018 !ifdef HAVE_PKG_MAN_NOVICE_DE
1019     SectionGetFlags ${SEC_man_novice_de} $R0 
1020     IntOp $R0 $R0 & ${SF_SELECTED} 
1021     IntCmp $R0 ${SF_SELECTED} 0 no_man_novice_de_desktop
1022     CreateShortCut \
1023         "$DESKTOP\$(DESC_Name_man_novice_de).lnk" \
1024         "$INSTDIR\share\gpg4win\einsteiger.pdf" \
1025         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_novice_de)
1026   no_man_novice_de_desktop:
1027 !endif
1028
1029 !ifdef HAVE_PKG_MAN_ADVANCED_DE
1030     SectionGetFlags ${SEC_man_advanced_de} $R0 
1031     IntOp $R0 $R0 & ${SF_SELECTED} 
1032     IntCmp $R0 ${SF_SELECTED} 0 no_man_advanced_de_desktop
1033     CreateShortCut \
1034         "$DESKTOP\$(DESC_Name_man_advanced_de).lnk" \
1035         "$INSTDIR\share\gpg4win\durchblicker.pdf" \
1036         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_man_advanced_de)
1037   no_man_advanced_de_desktop:
1038 !endif
1039
1040 !ifdef HAVE_PKG_GPGEE
1041     SectionGetFlags ${SEC_gpgee} $R0 
1042     IntOp $R0 $R0 & ${SF_SELECTED} 
1043     IntCmp $R0 ${SF_SELECTED} 0 no_gpgee_desktop
1044     CreateShortCut "$DESKTOP\GPGee Manual.lnk" \
1045         "$INSTDIR\GPGee.hlp" "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpgee_hlp)
1046   no_gpgee_desktop:
1047 !endif
1048
1049     CreateShortCut "$DESKTOP\GnuPG FAQ.lnk" \
1050                    "$INSTDIR\share\gnupg\faq.html" \
1051                    "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_faq)
1052
1053 no_desktop:
1054
1055         
1056   # Check if the quick launch bar entries where requested.
1057   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
1058         "Field 4" "State"
1059   IntCmp $R0 0 no_quick_launch
1060   StrCmp $QUICKLAUNCH $TEMP no_quick_launch
1061
1062 !ifdef HAVE_PKG_WINPT
1063     SectionGetFlags ${SEC_winpt} $R0 
1064     IntOp $R0 $R0 & ${SF_SELECTED}
1065     IntCmp $R0 ${SF_SELECTED} 0 no_winpt_quicklaunch 
1066     CreateShortCut "$QUICKLAUNCH\WinPT.lnk" \
1067         "$INSTDIR\winpt.exe" \
1068         "" "$INSTDIR\winpt.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_winpt)
1069    no_winpt_quicklaunch:
1070 !endif
1071
1072 !ifdef HAVE_PKG_GPA
1073     SectionGetFlags ${SEC_gpa} $R0 
1074     IntOp $R0 $R0 & ${SF_SELECTED} 
1075     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_quicklaunch
1076     CreateShortCut "$QUICKLAUNCH\GPA.lnk" \
1077         "$INSTDIR\gpa.exe" \
1078         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
1079   no_gpa_quicklaunch:
1080 !endif
1081
1082 !ifdef HAVE_PKG_SYLPHEED_CLAWS
1083     SectionGetFlags ${SEC_sylpheed} $R0 
1084     IntOp $R0 $R0 & ${SF_SELECTED} 
1085     IntCmp $R0 ${SF_SELECTED} 0 no_sylpheed_quicklaunch
1086     CreateShortCut "$QUICKLAUNCH\Sylpheed-Claws.lnk" \
1087         "$INSTDIR\sylpheed-claws.exe" \
1088         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_sylpheed)
1089   no_sylpheed_quicklaunch:
1090 !endif
1091
1092 !ifdef HAVE_PKG_CLAWS_MAIL
1093     SectionGetFlags ${SEC_claws_mail} $R0 
1094     IntOp $R0 $R0 & ${SF_SELECTED} 
1095     IntCmp $R0 ${SF_SELECTED} 0 no_claws_mail_quicklaunch
1096     CreateShortCut "$QUICKLAUNCH\Claws-Mail.lnk" \
1097         "$INSTDIR\claws-mail.exe" \
1098         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_claws_mail)
1099   no_claws_mail_quicklaunch:
1100 !endif
1101
1102
1103 no_quick_launch:
1104
1105
1106 !endif
1107 SectionEnd
1108
1109
1110 # FIXME: Now write desktop and quick launch bar.
1111 # Don't forget to delete the corr. entries in installer-finish. Uninstall.
1112