chiark / gitweb /
gnupg2 (2.1.17-3) unstable; urgency=medium
[gnupg2.git] / build-aux / speedo / w32 / inst.nsi
1 # inst.nsi - Installer for GnuPG on Windows.      -*- coding: latin-1; -*-
2 # Copyright (C) 2005, 2014 g10 Code GmbH
3 #
4 # This file is part of GnuPG.
5 #
6 # GnuPG 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 3 of the License, or
9 # (at your option) any later version.
10 #
11 # GnuPG 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, see <http://www.gnu.org/licenses/>.
18
19 # Macros to provide for invocation:
20 #  INST_DIR
21 #  INST6_DIR
22 #  BUILD_DIR
23 #  TOP_SRCDIR
24 #  W32_SRCDIR
25 #  BUILD_ISODATE   - the build date, e.g. "2014-10-31"
26 #  BUILD_DATESTR   - ditto w/o '-',  e.g. "20141031"
27 #  NAME
28 #  VERSION
29 #  PROD_VERSION
30 #
31 #  WITH_GUI        - Include the GPA GUI
32
33 !cd "${INST_DIR}"
34 !addincludedir "${W32_SRCDIR}"
35 !addplugindir "${BUILD_DIR}"
36
37 # The package name and version.  PRETTY_PACKAGE is a user visible name
38 # only while PACKAGE is useful for filenames etc.  PROD_VERSION is the
39 # product version and needs to be in the format "MAJ.MIN.MIC.BUILDNR".
40 !define PACKAGE "gnupg"
41 !define PACKAGE_SHORT "gnupg"
42 !define PRETTY_PACKAGE "GNU Privacy Guard"
43 !define PRETTY_PACKAGE_SHORT "GnuPG"
44 !define COMPANY "The GnuPG Project"
45 !define COPYRIGHT "Copyright (C) 2015 The GnuPG Project"
46 !define DESCRIPTION "GnuPG: The GNU Privacy Guard for Windows"
47
48 !define INSTALL_DIR "GnuPG"
49
50 !define WELCOME_TITLE_ENGLISH \
51  "Welcome to the installation of GnuPG"
52
53 !define WELCOME_TITLE_GERMAN \
54  "Willkommen bei der Installation von GnuPG"
55
56 !define ABOUT_ENGLISH \
57  "GnuPG is the mostly used software for mail and data encryption. \
58   GnuPG can be used to encrypt data and to create digital signatures. \
59   GnuPG includes an advanced key management facility and is compliant \
60   with the OpenPGP Internet standard as described in RFC-4880. \
61   \r\n\r\n$_CLICK \
62   \r\n\r\n\r\n\r\n\r\nThis is GnuPG version ${VERSION}.\r\n\
63   File version: ${PROD_VERSION}\r\n\
64   Release date: ${BUILD_ISODATE}"
65 !define ABOUT_GERMAN \
66  "GnuPG is die häufigst verwendete Software zur Mail- und Datenverschlüsselung.\
67    \r\n\r\n$_CLICK \
68    \r\n\r\n\r\n\r\n\r\nDies ist GnuPG Version ${VERSION}.\r\n\
69    Dateiversion: ${PROD_VERSION}\r\n\
70    Releasedatum: ${BUILD_ISODATE}"
71
72
73 # The copyright license of the package.  Define only one of these.
74 !define LICENSE_GPL
75
76 # Select the best compression algorithm available.  The dictionary
77 # size is the default (8 MB).
78 !ifndef SOURCES
79 SetCompressor lzma
80 # SetCompressorDictSize 8
81 !endif
82
83 # Include the generic parts.
84 !define HAVE_STARTMENU
85
86 # We use the modern UI.
87 !include "MUI.nsh"
88
89 # Some helper some
90 !include "LogicLib.nsh"
91 !include "x64.nsh"
92
93 # Set the package name.  Note that this name should not be suffixed
94 # with the version because this would get displayed in the start menu.
95 # Given that a slash in the name troubles Windows startmenu creation
96 # we set the Startmenu explicit below.
97 Name "${PRETTY_PACKAGE}"
98
99 # Set the output filename.
100 OutFile "${NAME}-${VERSION}_${BUILD_DATESTR}.exe"
101
102 #Fixme: Do we need a logo?
103 #Icon "${TOP_SRCDIR}/doc/logo/gnupg-logo-icon.ico"
104 #UninstallIcon "${TOP_SRCDIR}/doc/logo/gnupg-logo-icon.ico"
105
106 # Set the installation directory.
107 !ifndef INSTALL_DIR
108 !define INSTALL_DIR "GnuPG"
109 !endif
110 InstallDir "$PROGRAMFILES\${INSTALL_DIR}"
111
112 InstallDirRegKey HKLM "Software\${PACKAGE_SHORT}" "Install Directory"
113
114
115 # Add version information to the file properties.
116 VIProductVersion "${PROD_VERSION}"
117 VIAddVersionKey "ProductName" "${PRETTY_PACKAGE_SHORT} (${VERSION})"
118 VIAddVersionKey "Comments" \
119    "GnuPG is Free Software; you can redistribute it  \
120     and/or modify it under the terms of the GNU General Public License.  \
121     You should have received a copy of the GNU General Public License  \
122     along with this software; if not, write to the Free Software  \
123     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,  \
124     MA 02110-1301, USA"
125 VIAddVersionKey "CompanyName" "${COMPANY}"
126 VIAddVersionKey "LegalTrademarks" ""
127 VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
128 VIAddVersionKey "FileDescription" "${DESCRIPTION}"
129 VIAddVersionKey "FileVersion" "${PROD_VERSION}"
130
131 # Interface Settings
132
133 # !define MUI_ABORTWARNING
134 !define MUI_FINISHPAGE_NOAUTOCLOSE
135 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
136
137 !define MUI_HEADERIMAGE
138 !define MUI_HEADERIMAGE_BITMAP "${W32_SRCDIR}\gnupg-logo-150x57.bmp"
139 !define MUI_WELCOMEFINISHPAGE_BITMAP "${W32_SRCDIR}\gnupg-logo-164x314.bmp"
140
141 # Remember the installer language
142 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
143 !define MUI_LANGDLL_REGISTRY_KEY "Software\GnuPG"
144 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
145
146 #
147 # The list of wizard pages.
148 #
149 !define MUI_WELCOMEPAGE_TITLE "$(T_WelcomeTitle)"
150 !define MUI_WELCOMEPAGE_TEXT  "$(T_About)"
151 !insertmacro MUI_PAGE_WELCOME
152
153 !define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)"
154 !define MUI_PAGE_HEADER_SUBTEXT "$(T_GPLHeader)"
155 !define MUI_LICENSEPAGE_TEXT_BOTTOM "$(T_GPLShort)"
156 !insertmacro MUI_PAGE_LICENSE "${TOP_SRCDIR}/COPYING"
157
158 !define MUI_PAGE_CUSTOMFUNCTION_SHOW PrintNonAdminWarning
159 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckExistingVersion
160 !insertmacro MUI_PAGE_COMPONENTS
161
162 # We don't have MUI_PAGE_DIRECTORY
163
164 !ifdef HAVE_STARTMENU
165
166 Page custom CustomPageOptions
167
168 Var STARTMENU_FOLDER
169
170 !define MUI_PAGE_CUSTOMFUNCTION_PRE CheckIfStartMenuWanted
171 !define MUI_STARTMENUPAGE_NODISABLE
172 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
173 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GnuPG"
174 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
175 # We need to set the Startmenu name explicitly because a slash in the
176 # name is not possible.
177 !define MUI_STARTMENUPAGE_DEFAULTFOLDER "GnuPG"
178
179 !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
180
181 !endif
182
183 !define MUI_PAGE_CUSTOMFUNCTION_PRE PrintCloseOtherApps
184 !insertmacro MUI_PAGE_INSTFILES
185
186 #!define MUI_PAGE_CUSTOMFUNCTION_PRE ShowFinalWarnings
187 !define MUI_FINISHPAGE_SHOWREADME "README.txt"
188 !define MUI_FINISHPAGE_SHOWREADME_TEXT "$(T_ShowReadme)"
189 #!define MUI_FINISHPAGE_RUN
190 #!define MUI_FINISHPAGE_RUN_FUNCTION RunOnFinish
191 #!define MUI_FINISHPAGE_RUN_TEXT "$(T_RunKeyManager)"
192 #!define MUI_FINISHPAGE_RUN_NOTCHECKED
193 !define MUI_FINISHPAGE_LINK "$(T_MoreInfo)"
194 !define MUI_FINISHPAGE_LINK_LOCATION "$(T_MoreInfoURL)"
195 !insertmacro MUI_PAGE_FINISH
196
197
198 # Uninstaller pages.
199
200 !insertmacro MUI_UNPAGE_CONFIRM
201 !insertmacro MUI_UNPAGE_INSTFILES
202
203
204 #Page license
205 #Page components
206 #Page directory
207 #Page instfiles
208 #UninstPage uninstConfirm
209 #UninstPage instfiles
210
211
212 # Language support.  This has to be done after defining the pages, but
213 # before defining the translation strings.  Confusing.
214
215 !insertmacro MUI_LANGUAGE "English"
216 !insertmacro MUI_LANGUAGE "German"
217
218 !insertmacro MUI_RESERVEFILE_LANGDLL
219 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
220 ReserveFile "${BUILD_DIR}\g4wihelp.dll"
221 ReserveFile "${W32_SRCDIR}\gnupg-logo-150x57.bmp"
222 ReserveFile "${W32_SRCDIR}\gnupg-logo-164x314.bmp"
223 ReserveFile "${TOP_SRCDIR}\COPYING"
224 ReserveFile "${W32_SRCDIR}\inst-options.ini"
225
226 # Language support
227
228 LangString T_LangCode ${LANG_ENGLISH} "en"
229 LangString T_LangCode ${LANG_GERMAN}  "de"
230
231
232 # The WelcomeTitle is displayed on the first page.
233 LangString T_WelcomeTitle ${LANG_ENGLISH} "${WELCOME_TITLE_ENGLISH}"
234 LangString T_WelcomeTitle ${LANG_GERMAN} "${WELCOME_TITLE_GERMAN}"
235
236 # The About string as displayed on the first page.
237 LangString T_About ${LANG_ENGLISH} "${ABOUT_ENGLISH}"
238 LangString T_About ${LANG_GERMAN} "${ABOUT_GERMAN}"
239
240 # Startup page
241 LangString T_GPLHeader ${LANG_ENGLISH} \
242   "This software is licensed under the terms of the GNU General Public \
243    License (GNU GPL)."
244 LangString T_GPLHeader ${LANG_GERMAN}} \
245   "Diese Software ist unter der GNU General Public License \
246    (GNU GPL) lizensiert."
247
248 LangString T_GPLShort ${LANG_ENGLISH} \
249   "In short: You are allowed to run this software for any purpose. \
250    You may distribute it as long as you give the recipients the same \
251    rights you have received."
252 LangString T_GPLShort ${LANG_GERMAN} \
253   "In aller Kürze: Sie haben das Recht, die Software zu jedem Zweck \
254    einzusetzen.  Sie können die Software weitergeben, sofern Sie dem \
255    Empfänger dieselben Rechte einräumen, die auch Sie erhalten haben."
256
257 LangString T_RunKeyManager ${LANG_ENGLISH} \
258    "Run the key manager"
259 LangString T_RunKeyManager ${LANG_GERMAN} \
260    "Die Schlüsselverwaltung aufrufen"
261
262 LangString T_MoreInfo ${LANG_ENGLISH} \
263    "Click here to see how to help the GnuPG Project"
264 LangString T_MoreInfo ${LANG_GERMAN} \
265    "Hier klicken um dem GnuPG Projekt zu zu helfen"
266 LangString T_MoreInfoURL ${LANG_ENGLISH} "https://gnupg.org/donate"
267 LangString T_MoreInfoURL ${LANG_GERMAN}  "https://gnupg.org/donate"
268
269 LangString T_ShowReadme ${LANG_ENGLISH} \
270    "Show the README file"
271 LangString T_ShowReadme ${LANG_GERMAN} \
272    "Die README Datei anzeigen"
273
274 LangString T_NoKeyManager ${LANG_ENGLISH} \
275    "No key manager has been installed, thus we can't run one now."
276 LangString T_NoKeyManager ${LANG_GERMAN} \
277    "Es wurde keine Schlüsselverwaltung installiert. \
278     Deswegen kann sie jetzt auch nicht ausgeführt werden."
279
280 # Functions
281
282 # Custom functions and macros for this installer.
283 LangString T_AlreadyRunning ${LANG_ENGLISH} \
284    "An instance of this installer is already running."
285 LangString T_AlreadyRunning ${LANG_GERMAN} \
286    "Ein Exemplar dieses Installers läuft bereits."
287
288 Function G4wRunOnce
289   Push $R0
290   StrCpy $R0 "gnupg"
291   g4wihelp::runonce
292   StrCmp $R0 0 +3
293      MessageBox MB_OK $(T_AlreadyRunning)
294      Abort
295   Pop $R0
296 FunctionEnd
297
298 #
299 # Control function for the Custom page to select special
300 # install options.
301 #
302 Function CustomPageOptions
303   !insertmacro MUI_HEADER_TEXT "$(T_InstallOptions)" "$(T_InstallOptLinks)"
304
305   # Note, that the default selection is done in the ini file
306   !insertmacro MUI_INSTALLOPTIONS_WRITE "${W32_SRCDIR}/inst-options.ini" \
307         "Field 1" "Text"  "$(T_InstOptLabelA)"
308   !insertmacro MUI_INSTALLOPTIONS_WRITE "${W32_SRCDIR}/inst-options.ini" \
309         "Field 2" "Text"  "$(T_InstOptFieldA)"
310   !insertmacro MUI_INSTALLOPTIONS_WRITE "${W32_SRCDIR}/inst-options.ini" \
311         "Field 3" "Text"  "$(T_InstOptFieldB)"
312   !insertmacro MUI_INSTALLOPTIONS_WRITE "${W32_SRCDIR}/inst-options.ini" \
313         "Field 4" "Text"  "$(T_InstOptFieldC)"
314   !insertmacro MUI_INSTALLOPTIONS_WRITE "${W32_SRCDIR}/inst-options.ini" \
315         "Field 5" "Text"  "$(T_InstOptLabelB)"
316
317   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${W32_SRCDIR}/inst-options.ini"
318 FunctionEnd
319
320
321 # Check whether GnuPG has already been installed.  This is called as
322 # a leave function from the components page.  A call to abort will get
323 # back to the components selection.
324 Function CheckExistingVersion
325   ClearErrors
326   FileOpen $0 "$INSTDIR\VERSION" r
327   IfErrors nexttest
328   FileRead $0 $R0
329   FileRead $0 $R1
330   FileClose $0
331
332   Push $R1
333   Call TrimNewLines
334   Pop $R1
335
336   MessageBox MB_YESNO "$(T_FoundExistingVersion)" IDYES leave
337   Abort
338
339  nexttest:
340   ClearErrors
341   ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GnuPG" "DisplayVersion"
342   IfErrors leave 0
343      MessageBox MB_YESNO "$(T_FoundExistingVersionB)" IDYES leave
344      Abort
345
346  leave:
347 FunctionEnd
348
349
350
351 # PrintNonAdminWarning
352
353 # Check whether the current user is in the Administrator group or an
354 # OS version without the need for an Administrator is in use.  Print a
355 # diagnostic if this is not the case and abort installation.
356 Function PrintNonAdminWarning
357   ClearErrors
358   UserInfo::GetName
359   IfErrors leave
360   Pop $0
361   UserInfo::GetAccountType
362   Pop $1
363   StrCmp $1 "Admin" leave +1
364   MessageBox MB_OK "$(T_AdminNeeded)"
365   Quit
366
367  leave:
368 FunctionEnd
369
370
371 # Check whether the start menu is actually wanted.
372
373 Function CheckIfStartMenuWanted
374   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "${W32_SRCDIR}/inst-options.ini" \
375         "Field 2" "State"
376   IntCmp $R0 1 +2
377     Abort
378 FunctionEnd
379
380
381 # Check whether this is a reinstall and popup a message box to explain
382 # that it is better to close other apps before continuing
383 Function PrintCloseOtherApps
384     IfFileExists $INSTDIR\bin\gpg.exe print_warning
385     IfFileExists $INSTDIR\bin\gpa.exe print_warning
386     Return
387    print_warning:
388     MessageBox MB_OK|MB_ICONEXCLAMATION "$(T_CloseOtherApps)"
389
390 FunctionEnd
391
392 # Called right before the final page to show more warnings.
393 #Function ShowFinalWarnings
394 #   leave:
395 #FunctionEnd
396
397 #-----------------------------------------------
398 # Strings pertaining to the install options page
399 #-----------------------------------------------
400
401 # Installation options title
402 LangString T_InstallOptions ${LANG_ENGLISH} "Install Options"
403 LangString T_InstallOptions ${LANG_GERMAN}  "Installationsoptionen"
404
405 # Installation options subtitle 1
406 LangString T_InstallOptLinks ${LANG_ENGLISH} "Start links"
407 LangString T_InstallOptLinks ${LANG_GERMAN}  "Startlinks"
408
409 LangString T_InstOptLabelA  ${LANG_ENGLISH} \
410      "Please select where GnuPG shall install links:"
411 LangString T_InstOptLabelA  ${LANG_GERMAN} \
412      "Bitte wählen Sie, welche Verknüpfungen angelegt werden sollen:"
413
414 LangString T_InstOptLabelB  ${LANG_ENGLISH} \
415      "(Only programs will be linked into the quick launch bar.)"
416 LangString T_InstOptLabelB  ${LANG_GERMAN} \
417      "(In die Schnellstartleiste werden nur Verknüpfungen für \
418       Programme angelegt.) "
419
420 LangString T_InstOptFieldA  ${LANG_ENGLISH} \
421      "Start Menu"
422 LangString T_InstOptFieldA  ${LANG_GERMAN} \
423      "Startmenü"
424
425 LangString T_InstOptFieldB  ${LANG_ENGLISH} \
426      "Desktop"
427 LangString T_InstOptFieldB  ${LANG_GERMAN} \
428      "Arbeitsfläche"
429
430 LangString T_InstOptFieldC  ${LANG_ENGLISH} \
431      "Quick Launch Bar"
432 LangString T_InstOptFieldC  ${LANG_GERMAN} \
433      "Schnellstartleiste"
434
435 #------------------------------------------------
436 # String pertaining to the existing version check
437 #------------------------------------------------
438 LangString T_FoundExistingVersion ${LANG_ENGLISH} \
439      "Version $R1 has already been installed.  $\r$\n\
440       Do you want to overwrite it with version ${VERSION}?"
441 LangString T_FoundExistingVersion ${LANG_GERMAN} \
442      "Version $R1 ist hier bereits installiert. $\r$\n\
443       Möchten Sie diese mit Version ${VERSION} Ã¼berschreiben? $\r$\n\
444        $\r$\n\
445       (Sie können in jedem Fall mit JA antworten, falls es sich um \
446        eine neuere oder dieselbe Version handelt.)"
447 LangString T_FoundExistingVersionB ${LANG_ENGLISH} \
448      "A version of GnuPG has already been installed on the system. \
449       There will be no problem installing and thus overwriting this \
450       Version. $\r$\n\
451        $\r$\n\
452       Do you want to continue installing GnuPG?"
453 LangString T_FoundExistingVersionB ${LANG_GERMAN} \
454      "Eine Version von GnuPG ist hier bereits installiert. \
455       Es ist problemlos möglich, die Installation fortzuführen.  $\r$\n\
456         $\r$\n\
457       Möchten die die Installation von GnuPG fortführen?"
458
459
460
461 # From Function PrintNonAdminWarning
462 LangString T_AdminNeeded ${LANG_ENGLISH} \
463    "Warning: Administrator permissions required for a successful installation"
464 LangString T_AdminNeeded ${LANG_GERMAN} \
465    "Achtung: Für eine erfolgreiche Installation werden \
466     Administratorrechte benötigt."
467
468 # From Function PrintCloseOtherApps
469 LangString T_CloseOtherApps ${LANG_ENGLISH} \
470    "Please make sure that other applications are not running. \
471     GnuPG will try to install anyway but a reboot may be required."
472 LangString T_CloseOtherApps ${LANG_GERMAN} \
473    "Bitte stellen Sie sicher, daß alle anderen Anwendugen geschlossen \
474     sind.  GnuPG wird auf jeden Fall versuchen, eine Installation \
475     durchzuführen; es ist dann aber u.U. notwendig, das System neu zu starten."
476
477
478 # TrimNewlines  - taken from the NSIS reference
479 # input, top of stack  (e.g. whatever$\r$\n)
480 # output, top of stack (replaces, with e.g. whatever)
481 # modifies no other variables.
482 Function TrimNewlines
483    Exch $R0
484    Push $R1
485    Push $R2
486    StrCpy $R1 0
487
488  loop:
489    IntOp $R1 $R1 - 1
490    StrCpy $R2 $R0 1 $R1
491    StrCmp $R2 "$\r" loop
492    StrCmp $R2 "$\n" loop
493    IntOp $R1 $R1 + 1
494    IntCmp $R1 0 no_trim_needed
495    StrCpy $R0 $R0 $R1
496
497  no_trim_needed:
498    Pop $R2
499    Pop $R1
500    Exch $R0
501 FunctionEnd
502
503
504 # AddToPath - Adds the given dir to the search path.
505 #        Input - head of the stack
506 Function AddToPath
507   Exch $0
508   g4wihelp::path_add "$0"
509   StrCmp $R5 "0" add_to_path_done
510   SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
511   add_to_path_done:
512   Pop $0
513 FunctionEnd
514
515
516 # RemoveFromPath - Remove a given dir from the path
517 #     Input: head of the stack
518 Function un.RemoveFromPath
519   Exch $0
520   g4wihelp::path_remove "$0"
521   StrCmp $R5 "0" remove_from_path_done
522   SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
523   remove_from_path_done:
524   Pop $0
525 FunctionEnd
526
527
528 #
529 # Define the installer sections.
530 #
531
532 Section "-gnupginst"
533   SetOutPath "$INSTDIR"
534
535   File "${BUILD_DIR}/README.txt"
536
537   # Write a version file.
538   FileOpen $0 "$INSTDIR\VERSION" w
539   FileWrite $0 "${PACKAGE}$\r$\n"
540   FileWrite $0 "${VERSION}$\r$\n"
541   FileClose $0
542
543   WriteRegStr HKLM "Software\GnuPG" "Install Directory" $INSTDIR
544
545   # If we are reinstalling, try to kill a possible running gpa using
546   # an already installed gpa.
547   ifFileExists "$INSTDIR\bin\launch-gpa.exe"  0 no_uiserver
548     nsExec::ExecToLog '"$INSTDIR\bin\launch-gpa" "--stop-server"'
549
550   no_uiserver:
551
552   # If we are reinstalling, try to kill a possible running agent using
553   # an already installed gpgconf.
554
555   ifFileExists "$INSTDIR\bin\gpgconf.exe"  0 no_gpgconf
556     nsExec::ExecToLog '"$INSTDIR\bin\gpgconf" "--kill" "dirmngr"'
557     nsExec::ExecToLog '"$INSTDIR\bin\gpgconf" "--kill" "gpg-agent"'
558
559   no_gpgconf:
560
561   # Add the bin directory to the PATH
562   Push "$INSTDIR\bin"
563   Call AddToPath
564   DetailPrint "Added $INSTDIR\bin to PATH"
565 SectionEnd
566
567 LangString DESC_Menu_gnupg_readme ${LANG_ENGLISH} \
568    "General information on GnuPG"
569 LangString DESC_Menu_gnupg_readme ${LANG_GERMAN} \
570    "Allgemeine Informationen zu GnuPG"
571
572
573 Section "GnuPG" SEC_gnupg
574   SectionIn RO
575
576   SetOutPath "$INSTDIR\bin"
577   File "bin/gpg.exe"
578   File "bin/gpgv.exe"
579   File "bin/gpgsm.exe"
580   File "bin/gpgconf.exe"
581   File "bin/gpg-connect-agent.exe"
582   File "bin/gpgtar.exe"
583   File "libexec/gpg-preset-passphrase.exe"
584
585   ClearErrors
586   SetOverwrite try
587   File "bin/gpg-agent.exe"
588   SetOverwrite lastused
589   ifErrors 0 +3
590       File /oname=gpg-agent.exe.tmp "bin/gpg-agent.exe"
591       Rename /REBOOTOK gpg-agent.exe.tmp gpg-agent.exe
592
593   ClearErrors
594   SetOverwrite try
595   File "bin/dirmngr.exe"
596   SetOverwrite lastused
597   ifErrors 0 +3
598       File /oname=dirmngr.exe.tmp "bin/dirmngr.exe"
599       Rename /REBOOTOK dirmngr.exe.tmp dirmngr.exe
600
601   ClearErrors
602   SetOverwrite try
603   File "libexec/scdaemon.exe"
604   SetOverwrite lastused
605   ifErrors 0 +3
606       File /oname=scdaemon.exe.tmp "libexec/scdaemon.exe"
607       Rename /REBOOTOK scdaemon.exe.tmp scdaemon.exe
608
609   SetOutPath "$INSTDIR\share\gnupg"
610   File "share/gnupg/gpg-conf.skel"
611   File "share/gnupg/dirmngr-conf.skel"
612   File "share/gnupg/distsigkey.gpg"
613
614   SetOutPath "$INSTDIR\share\locale\ca\LC_MESSAGES"
615   File share/locale/ca/LC_MESSAGES/gnupg2.mo
616   SetOutPath "$INSTDIR\share\locale\cs\LC_MESSAGES"
617   File share/locale/cs/LC_MESSAGES/gnupg2.mo
618   SetOutPath "$INSTDIR\share\locale\da\LC_MESSAGES"
619   File share/locale/da/LC_MESSAGES/gnupg2.mo
620   SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
621   File share/locale/de/LC_MESSAGES/gnupg2.mo
622   SetOutPath "$INSTDIR\share\locale\el\LC_MESSAGES"
623   File share/locale/el/LC_MESSAGES/gnupg2.mo
624   SetOutPath "$INSTDIR\share\locale\en@boldquot\LC_MESSAGES"
625   File share/locale/en@boldquot/LC_MESSAGES/gnupg2.mo
626   SetOutPath "$INSTDIR\share\locale\en@quot\LC_MESSAGES"
627   File share/locale/en@quot/LC_MESSAGES/gnupg2.mo
628   SetOutPath "$INSTDIR\share\locale\eo\LC_MESSAGES"
629   File share/locale/eo/LC_MESSAGES/gnupg2.mo
630   SetOutPath "$INSTDIR\share\locale\es\LC_MESSAGES"
631   File share/locale/es/LC_MESSAGES/gnupg2.mo
632   SetOutPath "$INSTDIR\share\locale\et\LC_MESSAGES"
633   File share/locale/et/LC_MESSAGES/gnupg2.mo
634   SetOutPath "$INSTDIR\share\locale\fi\LC_MESSAGES"
635   File share/locale/fi/LC_MESSAGES/gnupg2.mo
636   SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
637   File share/locale/fr/LC_MESSAGES/gnupg2.mo
638   SetOutPath "$INSTDIR\share\locale\gl\LC_MESSAGES"
639   File share/locale/gl/LC_MESSAGES/gnupg2.mo
640   SetOutPath "$INSTDIR\share\locale\hu\LC_MESSAGES"
641   File share/locale/hu/LC_MESSAGES/gnupg2.mo
642   SetOutPath "$INSTDIR\share\locale\id\LC_MESSAGES"
643   File share/locale/id/LC_MESSAGES/gnupg2.mo
644   SetOutPath "$INSTDIR\share\locale\it\LC_MESSAGES"
645   File share/locale/it/LC_MESSAGES/gnupg2.mo
646   SetOutPath "$INSTDIR\share\locale\ja\LC_MESSAGES"
647   File share/locale/ja/LC_MESSAGES/gnupg2.mo
648   SetOutPath "$INSTDIR\share\locale\nb\LC_MESSAGES"
649   File share/locale/nb/LC_MESSAGES/gnupg2.mo
650   SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
651   File share/locale/pl/LC_MESSAGES/gnupg2.mo
652   SetOutPath "$INSTDIR\share\locale\pt\LC_MESSAGES"
653   File share/locale/pt/LC_MESSAGES/gnupg2.mo
654   SetOutPath "$INSTDIR\share\locale\ro\LC_MESSAGES"
655   File share/locale/ro/LC_MESSAGES/gnupg2.mo
656   SetOutPath "$INSTDIR\share\locale\ru\LC_MESSAGES"
657   File share/locale/ru/LC_MESSAGES/gnupg2.mo
658   SetOutPath "$INSTDIR\share\locale\sk\LC_MESSAGES"
659   File share/locale/sk/LC_MESSAGES/gnupg2.mo
660   SetOutPath "$INSTDIR\share\locale\sv\LC_MESSAGES"
661   File share/locale/sv/LC_MESSAGES/gnupg2.mo
662   SetOutPath "$INSTDIR\share\locale\tr\LC_MESSAGES"
663   File share/locale/tr/LC_MESSAGES/gnupg2.mo
664   SetOutPath "$INSTDIR\share\locale\uk\LC_MESSAGES"
665   File share/locale/uk/LC_MESSAGES/gnupg2.mo
666   SetOutPath "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
667   File share/locale/zh_CN/LC_MESSAGES/gnupg2.mo
668   SetOutPath "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
669   File share/locale/zh_TW/LC_MESSAGES/gnupg2.mo
670 SectionEnd
671
672
673 LangString DESC_SEC_gnupg ${LANG_ENGLISH} \
674    "The GnuPG Core is the actual encrypt core and a set of command \
675     line utilities."
676 LangString DESC_SEC_gnupg ${LANG_GERMAN} \
677    "Der GnuPG Core ist, wie der Name schon sagt, der Kernbestandteil \
678     dieser Software.  Der GnuPG Core stellt die eigentliche \
679     Verschlüsselung sowie die Verwaltung der Schlüssel bereit."
680
681 LangString DESC_Menu_gnupg_manual ${LANG_ENGLISH} \
682    "Show the manual for the GnuPG Core"
683 LangString DESC_Menu_gnupg_manual ${LANG_GERMAN} \
684    "Das Handbuch zum GnuPG Kern anzeigen"
685
686 Section "-libgpg-error" SEC_libgpg_error
687   SetOutPath "$INSTDIR\bin"
688   File bin/libgpg-error-0.dll
689   SetOutPath "$INSTDIR\lib"
690   File /oname=libgpg-error.imp lib/libgpg-error.dll.a
691   SetOutPath "$INSTDIR\include"
692   File include/gpg-error.h
693   SetOutPath "$INSTDIR\share\locale\cs\LC_MESSAGES"
694   File share/locale/cs/LC_MESSAGES/libgpg-error.mo
695   SetOutPath "$INSTDIR\share\locale\da\LC_MESSAGES"
696   File share/locale/da/LC_MESSAGES/libgpg-error.mo
697   SetOutPath "$INSTDIR\share\locale\de\LC_MESSAGES"
698   File share/locale/de/LC_MESSAGES/libgpg-error.mo
699   SetOutPath "$INSTDIR\share\locale\eo\LC_MESSAGES"
700   File share/locale/eo/LC_MESSAGES/libgpg-error.mo
701   SetOutPath "$INSTDIR\share\locale\fr\LC_MESSAGES"
702   File share/locale/fr/LC_MESSAGES/libgpg-error.mo
703   SetOutPath "$INSTDIR\share\locale\hu\LC_MESSAGES"
704   File share/locale/hu/LC_MESSAGES/libgpg-error.mo
705   SetOutPath "$INSTDIR\share\locale\it\LC_MESSAGES"
706   File share/locale/it/LC_MESSAGES/libgpg-error.mo
707   SetOutPath "$INSTDIR\share\locale\ja\LC_MESSAGES"
708   File share/locale/ja/LC_MESSAGES/libgpg-error.mo
709   SetOutPath "$INSTDIR\share\locale\nl\LC_MESSAGES"
710   File share/locale/nl/LC_MESSAGES/libgpg-error.mo
711   SetOutPath "$INSTDIR\share\locale\pl\LC_MESSAGES"
712   File share/locale/pl/LC_MESSAGES/libgpg-error.mo
713   SetOutPath "$INSTDIR\share\locale\pt\LC_MESSAGES"
714   File share/locale/pt/LC_MESSAGES/libgpg-error.mo
715   SetOutPath "$INSTDIR\share\locale\ro\LC_MESSAGES"
716   File share/locale/ro/LC_MESSAGES/libgpg-error.mo
717   SetOutPath "$INSTDIR\share\locale\ru\LC_MESSAGES"
718   File share/locale/ru/LC_MESSAGES/libgpg-error.mo
719   SetOutPath "$INSTDIR\share\locale\sr\LC_MESSAGES"
720   File share/locale/sr/LC_MESSAGES/libgpg-error.mo
721   SetOutPath "$INSTDIR\share\locale\sv\LC_MESSAGES"
722   File share/locale/sv/LC_MESSAGES/libgpg-error.mo
723   SetOutPath "$INSTDIR\share\locale\uk\LC_MESSAGES"
724   File share/locale/uk/LC_MESSAGES/libgpg-error.mo
725   SetOutPath "$INSTDIR\share\locale\vi\LC_MESSAGES"
726   File share/locale/vi/LC_MESSAGES/libgpg-error.mo
727   SetOutPath "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
728   File share/locale/zh_CN/LC_MESSAGES/libgpg-error.mo
729   SetOutPath "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
730   File share/locale/zh_TW/LC_MESSAGES/libgpg-error.mo
731 SectionEnd
732
733 Section "-zlib" SEC_zlib
734   SetOutPath "$INSTDIR\bin"
735   File bin/zlib1.dll
736 SectionEnd
737
738 Section "-adns" SEC_adns
739   SetOutPath "$INSTDIR\bin"
740   File bin/libadns-1.dll
741   SetOutPath "$INSTDIR\lib"
742   File /oname=libadns.imp lib/libadns.dll.a
743   SetOutPath "$INSTDIR\include"
744   File include/adns.h
745 SectionEnd
746
747 Section "-npth" SEC_npth
748   SetOutPath "$INSTDIR\bin"
749   File bin/libnpth-0.dll
750   SetOutPath "$INSTDIR\lib"
751   File /oname=libnpth.imp lib/libnpth.dll.a
752   SetOutPath "$INSTDIR\include"
753   File include/npth.h
754 SectionEnd
755
756 Section "-gcrypt" SEC_gcrypt
757   SetOutPath "$INSTDIR\bin"
758   File bin/libgcrypt-20.dll
759   SetOutPath "$INSTDIR\lib"
760   File /oname=libgcrypt.imp lib/libgcrypt.dll.a
761   SetOutPath "$INSTDIR\include"
762   File include/gcrypt.h
763 SectionEnd
764
765 Section "-assuan" SEC_assuan
766   SetOutPath "$INSTDIR\bin"
767   File bin/libassuan-0.dll
768   SetOutPath "$INSTDIR\lib"
769   File /oname=libassuan.imp lib/libassuan.dll.a
770   SetOutPath "$INSTDIR\include"
771   File include/assuan.h
772 SectionEnd
773
774 Section "-ksba" SEC_ksba
775   SetOutPath "$INSTDIR\bin"
776   File bin/libksba-8.dll
777   SetOutPath "$INSTDIR\lib"
778   File /oname=libksba.imp lib/libksba.dll.a
779   SetOutPath "$INSTDIR\include"
780   File include/ksba.h
781 SectionEnd
782
783 Section "-gpgme" SEC_gpgme
784   SetOutPath "$INSTDIR\bin"
785   File bin/libgpgme-11.dll
786   File /nonfatal bin/libgpgme-glib-11.dll
787   File libexec/gpgme-w32spawn.exe
788   SetOutPath "$INSTDIR\lib"
789   File /oname=libgpgme.imp      lib/libgpgme.dll.a
790   File /nonfatal /oname=libgpgme-glib.imp lib/libgpgme-glib.dll.a
791   SetOutPath "$INSTDIR\include"
792   File include/gpgme.h
793 SectionEnd
794
795 Section "-sqlite" SEC_sqlite
796   SetOutPath "$INSTDIR\bin"
797   File bin/libsqlite3-0.dll
798 SectionEnd
799
800 !ifdef WITH_GUI
801 Section "-libiconv" SEC_libiconv
802   SetOutPath "$INSTDIR\bin"
803   File bin/libiconv-2.dll
804 SectionEnd
805
806 Section "-gettext" SEC_gettext
807   SetOutPath "$INSTDIR\bin"
808   File bin/libintl-8.dll
809 SectionEnd
810
811 Section "-glib" SEC_glib
812   SetOutPath "$INSTDIR\bin"
813   File bin/libgio-2.0-0.dll
814   File bin/libglib-2.0-0.dll
815   File bin/libgmodule-2.0-0.dll
816   File bin/libgobject-2.0-0.dll
817   File bin/libgthread-2.0-0.dll
818   File bin/gspawn-win32-helper.exe
819   File bin/gspawn-win32-helper-console.exe
820
821   File bin/libffi-6.dll
822 SectionEnd
823
824 Section "-libpng" SEC_libpng
825   SetOutPath "$INSTDIR\bin"
826   File bin/libpng14-14.dll
827 SectionEnd
828
829 #Section "-jpeg" SEC_jpeg
830 #  SetOutPath "$INSTDIR"
831 #  File bin/jpeg62.dll
832 #SectionEnd
833
834 Section "-cairo" SEC_cairo
835   SetOutPath "$INSTDIR\bin"
836   File bin/libcairo-gobject-2.dll
837   File bin/libpangocairo-1.0-0.dll
838   File bin/libcairo-2.dll
839   File bin/libcairo-script-interpreter-2.dll
840 SectionEnd
841
842 Section "-pixman" SEC_pixman
843   SetOutPath "$INSTDIR\bin"
844   File bin/libpixman-1-0.dll
845 SectionEnd
846
847 Section "-pango" SEC_pango
848   SetOutPath "$INSTDIR\bin"
849   File bin/pango-querymodules.exe
850   File bin/libpango-1.0-0.dll
851   File bin/libpangowin32-1.0-0.dll
852
853   SetOutPath "$INSTDIR\lib\pango\1.6.0\modules"
854   File lib/pango/1.6.0/modules/pango-basic-win32.dll
855   File lib/pango/1.6.0/modules/pango-arabic-lang.dll
856   File lib/pango/1.6.0/modules/pango-indic-lang.dll
857
858   SetOutPath "$INSTDIR\etc\pango"
859   File ${W32_SRCDIR}/pango.modules
860 SectionEnd
861
862 Section "-atk" SEC_atk
863   SetOutPath "$INSTDIR\bin"
864   File bin/libatk-1.0-0.dll
865 SectionEnd
866
867 Section "-gtk+" SEC_gtk_
868   SetOutPath "$INSTDIR\bin"
869   File bin/libgdk_pixbuf-2.0-0.dll
870   File bin/libgdk-win32-2.0-0.dll
871   File bin/libgtk-win32-2.0-0.dll
872
873   SetOutPath "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0"
874   File /oname=loaders.cache ${W32_SRCDIR}/gdk-pixbuf-loaders.cache
875   SetOutPath "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders"
876   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.dll
877   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-bmp.dll
878   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-emf.dll
879   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-gif.dll
880   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-ico.dll
881   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-jpeg.dll
882   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-tiff.dll
883   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-wmf.dll
884   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.dll
885   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pcx.dll
886   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.dll
887   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.dll
888   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.dll
889   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ras.dll
890   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tga.dll
891   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll
892   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xbm.dll
893   File lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.dll
894
895   SetOutPath "$INSTDIR\lib\gtk-2.0\2.10.0\engines"
896   File lib/gtk-2.0/2.10.0/engines/libwimp.dll
897   File lib/gtk-2.0/2.10.0/engines/libpixmap.dll
898
899   SetOutPath "$INSTDIR\lib\gtk-2.0\2.10.0\immodules"
900   File lib/gtk-2.0/2.10.0/immodules/im-thai.dll
901   File lib/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.dll
902   File lib/gtk-2.0/2.10.0/immodules/im-multipress.dll
903   File lib/gtk-2.0/2.10.0/immodules/im-ti-er.dll
904   File lib/gtk-2.0/2.10.0/immodules/im-am-et.dll
905   File lib/gtk-2.0/2.10.0/immodules/im-cedilla.dll
906   File lib/gtk-2.0/2.10.0/immodules/im-inuktitut.dll
907   File lib/gtk-2.0/2.10.0/immodules/im-viqr.dll
908   File lib/gtk-2.0/2.10.0/immodules/im-ti-et.dll
909   File lib/gtk-2.0/2.10.0/immodules/im-ipa.dll
910   File lib/gtk-2.0/2.10.0/immodules/im-ime.dll
911
912   SetOutPath "$INSTDIR\share\themes\Default\gtk-2.0-key"
913   File share/themes/Default/gtk-2.0-key/gtkrc
914
915   SetOutPath "$INSTDIR\share\themes\MS-Windows\gtk-2.0"
916   File share/themes/MS-Windows/gtk-2.0/gtkrc
917
918   SetOutPath "$INSTDIR\etc\gtk-2.0"
919   File etc/gtk-2.0/im-multipress.conf
920 SectionEnd
921 !endif
922
923 Section "-pinentry" SEC_pinentry
924   SetOutPath "$INSTDIR\bin"
925   File /oname=pinentry-basic.exe "bin/pinentry-w32.exe"
926 SectionEnd
927
928 !ifdef WITH_GUI
929 Section "gpa" SEC_gpa
930   SectionIn RO
931   SetOutPath "$INSTDIR\bin"
932   File bin/gpa.exe
933   File bin/launch-gpa.exe
934 SectionEnd
935
936 LangString DESC_SEC_gpa ${LANG_ENGLISH} \
937    "The GnuPG Assistant is the graphical interface of GnuPG"
938 LangString DESC_SEC_gpa ${LANG_GERMAN} \
939    "Der GnuPG Assistent ist die graphische Oberfläche von GnuPG."
940
941 LangString DESC_Menu_gpa ${LANG_ENGLISH} \
942    "Run the GnuGP Assistant."
943 LangString DESC_Menu_gpa ${LANG_GERMAN} \
944    "Den GnuPG Assistenten starten."
945
946 Section "gpgex" SEC_gpgex
947   SetOutPath "$INSTDIR\bin"
948
949   ClearErrors
950   SetOverwrite try
951   File bin/gpgex.dll
952   SetOverwrite lastused
953   ifErrors 0 do_reg
954       File /oname=gpgex.dll.tmp bin/gpgex.dll
955       Rename /REBOOTOK gpgex.dll.tmp gpgex.dll
956
957  do_reg:
958   ClearErrors
959   RegDLL "$INSTDIR\bin\gpgex.dll"
960   ifErrors 0 +2
961      MessageBox MB_OK "$(T_GPGEX_RegFailed)"
962
963 ${If} ${RunningX64}
964   # Install the 64 bit version of the plugin.
965   # Note that we install this in addition to the 32 bit version so that
966   # the 32 bit version can be used by file dialogs of 32 bit programs.
967   ClearErrors
968   SetOverwrite try
969   File /oname=gpgex6.dll "${INST6_DIR}/bin/gpgex.dll"
970   SetOverwrite lastused
971   ifErrors 0 do_reg64
972       File /oname=gpgex6.dll.tmp "${INST6_DIR}/bin/gpgex.dll"
973       Rename /REBOOTOK gpgex6.dll.tmp gpgex6.dll
974
975  do_reg64:
976   # Register the DLL. We need to register both versions.  However
977   # RegDLL can't be used for 64 bit and InstallLib seems to be a
978   # registry hack.
979   ClearErrors
980   nsExec::ExecToLog '"$SYSDIR\regsvr32" "/s" "$INSTDIR\bin\gpgex6.dll"'
981   ifErrors 0 +2
982      MessageBox MB_OK "$(T_GPGEX_RegFailed) (64 bit)"
983
984   # Note: There is no need to install the help an mo files because
985   # they are identical to those installed by the 32 bit version.
986 ${EndIf}
987 SectionEnd
988
989 LangString T_GPGEX_RegFailed ${LANG_ENGLISH} \
990    "Warning: Registration of the Explorer plugin failed."
991
992 LangString DESC_SEC_gpgex ${LANG_ENGLISH} \
993    "GnuPG Explorer Extension"
994
995 !endif
996
997
998 Section "-gnupglast" SEC_gnupglast
999   SetOutPath "$INSTDIR"
1000 SectionEnd
1001
1002
1003 #
1004 # Define the uninstaller sections.
1005 #
1006 # (reverse order of the installer sections!)
1007 #
1008
1009 Section "-un.gnupglast"
1010   ifFileExists "$INSTDIR\bin\launch-gpa.exe"  0 no_uiserver
1011     nsExec::ExecToLog '"$INSTDIR\bin\launch-gpa" "--stop-server"'
1012   no_uiserver:
1013   ifFileExists "$INSTDIR\bin\gpgconf.exe"  0 no_gpgconf
1014     nsExec::ExecToLog '"$INSTDIR\bin\gpgconf" "--kill" "gpg-agent"'
1015     nsExec::ExecToLog '"$INSTDIR\bin\gpgconf" "--kill" "dirmngr"'
1016   no_gpgconf:
1017 SectionEnd
1018
1019 Section "-un.gpgex"
1020   UnRegDLL "$INSTDIR\bin\gpgex.dll"
1021
1022   Delete /REBOOTOK "$INSTDIR\bin\gpgex.dll"
1023
1024 ${If} ${RunningX64}
1025   nsExec::ExecToLog '"$SYSDIR\regsvr32" "/u" "/s" "$INSTDIR\bin\gpgex6.dll"'
1026   Delete /REBOOTOK "$INSTDIR\bin\gpgex6.dll"
1027 ${EndIf}
1028 SectionEnd
1029
1030 !ifdef WITH_GUI
1031 Section "-un.gpa"
1032   Delete "$INSTDIR\bin\gpa.exe"
1033   Delete "$INSTDIR\bin\launch-gpa.exe"
1034
1035   RMDir "$INSTDIR\share\gpa"
1036 SectionEnd
1037 !endif
1038
1039 Section "-un.pinentry"
1040   Delete "$INSTDIR\bin\pinentry-basic.exe"
1041 SectionEnd
1042
1043 !ifdef WITH_GUI
1044 Section "-un.gtk+"
1045   Delete "$INSTDIR\bin\libgdk_pixbuf-2.0-0.dll"
1046   Delete "$INSTDIR\bin\libgdk-win32-2.0-0.dll"
1047   Delete "$INSTDIR\bin\libgtk-win32-2.0-0.dll"
1048
1049   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache"
1050
1051   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-ani.dll"
1052   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-bmp.dll"
1053   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-emf.dll"
1054   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-gif.dll"
1055   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-ico.dll"
1056   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-jpeg.dll"
1057   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-tiff.dll"
1058   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-gdip-wmf.dll"
1059   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-icns.dll"
1060   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-pcx.dll"
1061   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-png.dll"
1062   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-pnm.dll"
1063   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-qtif.dll"
1064   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-ras.dll"
1065   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-tga.dll"
1066   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-wbmp.dll"
1067   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-xbm.dll"
1068   Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-xpm.dll"
1069   RMDir  "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders"
1070   RMDir  "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0"
1071   RMDir  "$INSTDIR\lib\gdk-pixbuf-2.0"
1072
1073   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libwimp.dll"
1074   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\libpixmap.dll"
1075   RMDir  "$INSTDIR\lib\gtk-2.0\2.10.0\engines"
1076
1077   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-thai.dll"
1078   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-cyrillic-translit.dll"
1079   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-multipress.dll"
1080   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-ti-er.dll"
1081   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-am-et.dll"
1082   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-cedilla.dll"
1083   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-inuktitut.dll"
1084   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-viqr.dll"
1085   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-ti-et.dll"
1086   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-ipa.dll"
1087   Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\im-ime.dll"
1088   RMDir  "$INSTDIR\lib\gtk-2.0\2.10.0\immodules"
1089
1090   RMDir  "$INSTDIR\lib\gtk-2.0\2.10.0"
1091   RMDir  "$INSTDIR\lib\gtk-2.0"
1092
1093   Delete "$INSTDIR\share\themes\Default\gtk-2.0-key\gtkrc"
1094   RMDir  "$INSTDIR\share\themes\Default\gtk-2.0-key"
1095   RMDir  "$INSTDIR\share\themes\Default"
1096
1097   Delete "$INSTDIR\share\themes\MS-Windows\gtk-2.0\gtkrc"
1098   RMDir  "$INSTDIR\share\themes\MS-Windows\gtk-2.0"
1099   RMDir  "$INSTDIR\share\themes\MS-Windows"
1100
1101   RMDir  "$INSTDIR\share\themes"
1102
1103   Delete "$INSTDIR\etc\gtk-2.0\im-multipress.conf"
1104   RMDir  "$INSTDIR\etc\gtk-2.0"
1105 SectionEnd
1106
1107 Section "-un.atk"
1108   Delete "$INSTDIR\bin\libatk-1.0-0.dll"
1109 SectionEnd
1110
1111 Section "-un.pango"
1112   Delete "$INSTDIR\bin\pango-querymodules.exe"
1113   Delete "$INSTDIR\bin\libpango-1.0-0.dll"
1114   Delete "$INSTDIR\bin\libpangowin32-1.0-0.dll"
1115
1116   Delete "$INSTDIR\lib\pango\1.6.0\modules\pango-basic-win32.dll"
1117   Delete "$INSTDIR\lib\pango\1.6.0\modules\pango-arabic-lang.dll"
1118   Delete "$INSTDIR\lib\pango\1.6.0\modules\pango-indic-lang.dll"
1119   RMDir  "$INSTDIR\lib\pango\1.6.0\modules"
1120   RMDir  "$INSTDIR\lib\pango\1.6.0"
1121   RMDir  "$INSTDIR\lib\pango"
1122
1123   Delete "$INSTDIR\etc\pango\pango.modules"
1124   RMDir  "$INSTDIR\etc\pango"
1125 SectionEnd
1126
1127 Section "-un.pixman"
1128   Delete "$INSTDIR\bin\libpixman-1-0.dll"
1129 SectionEnd
1130
1131 Section "-un.cairo"
1132   Delete "$INSTDIR\bin\libcairo-gobject-2.dll"
1133   Delete "$INSTDIR\bin\libpangocairo-1.0-0.dll"
1134   Delete "$INSTDIR\bin\libcairo-2.dll"
1135   Delete "$INSTDIR\bin\libcairo-script-interpreter-2.dll"
1136 SectionEnd
1137
1138 Section "-un.libpng"
1139   Delete "$INSTDIR\bin\libpng14-14.dll"
1140 SectionEnd
1141
1142 Section "-un.glib"
1143   Delete "$INSTDIR\bin\libgio-2.0-0.dll"
1144   Delete "$INSTDIR\bin\libglib-2.0-0.dll"
1145   Delete "$INSTDIR\bin\libgmodule-2.0-0.dll"
1146   Delete "$INSTDIR\bin\libgobject-2.0-0.dll"
1147   Delete "$INSTDIR\bin\libgthread-2.0-0.dll"
1148   Delete "$INSTDIR\bin\gspawn-win32-helper.exe"
1149   Delete "$INSTDIR\bin\gspawn-win32-helper-console.exe"
1150   Delete "$INSTDIR\bin\libffi-6.dll"
1151 SectionEnd
1152 !endif
1153
1154
1155 Section "-un.gettext"
1156   Delete "$INSTDIR\bin\libintl-8.dll"
1157 SectionEnd
1158
1159 Section "-un.libiconv"
1160   Delete "$INSTDIR\bin\libiconv-2.dll"
1161 SectionEnd
1162
1163 Section "-un.gpgme"
1164   Delete "$INSTDIR\bin\libgpgme-11.dll"
1165   Delete "$INSTDIR\bin\libgpgme-glib-11.dll"
1166   Delete "$INSTDIR\bin\gpgme-w32spawn.exe"
1167   Delete "$INSTDIR\lib\libgpgme.imp"
1168   Delete "$INSTDIR\lib\libgpgme-glib.imp"
1169   Delete "$INSTDIR\include\gpgme.h"
1170 SectionEnd
1171
1172 Section "-un.ksba"
1173   Delete "$INSTDIR\bin\libksba-8.dll"
1174   Delete "$INSTDIR\lib\libksba.imp"
1175   Delete "$INSTDIR\include\ksba.h"
1176 SectionEnd
1177
1178 Section "-un.assuan"
1179   Delete "$INSTDIR\bin\libassuan-0.dll"
1180   Delete "$INSTDIR\lib\libassuan.imp"
1181   Delete "$INSTDIR\include\assuan.h"
1182 SectionEnd
1183
1184 Section "-un.gcrypt"
1185   Delete "$INSTDIR\bin\libgcrypt-20.dll"
1186   Delete "$INSTDIR\lib\libgcrypt.imp"
1187   Delete "$INSTDIR\include\gcrypt.h"
1188 SectionEnd
1189
1190 Section "-un.npth"
1191   Delete "$INSTDIR\bin\libnpth-0.dll"
1192   Delete "$INSTDIR\lib\libnpth.imp"
1193   Delete "$INSTDIR\include\npth.h"
1194 SectionEnd
1195
1196 Section "-un.adns"
1197   Delete "$INSTDIR\bin\libadns-1.dll"
1198   Delete "$INSTDIR\lib\libadns.imp"
1199   Delete "$INSTDIR\include\adns.h"
1200 SectionEnd
1201
1202 Section "-un.zlib"
1203   Delete "$INSTDIR\bin\zlib1.dll"
1204 SectionEnd
1205
1206 Section "-un.libgpg-error"
1207   Delete "$INSTDIR\bin\libgpg-error-0.dll"
1208   Delete "$INSTDIR\lib\libgpg-error.imp"
1209   Delete "$INSTDIR\include\gpg-error.h"
1210   Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\libgpg-error.mo"
1211   RMDir "$INSTDIR\share\locale\cs\LC_MESSAGES"
1212   RMDir "$INSTDIR\share\locale\cs"
1213   Delete "$INSTDIR\share\locale\da\LC_MESSAGES\libgpg-error.mo"
1214   RMDir "$INSTDIR\share\locale\da\LC_MESSAGES"
1215   RMDir "$INSTDIR\share\locale\da"
1216   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\libgpg-error.mo"
1217   RMDir "$INSTDIR\share\locale\de\LC_MESSAGES"
1218   RMDir "$INSTDIR\share\locale\de"
1219   Delete "$INSTDIR\share\locale\eo\LC_MESSAGES\libgpg-error.mo"
1220   RMDir "$INSTDIR\share\locale\eo\LC_MESSAGES"
1221   RMDir "$INSTDIR\share\locale\eo"
1222   Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\libgpg-error.mo"
1223   RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES"
1224   RMDir "$INSTDIR\share\locale\fr"
1225   Delete "$INSTDIR\share\locale\hu\LC_MESSAGES\libgpg-error.mo"
1226   RMDir "$INSTDIR\share\locale\hu\LC_MESSAGES"
1227   RMDir "$INSTDIR\share\locale\hu"
1228   Delete "$INSTDIR\share\locale\it\LC_MESSAGES\libgpg-error.mo"
1229   RMDir "$INSTDIR\share\locale\it\LC_MESSAGES"
1230   RMDir "$INSTDIR\share\locale\it"
1231   Delete "$INSTDIR\share\locale\ja\LC_MESSAGES\libgpg-error.mo"
1232   RMDir "$INSTDIR\share\locale\ja\LC_MESSAGES"
1233   RMDir "$INSTDIR\share\locale\ja"
1234   Delete "$INSTDIR\share\locale\nl\LC_MESSAGES\libgpg-error.mo"
1235   RMDir "$INSTDIR\share\locale\nl\LC_MESSAGES"
1236   RMDir "$INSTDIR\share\locale\nl"
1237   Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\libgpg-error.mo"
1238   RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES"
1239   RMDir "$INSTDIR\share\locale\pl"
1240   Delete "$INSTDIR\share\locale\pt\LC_MESSAGES\libgpg-error.mo"
1241   RMDir "$INSTDIR\share\locale\pt\LC_MESSAGES"
1242   RMDir "$INSTDIR\share\locale\pt"
1243   Delete "$INSTDIR\share\locale\ro\LC_MESSAGES\libgpg-error.mo"
1244   RMDir "$INSTDIR\share\locale\ro\LC_MESSAGES"
1245   RMDir "$INSTDIR\share\locale\ro"
1246   Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\libgpg-error.mo"
1247   RMDir "$INSTDIR\share\locale\ru\LC_MESSAGES"
1248   RMDir "$INSTDIR\share\locale\ru"
1249   Delete "$INSTDIR\share\locale\sr\LC_MESSAGES\libgpg-error.mo"
1250   RMDir "$INSTDIR\share\locale\sr\LC_MESSAGES"
1251   RMDir "$INSTDIR\share\locale\sr"
1252   Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\libgpg-error.mo"
1253   RMDir "$INSTDIR\share\locale\sv\LC_MESSAGES"
1254   RMDir "$INSTDIR\share\locale\sv"
1255   Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\libgpg-error.mo"
1256   RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES"
1257   RMDir "$INSTDIR\share\locale\uk"
1258   Delete "$INSTDIR\share\locale\vi\LC_MESSAGES\libgpg-error.mo"
1259   RMDir "$INSTDIR\share\locale\vi\LC_MESSAGES"
1260   RMDir "$INSTDIR\share\locale\vi"
1261   Delete "$INSTDIR\share\locale\zh_CN\LC_MESSAGES\libgpg-error.mo"
1262   RMDir "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
1263   RMDir "$INSTDIR\share\locale\zh_CN"
1264   Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\libgpg-error.mo"
1265   RMDir "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
1266   RMDir "$INSTDIR\share\locale\zh_TW"
1267   RMDir "$INSTDIR\share\locale"
1268 SectionEnd
1269
1270 Section "-un.gnupg"
1271   Delete "$INSTDIR\bin\gpg.exe"
1272   Delete "$INSTDIR\bin\gpgv.exe"
1273   Delete "$INSTDIR\bin\gpgsm.exe"
1274   Delete "$INSTDIR\bin\gpg-agent.exe"
1275   Delete "$INSTDIR\bin\scdaemon.exe"
1276   Delete "$INSTDIR\bin\dirmngr.exe"
1277   Delete "$INSTDIR\bin\gpgconf.exe"
1278   Delete "$INSTDIR\bin\gpg-connect-agent.exe"
1279   Delete "$INSTDIR\bin\gpgtar.exe"
1280   Delete "$INSTDIR\bin\gpg-preset-passphrase.exe"
1281
1282   Delete "$INSTDIR\share\gnupg\dirmngr-conf.skel"
1283   Delete "$INSTDIR\share\gnupg\distsigkey.gpg"
1284   Delete "$INSTDIR\share\gnupg\gpg-conf.skel"
1285   RMDir  "$INSTDIR\share\gnupg"
1286
1287   Delete "$INSTDIR\share\locale\ca\LC_MESSAGES\gnupg2.mo"
1288   RMDir "$INSTDIR\share\locale\ca\LC_MESSAGES"
1289   RMDir "$INSTDIR\share\locale\ca"
1290   Delete "$INSTDIR\share\locale\cs\LC_MESSAGES\gnupg2.mo"
1291   RMDir "$INSTDIR\share\locale\cs\LC_MESSAGES"
1292   RMDir "$INSTDIR\share\locale\cs"
1293   Delete "$INSTDIR\share\locale\da\LC_MESSAGES\gnupg2.mo"
1294   RMDir "$INSTDIR\share\locale\da\LC_MESSAGES"
1295   RMDir "$INSTDIR\share\locale\da"
1296   Delete "$INSTDIR\share\locale\de\LC_MESSAGES\gnupg2.mo"
1297   RMDir "$INSTDIR\share\locale\de\LC_MESSAGES"
1298   RMDir "$INSTDIR\share\locale\de"
1299   Delete "$INSTDIR\share\locale\el\LC_MESSAGES\gnupg2.mo"
1300   RMDir "$INSTDIR\share\locale\el\LC_MESSAGES"
1301   RMDir "$INSTDIR\share\locale\el"
1302   Delete "$INSTDIR\share\locale\en@boldquot\LC_MESSAGES\gnupg2.mo"
1303   RMDir "$INSTDIR\share\locale\en@boldquot\LC_MESSAGES"
1304   RMDir "$INSTDIR\share\locale\en@boldquot"
1305   Delete "$INSTDIR\share\locale\en@quot\LC_MESSAGES\gnupg2.mo"
1306   RMDir "$INSTDIR\share\locale\en@quot\LC_MESSAGES"
1307   RMDir "$INSTDIR\share\locale\en@quot"
1308   Delete "$INSTDIR\share\locale\eo\LC_MESSAGES\gnupg2.mo"
1309   RMDir "$INSTDIR\share\locale\eo\LC_MESSAGES"
1310   RMDir "$INSTDIR\share\locale\eo"
1311   Delete "$INSTDIR\share\locale\es\LC_MESSAGES\gnupg2.mo"
1312   RMDir "$INSTDIR\share\locale\es\LC_MESSAGES"
1313   RMDir "$INSTDIR\share\locale\es"
1314   Delete "$INSTDIR\share\locale\et\LC_MESSAGES\gnupg2.mo"
1315   RMDir "$INSTDIR\share\locale\et\LC_MESSAGES"
1316   RMDir "$INSTDIR\share\locale\et"
1317   Delete "$INSTDIR\share\locale\fi\LC_MESSAGES\gnupg2.mo"
1318   RMDir "$INSTDIR\share\locale\fi\LC_MESSAGES"
1319   RMDir "$INSTDIR\share\locale\fi"
1320   Delete "$INSTDIR\share\locale\fr\LC_MESSAGES\gnupg2.mo"
1321   RMDir "$INSTDIR\share\locale\fr\LC_MESSAGES"
1322   RMDir "$INSTDIR\share\locale\fr"
1323   Delete "$INSTDIR\share\locale\gl\LC_MESSAGES\gnupg2.mo"
1324   RMDir "$INSTDIR\share\locale\gl\LC_MESSAGES"
1325   RMDir "$INSTDIR\share\locale\gl"
1326   Delete "$INSTDIR\share\locale\hu\LC_MESSAGES\gnupg2.mo"
1327   RMDir "$INSTDIR\share\locale\hu\LC_MESSAGES"
1328   RMDir "$INSTDIR\share\locale\hu"
1329   Delete "$INSTDIR\share\locale\id\LC_MESSAGES\gnupg2.mo"
1330   RMDir "$INSTDIR\share\locale\id\LC_MESSAGES"
1331   RMDir "$INSTDIR\share\locale\id"
1332   Delete "$INSTDIR\share\locale\it\LC_MESSAGES\gnupg2.mo"
1333   RMDir "$INSTDIR\share\locale\it\LC_MESSAGES"
1334   RMDir "$INSTDIR\share\locale\it"
1335   Delete "$INSTDIR\share\locale\ja\LC_MESSAGES\gnupg2.mo"
1336   RMDir "$INSTDIR\share\locale\ja\LC_MESSAGES"
1337   RMDir "$INSTDIR\share\locale\ja"
1338   Delete "$INSTDIR\share\locale\nb\LC_MESSAGES\gnupg2.mo"
1339   RMDir "$INSTDIR\share\locale\nb\LC_MESSAGES"
1340   RMDir "$INSTDIR\share\locale\nb"
1341   Delete "$INSTDIR\share\locale\pl\LC_MESSAGES\gnupg2.mo"
1342   RMDir "$INSTDIR\share\locale\pl\LC_MESSAGES"
1343   RMDir "$INSTDIR\share\locale\pl"
1344   Delete "$INSTDIR\share\locale\pt\LC_MESSAGES\gnupg2.mo"
1345   RMDir "$INSTDIR\share\locale\pt\LC_MESSAGES"
1346   RMDir "$INSTDIR\share\locale\pt"
1347   Delete "$INSTDIR\share\locale\ro\LC_MESSAGES\gnupg2.mo"
1348   RMDir "$INSTDIR\share\locale\ro\LC_MESSAGES"
1349   RMDir "$INSTDIR\share\locale\ro"
1350   Delete "$INSTDIR\share\locale\ru\LC_MESSAGES\gnupg2.mo"
1351   RMDir "$INSTDIR\share\locale\ru\LC_MESSAGES"
1352   RMDir "$INSTDIR\share\locale\ru"
1353   Delete "$INSTDIR\share\locale\sk\LC_MESSAGES\gnupg2.mo"
1354   RMDir "$INSTDIR\share\locale\sk\LC_MESSAGES"
1355   RMDir "$INSTDIR\share\locale\sk"
1356   Delete "$INSTDIR\share\locale\sv\LC_MESSAGES\gnupg2.mo"
1357   RMDir "$INSTDIR\share\locale\sv\LC_MESSAGES"
1358   RMDir "$INSTDIR\share\locale\sv"
1359   Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\gnupg2.mo"
1360   RMDir "$INSTDIR\share\locale\tr\LC_MESSAGES"
1361   RMDir "$INSTDIR\share\locale\tr"
1362   Delete "$INSTDIR\share\locale\uk\LC_MESSAGES\gnupg2.mo"
1363   RMDir "$INSTDIR\share\locale\uk\LC_MESSAGES"
1364   RMDir "$INSTDIR\share\locale\uk"
1365   Delete "$INSTDIR\share\locale\zh_CN\LC_MESSAGES\gnupg2.mo"
1366   RMDir "$INSTDIR\share\locale\zh_CN\LC_MESSAGES"
1367   RMDir "$INSTDIR\share\locale\zh_CN"
1368   Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\gnupg2.mo"
1369   RMDir "$INSTDIR\share\locale\zh_TW\LC_MESSAGES"
1370   RMDir "$INSTDIR\share\locale\zh_TW"
1371   RMDir "$INSTDIR\share\locale"
1372 SectionEnd
1373
1374 Section "-un.sqlite"
1375   Delete "$INSTDIR\bin\libsqlite3-0.dll"
1376 SectionEnd
1377
1378 Section "-un.gnupginst"
1379   # Delete standard stuff.
1380   Delete "$INSTDIR\README.txt"
1381
1382   Delete "$INSTDIR\VERSION"
1383
1384   # Remove the bin directory from the PATH
1385   Push "$INSTDIR\bin"
1386   Call un.RemoveFromPath
1387
1388   # Try to remove the top level directories.
1389   RMDir "$INSTDIR\bin"
1390   RMDir "$INSTDIR\lib"
1391   RMDir "$INSTDIR\include"
1392   RMDir "$INSTDIR\share"
1393   RMDir "$INSTDIR\etc"
1394   RMDir "$INSTDIR"
1395
1396   # Clean the registry.
1397   DeleteRegValue HKLM "Software\GNU\GnuPG" "Install Directory"
1398 SectionEnd
1399
1400
1401 Function .onInit
1402   ;;!define MUI_LANGDLL_ALWAYSSHOW
1403   !insertmacro MUI_LANGDLL_DISPLAY
1404
1405   Call G4wRunOnce
1406
1407   SetOutPath $TEMP
1408 #!ifdef SOURCES
1409 #  File /oname=gpgspltmp.bmp "${TOP_SRCDIR}/doc/logo/gnupg-logo-400px.bmp"
1410 #  # We play the tune only for the soruce installer
1411 #  File /oname=gpgspltmp.wav "${TOP_SRCDIR}/src/gnupg-splash.wav"
1412 #  g4wihelp::playsound $TEMP\gpgspltmp.wav
1413 #  g4wihelp::showsplash 2500 $TEMP\gpgspltmp.bmp
1414
1415 #  Delete $TEMP\gpgspltmp.bmp
1416 #  # Note that we delete gpgspltmp.wav in .onInst{Failed,Success}
1417 #!endif
1418
1419   # We can't use TOP_SRCDIR dir as the name of the file needs to be
1420   # the same while building and running the installer.  Thus we
1421   # generate the file from a template.
1422   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "${W32_SRCDIR}/inst-options.ini"
1423
1424   #Call CalcDepends
1425 FunctionEnd
1426
1427
1428 #Function .onInstFailed
1429 #  Delete $TEMP\gpgspltmp.wav
1430 #FunctionEnd
1431
1432 #Function .onInstSuccess
1433 #  Delete $TEMP\gpgspltmp.wav
1434 #FunctionEnd
1435
1436 #Function .onSelChange
1437 #  Call CalcDepends
1438 #FunctionEnd
1439
1440
1441 # This must be in a central place.  Urgs.
1442
1443 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1444 !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gnupg} $(DESC_SEC_gnupg)
1445 !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpa}   $(DESC_SEC_gpa)
1446 !insertmacro MUI_DESCRIPTION_TEXT ${SEC_gpgex} $(DESC_SEC_gpgex)
1447 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1448
1449
1450 # This also must be in a central place.  Also Urgs.
1451
1452 !ifdef WITH_GUI
1453 Section "-startmenu"
1454
1455 !ifdef HAVE_STARTMENU
1456   # Make sure that the context of the automatic variables has been set to
1457   # the "all users" shell folder.  This guarantees that the menu gets written
1458   # for all users.  We have already checked that we are running as Admin; or
1459   # we printed a warning that installation will not succeed.
1460   SetShellVarContext all
1461
1462   # Check if the start menu entries where requested.
1463   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "${W32_SRCDIR}/inst-options.ini" \
1464         "Field 2" "State"
1465   IntCmp $R0 0 no_start_menu
1466
1467 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
1468     CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
1469
1470     SectionGetFlags ${SEC_gpa} $R0
1471     IntOp $R0 $R0 & ${SF_SELECTED}
1472     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_menu
1473     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GPA.lnk" \
1474         "$INSTDIR\bin\launch-gpa.exe" \
1475         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
1476   no_gpa_menu:
1477
1478
1479     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG Manual.lnk" \
1480                    "$INSTDIR\share\gnupg\gnupg.html" \
1481                    "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_manual)
1482
1483     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG README.lnk" \
1484                    "$INSTDIR\README.txt" \
1485                    "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gnupg_readme)
1486
1487 !insertmacro MUI_STARTMENU_WRITE_END
1488
1489
1490
1491 no_start_menu:
1492
1493
1494   # Check if the desktop entries where requested.
1495   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "${W32_SRCDIR}/inst-options.ini" \
1496         "Field 3" "State"
1497   IntCmp $R0 0 no_desktop
1498
1499     SectionGetFlags ${SEC_gpa} $R0
1500     IntOp $R0 $R0 & ${SF_SELECTED}
1501     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_desktop
1502     CreateShortCut "$DESKTOP\GPA.lnk" \
1503         "$INSTDIR\bin\launch-gpa.exe" \
1504         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
1505   no_gpa_desktop:
1506
1507
1508     CreateShortCut "$DESKTOP\GPA Manual.lnk" \
1509                    "$INSTDIR\share\gpa\gpa.html" \
1510                    "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa_manual)
1511
1512 no_desktop:
1513
1514
1515   # Check if the quick launch bar entries where requested.
1516   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "${W32_SRCDIR}/inst-options.ini" \
1517         "Field 4" "State"
1518   IntCmp $R0 0 no_quick_launch
1519   StrCmp $QUICKLAUNCH $TEMP no_quick_launch
1520
1521     SectionGetFlags ${SEC_gpa} $R0
1522     IntOp $R0 $R0 & ${SF_SELECTED}
1523     IntCmp $R0 ${SF_SELECTED} 0 no_gpa_quicklaunch
1524     CreateShortCut "$QUICKLAUNCH\GPA.lnk" \
1525         "$INSTDIR\bin\launch-gpa.exe" \
1526         "" "" "" SW_SHOWNORMAL "" $(DESC_Menu_gpa)
1527 no_gpa_quicklaunch:
1528
1529
1530 no_quick_launch:
1531
1532
1533 !endif
1534 SectionEnd
1535 !endif
1536
1537
1538 #
1539 # Now for the generic parts to end the installation.
1540 #
1541 Var MYTMP
1542
1543 # Last section is a hidden one.
1544 Section
1545   WriteUninstaller "$INSTDIR\gnupg-uninstall.exe"
1546
1547   # Windows Add/Remove Programs support
1548   StrCpy $MYTMP "Software\Microsoft\Windows\CurrentVersion\Uninstall\GnuPG"
1549   WriteRegExpandStr HKLM $MYTMP "UninstallString" '"$INSTDIR\gnupg-uninstall.exe"'
1550   WriteRegExpandStr HKLM $MYTMP "InstallLocation" "$INSTDIR"
1551   WriteRegStr       HKLM $MYTMP "DisplayName"     "${PRETTY_PACKAGE}"
1552 !ifdef WITH_GUI
1553   WriteRegStr       HKLM $MYTMP "DisplayIcon"     "$INSTDIR\bin\gpa.exe,0"
1554 !endif
1555   WriteRegStr       HKLM $MYTMP "DisplayVersion"  "${VERSION}"
1556   WriteRegStr       HKLM $MYTMP "Publisher"       "The GnuPG Project"
1557   WriteRegStr       HKLM $MYTMP "URLInfoAbout"    "https://gnupg.org"
1558   WriteRegDWORD     HKLM $MYTMP "NoModify"        "1"
1559   WriteRegDWORD     HKLM $MYTMP "NoRepair"        "1"
1560 SectionEnd
1561
1562
1563 Section Uninstall
1564
1565 !ifdef WITH_GUI
1566 !ifdef HAVE_STARTMENU
1567   # Make sure that the context of the automatic variables has been set to
1568   # the "all users" shell folder.  This guarantees that the menu gets written
1569   # for all users.  We have already checked that we are running as Admin; or
1570   # we printed a warning that installation will not succeed.
1571   SetShellVarContext all
1572
1573   #---------------------------------------------------
1574   # Delete the menu entries and any empty parent menus
1575   #---------------------------------------------------
1576   !insertmacro MUI_STARTMENU_GETFOLDER Application $MYTMP
1577   Delete "$SMPROGRAMS\$MYTMP\GPA.lnk"
1578   Delete "$SMPROGRAMS\$MYTMP\GnuPG Manual.lnk"
1579   Delete "$SMPROGRAMS\$MYTMP\GnuPG README.lnk"
1580   Delete "$SMPROGRAMS\$MYTMP\*.lnk"
1581   StrCpy $MYTMP "$SMPROGRAMS\$MYTMP"
1582   startMenuDeleteLoop:
1583     ClearErrors
1584     RMDir $MYTMP
1585     GetFullPathName $MYTMP "$MYTMP\.."
1586     IfErrors startMenuDeleteLoopDone
1587     StrCmp $MYTMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
1588   startMenuDeleteLoopDone:
1589
1590   DeleteRegValue HKLM "Software\GNU\GnuPG" "Start Menu Folder"
1591
1592   # Delete Desktop links.
1593   Delete "$DESKTOP\GPA.lnk"
1594   Delete "$DESKTOP\GnuPG Manual.lnk"
1595   Delete "$DESKTOP\GnuPG README.lnk"
1596
1597   # Delete Quick Launch Bar links.
1598   StrCmp $QUICKLAUNCH $TEMP no_quick_launch_uninstall
1599   Delete "$QUICKLAUNCH\GPA.lnk"
1600 no_quick_launch_uninstall:
1601
1602 !endif
1603 !endif
1604
1605   Delete "$INSTDIR\gnupg-uninstall.exe"
1606   RMDir "$INSTDIR"
1607
1608   # Clean the registry.
1609   DeleteRegValue HKLM "Software\GnuPG" "Install Directory"
1610   DeleteRegKey /ifempty HKLM "Software\GnuPG"
1611   # Remove Windows Add/Remove Programs support.
1612   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GnuPG"
1613 SectionEnd