added GIMP_API_VERSION to the generated gimpversion.h.

2004-12-14  Sven Neumann  <sven@gimp.org>

	* configure.in: added GIMP_API_VERSION to the generated gimpversion.h.

	* libgimpbase/gimpenv.c (gimp_toplevel_directory): use
	GIMP_API_VERSION instead of GIMP_MACRO_VERSION.GIMP_MINOR_VERSION
	when building a path to test the plug-in executable path against.
This commit is contained in:
Sven Neumann 2004-12-13 23:41:47 +00:00 committed by Sven Neumann
parent f06e15febb
commit f428c0ed08
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2004-12-14 Sven Neumann <sven@gimp.org>
* configure.in: added GIMP_API_VERSION to the generated gimpversion.h.
* libgimpbase/gimpenv.c (gimp_toplevel_directory): use
GIMP_API_VERSION instead of GIMP_MACRO_VERSION.GIMP_MINOR_VERSION
when building a path to test the plug-in executable path against.
2004-12-14 Michael Natterer <mitch@gimp.org> 2004-12-14 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/drawable.pdb: added gimp_drawable_sub_thumbnail() * tools/pdbgen/pdb/drawable.pdb: added gimp_drawable_sub_thumbnail()

View file

@ -1525,6 +1525,7 @@ _______EOF
#define GIMP_MINOR_VERSION ($gimp_minor_ver) #define GIMP_MINOR_VERSION ($gimp_minor_ver)
#define GIMP_MICRO_VERSION ($gimp_micro_ver) #define GIMP_MICRO_VERSION ($gimp_micro_ver)
#define GIMP_VERSION "$gimp_ver" #define GIMP_VERSION "$gimp_ver"
#define GIMP_API_VERSION "$gimp_api_ver"
_______EOF _______EOF
cat >>$outfile <<\_______EOF cat >>$outfile <<\_______EOF
@ -1551,6 +1552,7 @@ _______EOF
gimp_minor_ver=gimp_minor_version gimp_minor_ver=gimp_minor_version
gimp_micro_ver=gimp_micro_version gimp_micro_ver=gimp_micro_version
gimp_ver=gimp_version gimp_ver=gimp_version
gimp_api_ver=gimp_api_version
]) ])
AC_CONFIG_FILES([ AC_CONFIG_FILES([

View file

@ -204,17 +204,14 @@ gimp_toplevel_directory (void)
/* If the executable file name is of the format /* If the executable file name is of the format
* <foobar>\bin\*.exe or * <foobar>\bin\*.exe or
* <foobar>\lib\gimp\GIMP_MAJOR_VERSION.GIMP_MINOR_VERSION\plug-ins\*.exe, * <foobar>\lib\gimp\GIMP_API_VERSION\plug-ins\*.exe, use <foobar>.
* use <foobar>. Otherwise, use the directory where the * Otherwise, use the directory where the executable is.
* executable is.
*/ */
sep1 = strrchr (filename, '\\'); sep1 = strrchr (filename, '\\');
*sep1 = '\0'; *sep1 = '\0';
sep2 = strrchr (filename, '\\'); sep2 = strrchr (filename, '\\');
if (sep2 != NULL) if (sep2 != NULL)
{ {
if (g_ascii_strcasecmp (sep2 + 1, "bin") == 0) if (g_ascii_strcasecmp (sep2 + 1, "bin") == 0)
@ -225,8 +222,8 @@ gimp_toplevel_directory (void)
{ {
gchar test[MAX_PATH]; gchar test[MAX_PATH];
sprintf (test, "\\lib\\gimp\\%d.%d\\plug-ins", g_snprintf (test, sizeof (test) - 1,
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION); "\\lib\\gimp\\%s\\plug-ins", GIMP_API_VERSION);
if (strlen (filename) > strlen (test) && if (strlen (filename) > strlen (test) &&
g_ascii_strcasecmp (filename + strlen (filename) - strlen (test), g_ascii_strcasecmp (filename + strlen (filename) - strlen (test),