1.1 --- a/plover/util.c Fri Jul 08 08:26:29 2016 +0100
1.2 +++ b/plover/util.c Sat Jul 16 11:07:18 2016 +0100
1.3 @@ -29,8 +29,9 @@
1.4 #include "config.h"
1.5 #include "plover.h"
1.6
1.7 -gchar *plover_default_prefix_for_vendor(const char *vendor)
1.8 +gchar *plover_comps_get_default_prefix(struct comps *comps)
1.9 {
1.10 + const char *vendor_prefix;
1.11 #ifdef WIN32
1.12 /*
1.13 * We want to sidestep any redirecting that MS-Windows may
1.14 @@ -55,15 +56,17 @@
1.15 buf);
1.16 program_files=buf;
1.17 }
1.18 - return g_strconcat(program_files,"\\",vendor?vendor:"Plover",NULL);
1.19 + vendor_prefix=program_files;
1.20 #else
1.21 - const char *vendor_prefix;
1.22 vendor_prefix=g_getenv("PLOVER_VENDOR_PREFIX");
1.23 +#endif
1.24 if (!vendor_prefix)
1.25 return NULL;
1.26 + else if (!comps)
1.27 + return g_build_filename(vendor_prefix,"Plover",NULL);
1.28 else
1.29 - return g_build_filename(vendor_prefix,vendor?vendor:"Plover",NULL);
1.30 -#endif
1.31 + return g_build_filename(vendor_prefix,
1.32 + comps->vendor?comps->vendor:"Plover",comps->distribution,NULL);
1.33 }
1.34
1.35 gchar *plover_pre_install_prefix(void)