Commit bf566139 authored by Alexandre Julliard's avatar Alexandre Julliard

libwine: Added support for executing wine binaries out of the build dir.

parent 77b3b92e
......@@ -598,7 +598,7 @@ static void start_server(void)
if (pid == -1) fatal_perror( "fork" );
if (!pid)
{
argv[0] = "wineserver";
argv[0] = "server/wineserver";
argv[1] = TRACE_ON(server) ? "-d" : NULL;
argv[2] = NULL;
wine_exec_wine_binary( argv[0], argv, getenv("WINESERVER") );
......@@ -797,7 +797,7 @@ static void create_config_dir(void)
{
const char *argv[6];
argv[0] = "wineprefixcreate";
argv[0] = "tools/wineprefixcreate";
argv[1] = "--quiet";
argv[2] = "--wait";
argv[3] = "--prefix";
......
......@@ -427,6 +427,18 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
use_preloader = 1;
}
if ((ptr = strrchr( name, '/' )))
{
/* if we are in build dir and name contains a path, try that */
if (build_dir)
{
argv[0] = build_path( build_dir, name );
preloader_exec( argv, use_preloader );
free( argv[0] );
}
name = ptr + 1; /* get rid of path */
}
/* first, bin directory from the current libdir or argv0 */
if (bindir)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment