diff options
author | Tor Lillqvist <tml@iki.fi> | 2001-10-31 21:32:08 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2001-10-31 21:32:08 +0000 |
commit | 22865210cbef2f0d1c0d5f481e798390f1b4f059 (patch) | |
tree | 62656f887ccb1611fd62514977f94e5aa5ef2546 /pango/modules.c | |
parent | 60fa0fcfd1446e404ea434e47fe8c4e6dc75be35 (diff) | |
download | pango-22865210cbef2f0d1c0d5f481e798390f1b4f059.tar.gz |
Neat Win32 feature: A prebuilt Pango package can be installed in a random
2001-10-31 Tor Lillqvist <tml@iki.fi>
* pango/modules.c (process_module_file): Neat Win32 feature: A
prebuilt Pango package can be installed in a random
location (i.e., not the same used when configuring and building
the software). The pango.modules file provided with the package
contains paths on the packager's system, not the end-users. We
notice this, and replace with the corresponding path in the
installation directory on the end-user's machine.
* pango/pango-utils.c: Use G_WIN32_DLLMAIN_FOR_DLL_NAME.
(pango_get_sysconf_subdirectory,pango_get_lib_subdirectory): No
need to call g_path_get_basename on the DLL name, DllMain already
does it.
Diffstat (limited to 'pango/modules.c')
-rw-r--r-- | pango/modules.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pango/modules.c b/pango/modules.c index 094b8f5d..b7868dbb 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -244,6 +244,28 @@ process_module_file (FILE *module_file) { case 0: pair->load_info = g_strdup (tmp_buf->str); +#ifdef G_OS_WIN32 + if (strncmp (pair->load_info, + LIBDIR "/pango/modules/", + strlen (LIBDIR "/pango/modules/")) == 0) + { + /* This is an entry put there by make install on the + * packager's system. On Windows a prebuilt Pango + * package can be installed in a random + * location. The pango.modules file distributed in + * such a package contains paths from the package + * builder's machine. Replace the path with the real + * one on this machine. */ + gchar *tem = pair->load_info; + pair->load_info = + g_strconcat (pango_get_lib_subdirectory (), + "\\modules\\", + tem + strlen (LIBDIR "/pango/modules/"), + NULL); + g_free (tem); + } + +#endif break; case 1: pair->info.id = g_strdup (tmp_buf->str); |