diff -r 296eac3183bc -r 31fb35727621 plover/util.c --- a/plover/util.c Fri Jul 08 08:26:29 2016 +0100 +++ b/plover/util.c Sat Jul 16 11:07:18 2016 +0100 @@ -29,8 +29,9 @@ #include "config.h" #include "plover.h" -gchar *plover_default_prefix_for_vendor(const char *vendor) +gchar *plover_comps_get_default_prefix(struct comps *comps) { + const char *vendor_prefix; #ifdef WIN32 /* * We want to sidestep any redirecting that MS-Windows may @@ -55,15 +56,17 @@ buf); program_files=buf; } - return g_strconcat(program_files,"\\",vendor?vendor:"Plover",NULL); + vendor_prefix=program_files; #else - const char *vendor_prefix; vendor_prefix=g_getenv("PLOVER_VENDOR_PREFIX"); +#endif if (!vendor_prefix) return NULL; + else if (!comps) + return g_build_filename(vendor_prefix,"Plover",NULL); else - return g_build_filename(vendor_prefix,vendor?vendor:"Plover",NULL); -#endif + return g_build_filename(vendor_prefix, + comps->vendor?comps->vendor:"Plover",comps->distribution,NULL); } gchar *plover_pre_install_prefix(void)