From: Andrea Zagli Date: Sat, 28 Dec 2013 21:13:24 +0000 (+0100) Subject: Adjustment for the path of gui file under mingw. X-Git-Tag: v0.5.0^0 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=75ea337bf016f0fabf646e6027e8d6d14f94dadc;p=zakauthe%2Fplugins%2Fdb Adjustment for the path of gui file under mingw. --- diff --git a/src/aute_db.c b/src/aute_db.c index af96614..aaf284c 100644 --- a/src/aute_db.c +++ b/src/aute_db.c @@ -409,11 +409,7 @@ gchar gtkbuilder = gtk_builder_new (); #ifdef G_OS_WIN32 -#undef GUIDIR -#undef FORMDIR - - gchar *GUIDIR; - gchar *FORMDIR; + gchar *guidir; gchar *moddir; gchar *p; @@ -425,19 +421,25 @@ gchar && (g_ascii_strcasecmp (p + 1, "src") == 0 || g_ascii_strcasecmp (p + 1, ".libs") == 0)) { - GUIDIR = g_build_filename ("/mingw", "share", "libaute-db", "gui", NULL); - FORMDIR = g_build_filename ("/mingw", "share", "libaute-db", "form", NULL); + guidir = g_strdup (GUIDIR); + formdir = g_strdup (FORMDIR); + +#undef GUIDIR +#undef FORMDIR } else { - GUIDIR = g_build_filename (moddir, "share", "libaute-db", "gui", NULL); - FORMDIR = g_build_filename (moddir, "share", "libaute-db", "form", NULL); + guidir = g_build_filename (moddir, "share", PACKAGE, "gui", NULL); + formdir = g_build_filename (moddir, "share", PACKAGE, "form", NULL); } -#endif + +#else formdir = g_strdup (FORMDIR); - guifile = g_build_filename (GUIDIR, "autedb.gui", NULL); +#endif + + guifile = g_build_filename (guidir, "autedb.gui", NULL); if (!gtk_builder_add_objects_from_file (gtkbuilder, guifile, g_strsplit ("diag_main", "|", -1), &error))