Module: wine Branch: master Commit: 13159b0767b8b5e3a9f9203f6e316738359cc7cf URL: https://gitlab.winehq.org/wine/wine/-/commit/13159b0767b8b5e3a9f9203f6e31673...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 24 13:44:54 2024 +0200
makefiles: Hardcode the fonts directory.
It's Wine-specific anyway.
---
configure | 4 ---- configure.ac | 1 - dlls/win32u/Makefile.in | 2 -- dlls/win32u/font.c | 20 ++++---------------- tools/makedep.c | 6 +++--- 5 files changed, 7 insertions(+), 26 deletions(-)
diff --git a/configure b/configure index e77f0893dd8..26b537c2088 100755 --- a/configure +++ b/configure @@ -869,7 +869,6 @@ CC SET_MAKE srcdir nlsdir -fontdir dlldir host_os host_vendor @@ -4678,8 +4677,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
dlldir=${libdir}/wine
-fontdir=${datadir}/wine/fonts - nlsdir=${datadir}/wine/nls
@@ -23982,7 +23979,6 @@ host_cpu = $host_cpu host_vendor = $host_vendor host_os = $host_os dlldir = $dlldir -fontdir = $fontdir nlsdir = $nlsdir srcdir = $srcdir SET_MAKE = $SET_MAKE diff --git a/configure.ac b/configure.ac index e828083fc91..ac0f3ea051d 100644 --- a/configure.ac +++ b/configure.ac @@ -92,7 +92,6 @@ AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine i AC_CANONICAL_HOST
AC_SUBST(dlldir,[${libdir}/wine]) -AC_SUBST(fontdir,[${datadir}/wine/fonts]) AC_SUBST(nlsdir,[${datadir}/wine/nls]) AC_SUBST(srcdir)
diff --git a/dlls/win32u/Makefile.in b/dlls/win32u/Makefile.in index 61c06e900a4..6326a3cd302 100644 --- a/dlls/win32u/Makefile.in +++ b/dlls/win32u/Makefile.in @@ -56,5 +56,3 @@ SOURCES = \ vulkan.c \ window.c \ winstation.c - -font_EXTRADEFS = -DWINE_FONT_DIR="`${MAKEDEP} -R ${datadir}/wine ${fontdir}`" diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 7e70cccf568..8fb3128f5e0 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -462,10 +462,6 @@ static const struct nls_update_font_list
static pthread_mutex_t font_lock = PTHREAD_MUTEX_INITIALIZER;
-#ifndef WINE_FONT_DIR -#define WINE_FONT_DIR "fonts" -#endif - #ifdef WORDS_BIGENDIAN #define GET_BE_WORD(x) (x) #define GET_BE_DWORD(x) (x) @@ -476,20 +472,12 @@ static pthread_mutex_t font_lock = PTHREAD_MUTEX_INITIALIZER;
static void get_fonts_data_dir_path( const WCHAR *file, WCHAR *path ) { - const char *dir; + const char *dir = ntdll_get_build_dir(); ULONG len = MAX_PATH;
- if ((dir = ntdll_get_data_dir())) - { - wine_unix_to_nt_file_name( dir, path, &len ); - asciiz_to_unicode( path + len - 1, "\" WINE_FONT_DIR "\" ); - } - else if ((dir = ntdll_get_build_dir())) - { - wine_unix_to_nt_file_name( dir, path, &len ); - asciiz_to_unicode( path + len - 1, "\fonts\" ); - } - + if (!dir) dir = ntdll_get_data_dir(); + wine_unix_to_nt_file_name( dir, path, &len ); + asciiz_to_unicode( path + len - 1, "\fonts\" ); if (file) lstrcatW( path, file ); }
diff --git a/tools/makedep.c b/tools/makedep.c index 29c83e3f73f..61e30ed89a6 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2664,7 +2664,7 @@ static struct strarray get_removable_dirs( struct strarray files ) static void output_uninstall_rules( struct makefile *make ) { static const char *dirs_order[] = - { "$(includedir)", "$(mandir)", "$(fontdir)", "$(nlsdir)", "$(datadir)", "$(dlldir)" }; + { "$(includedir)", "$(mandir)", "$(nlsdir)", "$(datadir)", "$(dlldir)" };
struct strarray uninstall_dirs; unsigned int i, j; @@ -2987,7 +2987,7 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source, } if (source->file->flags & FLAG_INSTALL) { - add_install_rule( make, source->name, 0, ttf_obj, strmake( "D$(fontdir)/%s", ttf_obj )); + add_install_rule( make, source->name, 0, ttf_obj, strmake( "D$(datadir)/wine/fonts/%s", ttf_obj )); output_srcdir_symlink( make, ttf_obj ); }
@@ -3005,7 +3005,7 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source, tools_path( make, "sfnt2fon" ), ttf_file ); output( "\t%s%s -q -o $@ %s %s\n", cmd_prefix( "GEN" ), tools_path( make, "sfnt2fon" ), ttf_file, args ); - add_install_rule( make, source->name, 0, xstrdup(font), strmake( "d$(fontdir)/%s", font )); + add_install_rule( make, source->name, 0, xstrdup(font), strmake( "d$(datadir)/wine/fonts/%s", font )); } } }