1 # inst-dirmngr.nsi - Installer snippet. -*- coding: latin-1; -*-
2 # Copyright (C) 2007 g10 Code GmbH
4 # This file is part of Gpg4win.
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.
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.
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,
25 !define prefix ${ipdir}/dirmngr-${gpg4win_pkg_dirmngr_version}
28 Section "dirmngr" SEC_dirmngr
30 Section "-dirmngr" SEC_dirmngr
34 File "${gpg4win_pkg_dirmngr}"
36 Var /GLOBAL DirMngrStatus
37 g4wihelp::service_query "DirMngr"
38 StrCpy $DirMngrStatus $R0
40 File "${prefix}/bin/dirmngr.exe"
41 File "${prefix}/bin/dirmngr-client.exe"
42 File "${prefix}/libexec/dirmngr_ldap.exe"
44 SetOutPath "$INSTDIR\etc\dirmngr"
46 ifFileExists "$INSTDIR\etc\dirmngr\dirmngr.conf" dirmngr_no_conf 0
47 File /nonfatal "${prefix}/share/doc/dirmngr/examples/dirmngr.conf"
48 File /nonfatal "${prefix}/share/doc/dirmngr/examples/bnetza-10r-ocsp.signer"
50 SetOutPath "$INSTDIR\etc\dirmngr\trusted-certs"
51 File /nonfatal "${prefix}/share/doc/dirmngr/examples/trusted-certs/README"
52 File /nonfatal "${prefix}/share/doc/dirmngr/examples/trusted-certs/*.crt"
58 # We need to create the cache directory, as this is not
59 # automatically created by dirmngr. Actually, the default should be
61 CreateDirectory "$INSTDIR\cache"
63 StrCmp $DirMngrStatus "MISSING" 0 dirmngr_created
65 g4wihelp::service_create "DirMngr" "DirMngr" \
66 '"$INSTDIR\dirmngr.exe" --service'
70 # FIXME: This does not work. Luckily, it is also not needed.
71 # g4wihelp::service_start "DirMngr" "2" '"$INSTDIR\dirmngr.exe"' "--service"
73 g4wihelp::service_start "DirMngr" 0
75 # If requested, install the configuration files.
76 ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
77 StrCmp $0 "" no_config_dirmngr_files
78 CreateDirectory "$0\gnupg"
80 g4wihelp::config_fetch "dirmngr.conf"
81 StrCmp $R0 "" no_config_dirmngr_conf
82 CopyFiles $R0 "$0\gnupg\dirmngr.conf"
83 no_config_dirmngr_conf:
85 g4wihelp::config_fetch "dirmngr_ldapservers.conf"
86 StrCmp $R0 "" no_config_dirmngr_ldapservers_conf
87 CopyFiles $R0 "$0\gnupg\dirmngr_ldapservers.conf"
88 no_config_dirmngr_ldapservers_conf:
90 no_config_dirmngr_files: