From 75ea337bf016f0fabf646e6027e8d6d14f94dadc Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 28 Dec 2013 22:13:24 +0100 Subject: [PATCH] Adjustment for the path of gui file under mingw. --- src/aute_db.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) 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)) -- 2.49.0