Add support for OpenPGP on Windows

This commit is contained in:
LAGonauta 2020-05-06 22:22:38 -03:00
parent e2fd821bb4
commit 281a84a14c
2 changed files with 6 additions and 0 deletions

View file

@ -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;
}

View file

@ -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 {