diff --git a/plugins/gpgme-vala/src/gpgme_helper.vala b/plugins/gpgme-vala/src/gpgme_helper.vala index f28bc6d6..3f42bb51 100644 --- a/plugins/gpgme-vala/src/gpgme_helper.vala +++ b/plugins/gpgme-vala/src/gpgme_helper.vala @@ -176,6 +176,9 @@ private static uint8[] get_uint8_from_data(Data data) { private static void initialize() { if (!initialized) { +#if _WIN32 + set_global_flag("w32-inst-dir", "C://Program Files (x86)//GnuPG//bin"); +#endif check_version(); initialized = true; } diff --git a/plugins/gpgme-vala/vapi/gpgme_public.vapi b/plugins/gpgme-vala/vapi/gpgme_public.vapi index bcf12569..5dbe023e 100644 --- a/plugins/gpgme-vala/vapi/gpgme_public.vapi +++ b/plugins/gpgme-vala/vapi/gpgme_public.vapi @@ -4,6 +4,9 @@ namespace GPG { [CCode (cname = "gpgme_check_version")] public unowned string check_version(string? required_version = null); +[CCode (cname = "gpgme_set_global_flag")] +public int set_global_flag(string name, string value); + [Compact] [CCode (cname = "struct _gpgme_key", ref_function = "gpgme_key_ref_vapi", unref_function = "gpgme_key_unref_vapi", free_function = "gpgme_key_release")] public class Key {