Esempio n. 1
0
static const gchar *
get_exec_prefix (gchar slash)
{
#ifdef G_OS_WIN32
  if (exec_prefix != NULL)
    return exec_prefix;

  /* On Win32, exec_prefix is always same as prefix. Or is it? Maybe not,
   * but at least in tml's prebuilt stuff it is. If somebody else does
   * it another way, feel free to hack this.
   */
  return (exec_prefix = get_runtime_prefix (slash));
#else
  return EXEC_PREFIX;
#endif
}
Esempio n. 2
0
static const gchar *
expand_and_munge (const gchar *value)
{
  const gchar *retval;

  if (starts_with_dir (value, "${prefix}"))
    retval = g_strconcat (PREFIX, value + strlen ("${prefix}"), NULL);
  else if (starts_with_dir (value, "${exec_prefix}"))
    retval = g_strconcat (EXEC_PREFIX, value + strlen ("${exec_prefix}"), NULL);
  else
    retval = g_strdup (value);

  if (starts_with_dir (retval, EXEC_PREFIX))
    retval = g_strconcat (get_exec_prefix ('/'), retval + strlen (EXEC_PREFIX), NULL);

  if (starts_with_dir (retval, PREFIX))
    retval = g_strconcat (get_runtime_prefix ('/'), retval + strlen (PREFIX), NULL);

  return retval;
}
Esempio n. 3
0
static gchar *
get_sys_plugin_dir (gboolean forward_slashes)
{
#ifdef G_OS_WIN32
  const gchar *rprefix;

  rprefix = get_runtime_prefix (forward_slashes ? '/' : G_DIR_SEPARATOR);

  return g_build_path (forward_slashes ? "/" : G_DIR_SEPARATOR_S,
                       rprefix,
                       "lib", "gimp",
                       GIMP_PLUGIN_VERSION,
                       "plug-ins",
                       NULL);
#else
  return g_build_path (forward_slashes ? "/" : G_DIR_SEPARATOR_S,
                       LIBDIR,
                       "gimp",
                       GIMP_PLUGIN_VERSION,
                       "plug-ins",
                       NULL);
#endif
}