aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2022-08-12 13:16:36 +0000
committerAndre Heinecke <[email protected]>2022-08-12 13:16:36 +0000
commit5f51a9b4589200486b2833124cbd93455f6ce208 (patch)
tree3a4256a363ee2ba8db5c73ac31cc9593ecb6a9c0
parentQt: Fix working with no gpgconf in CryptoConfig (diff)
downloadgpgme-5f51a9b4589200486b2833124cbd93455f6ce208.tar.gz
gpgme-5f51a9b4589200486b2833124cbd93455f6ce208.zip
w32: Add another fallback to look for gpgconf.exe
* src/w32-util.c (_gpgme_get_gpgconf_path): Add fallback for GnuPG VS-Desktop install scheme. -- GnuPG VS-Desktop has the install layout: %PROGRAMFILES%\GnuPG VS-Desktop\bin\libgpgme.dll %PROGRAMFILES%\GnuPG VS-Desktop\GnuPG\bin\gpgconf.exe This fallback is of course only required if the registry string pointing to the correct install directory is broken. GnuPG-Bug-Id: T6131
-rw-r--r--src/w32-util.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/w32-util.c b/src/w32-util.c
index e4757a21..02058e70 100644
--- a/src/w32-util.c
+++ b/src/w32-util.c
@@ -645,7 +645,7 @@ _gpgme_get_gpgconf_path (void)
gpgconf = find_program_at_standard_place ("GNU\\GnuPG\\gpgconf.exe");
}
- /* 5. Try to find gpgconf.exe relative to us. */
+ /* 5. Try to find gpgconf.exe relative to us as Gpg4win installs it. */
if (!gpgconf && inst_dir)
{
char *dir = _gpgme_strconcat (inst_dir, "\\..\\..\\GnuPG\\bin", NULL);
@@ -653,7 +653,15 @@ _gpgme_get_gpgconf_path (void)
free (dir);
}
- /* 5. Print a debug message if not found. */
+ /* 6. Try to find gpgconf.exe relative to us as GnuPG VSD installs it. */
+ if (!gpgconf && inst_dir)
+ {
+ char *dir = _gpgme_strconcat (inst_dir, "\\..\\GnuPG\\bin", NULL);
+ gpgconf = find_program_in_dir (dir, name);
+ free (dir);
+ }
+
+ /* Print a debug message if not found. */
if (!gpgconf)
_gpgme_debug (NULL, DEBUG_ENGINE, -1, NULL, NULL, NULL,
"_gpgme_get_gpgconf_path: '%s' not found",name);