[PATCH 0/1] MR7361: configure.ac,tools/makedep: (re)introduce wine wrapper script in build tree.
commit cb87d40cd4a8837826ea76efc91371ab09eb9d63 removed the ability (from the inside the tools/wine-wrapper) to have some local settings (per build tree) where one can adapt environment for launching wine this MR allows at configure time to specify an (external) wine wrapper to use for a given build tree Signed-off-by: Eric Pouech epouech(a)codeweavers.com -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7361
From: Eric Pouech <epouech(a)codeweavers.com> Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- configure.ac | 3 +++ tools/makedep.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ea53ce58e21..eec11d458cd 100644 --- a/configure.ac +++ b/configure.ac @@ -89,6 +89,7 @@ AC_ARG_WITH(system-dllpath,AS_HELP_STRING([--with-system-dllpath=PATH],[load ext AC_SUBST(system_dllpath,[$withval])) AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR])) AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build])) +AC_ARG_WITH(wine-wrapper,AS_HELP_STRING([--with-wine-wrapper=PATH],[path to a wrapper script for wine invocation inside a build tree])) AC_CANONICAL_HOST AC_SUBST(srcdir) @@ -350,6 +351,8 @@ WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false], [gettext tools not found (or too old), translations won't be built.], [enable_po]) +AC_SUBST(WINE_WRAPPER, "$with_wine_wrapper") + dnl **** Check for some libraries **** dnl Check for -li386 for NetBSD and OpenBSD diff --git a/tools/makedep.c b/tools/makedep.c index f754bc82f4e..c5f29371669 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -158,6 +158,7 @@ static const char *ln_s; static const char *sed_cmd; static const char *wayland_scanner; static const char *sarif_converter; +static const char *wine_wrapper; static int so_dll_supported; static int unix_lib_supported; /* per-architecture global variables */ @@ -4350,8 +4351,9 @@ static void output_top_makefile( struct makefile *make ) if (!strarray_exists( &disabled_dirs[0], "tools/wine" )) { - output( "wine: %s\n", tools_path( make, "wine" )); - output( "\t%srm -f $@ && %s %s $@\n", cmd_prefix( "LN" ), ln_s, tools_path( make, "wine" )); + output( "wine: %s %s\n", tools_path( make, "wine" ), makedep); + output( "\t%srm -f $@ && %s %s $@\n", cmd_prefix( "LN" ), ln_s, + wine_wrapper ? wine_wrapper : tools_path( make, "wine" ) ); strarray_add( &make->all_targets[0], "wine" ); } @@ -4619,6 +4621,7 @@ int main( int argc, char *argv[] ) ln_s = get_expanded_make_variable( top_makefile, "LN_S" ); wayland_scanner = get_expanded_make_variable( top_makefile, "WAYLAND_SCANNER" ); sarif_converter = get_expanded_make_variable( top_makefile, "SARIF_CONVERTER" ); + wine_wrapper = get_expanded_make_variable( top_makefile, "WINE_WRAPPER" ); if (root_src_dir && !strcmp( root_src_dir, "." )) root_src_dir = NULL; if (tools_dir && !strcmp( tools_dir, "." )) tools_dir = NULL; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7361
I don't think this justifies extra support in configure. It's easy enough to have a wrapper script somewhere else in the path, or in tree with a different name. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7361#note_95037
You could also do `configure --disable-wine` and provide your own wine script that runs `loader/wine` directly. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7361#note_95038
On Wed Feb 19 08:31:13 2025 +0000, Alexandre Julliard wrote:
You could also do `configure --disable-wine` and provide your own wine script that runs `loader/wine` directly. thanks for the suggestion, but it would break 'wine install' afterwards
wrapper script in build dir is ofc possible but requires to adapt all callers (including myself) to use the wrapper instead of wine I'll keep the MR locally then -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7361#note_95125
This merge request was closed by eric pouech. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7361
participants (3)
-
Alexandre Julliard (@julliard) -
Eric Pouech -
eric pouech (@epo)