Remove gnupg patches.
[gpg4win.git] / src / inst-dirmngr.nsi
index c5ad8d1..01abd6f 100644 (file)
@@ -41,25 +41,27 @@ Section "-dirmngr" SEC_dirmngr
   File "${prefix}/bin/dirmngr-client.exe"
   File "${prefix}/libexec/dirmngr_ldap.exe"
 
-  SetOutPath "$INSTDIR\etc\dirmngr"
-
-  ifFileExists "$INSTDIR\etc\dirmngr\dirmngr.conf" dirmngr_no_conf 0
-   File /nonfatal "${prefix}/share/doc/dirmngr/examples/dirmngr.conf"
-   File /nonfatal "${prefix}/share/doc/dirmngr/examples/bnetza-10r-ocsp.signer"
-
-   SetOutPath "$INSTDIR\etc\dirmngr\trusted-certs"
-   File /nonfatal "${prefix}/share/doc/dirmngr/examples/trusted-certs/README"
-   File /nonfatal "${prefix}/share/doc/dirmngr/examples/trusted-certs/*.crt"
-
+  # Create a directory for extra certs for documentation reasons.
+  SetShellVarContext all
+  SetOutPath "$APPDATA\GNU\lib\dirmngr\extra-certs"
+
+  # Note: The make-msi.pl script ignores the following line, which is
+  # ok, because the Windows installer does not override locally
+  # modified files.
+  ifFileExists "$APPDATA\GNU\etc\dirmngr\dirmngr.conf" dirmngr_no_conf 0
+   SetOutPath "$APPDATA\GNU\etc\dirmngr"
+
+   File "${SRCDIR}/dirmngr.conf"
+   File "${prefix}/share/doc/dirmngr/examples/bnetza-10r-ocsp.signer"
+
+   SetOutPath "$APPDATA\GNU\etc\dirmngr\trusted-certs"
+   File "${prefix}/share/doc/dirmngr/examples/trusted-certs/README"
+   File "${prefix}/share/doc/dirmngr/examples/trusted-certs/bnetza-10r-ca.crt"
   dirmngr_no_conf:
+  SetShellVarContext current
 
   SetOutPath "$INSTDIR"
 
-  # We need to create the cache directory, as this is not
-  # automatically created by dirmngr.  Actually, the default should be
-  # different.  FIXME.
-  CreateDirectory "$INSTDIR\cache"
-
   StrCmp $DirMngrStatus "MISSING" 0 dirmngr_created
     # Create the service.
     g4wihelp::service_create "DirMngr" "DirMngr" \
@@ -73,6 +75,7 @@ Section "-dirmngr" SEC_dirmngr
   g4wihelp::service_start "DirMngr" 0
 
   # If requested, install the configuration files.
+  # Fixme:  I don't think that is right (wk)!
   ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
   StrCmp $0 "" no_config_dirmngr_files
   CreateDirectory "$0\gnupg"