diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index ecb5deeebb1..608c16d673f 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -742,13 +742,14 @@ static void create_config_dir(void) } if (!pid) { - const char *argv[5]; + const char *argv[6]; argv[0] = "wineprefixcreate"; argv[1] = "--quiet"; - argv[2] = "--prefix"; - argv[3] = tmp_dir; - argv[4] = NULL; + argv[2] = "--wait"; + argv[3] = "--prefix"; + argv[4] = tmp_dir; + argv[5] = NULL; wine_exec_wine_binary( argv[0], (char **)argv, NULL, FALSE ); rmdir( tmp_dir ); fatal_perror( "could not exec wineprefixcreate" ); diff --git a/tools/wineprefixcreate.in b/tools/wineprefixcreate.in index b125316ee2f..9fa206f9f75 100644 --- a/tools/wineprefixcreate.in +++ b/tools/wineprefixcreate.in @@ -29,8 +29,8 @@ usage() echo " -h, --help Display this message" echo " --prefix Directory to create (default: \$WINEPREFIX or ~/.wine)" echo " -q, --quiet Don't print status messages" - echo " -u, --update Update the prefix directory if it already exists" echo " --use-wine-tree Run from the Wine source tree " + echo " -w, --wait Wait for the wineserver to exit before returning" echo "" } @@ -39,7 +39,7 @@ set -e dlldir="@dlldir@" datadir="@datadir@/wine" -do_update=0 +do_wait=0 quiet=0 while [ $# -gt 0 ] @@ -53,14 +53,14 @@ do WINEPREFIX="$2" shift 2 ;; - -u|--update) - do_update=1 - shift - ;; -q|--quiet) quiet=1 shift ;; + -w|--wait) + do_wait=1 + shift + ;; --use-wine-tree) topdir=`cd "$2" && pwd` if [ -x "$topdir/server/wineserver" ] @@ -165,20 +165,16 @@ link_app winebrowser "$CROOT/windows/winebrowser.exe" cp "$datadir/wine.inf" "$CROOT/windows/inf/wine.inf" export WINEPREFIX -${WINELOADER:-wine} rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 wine.inf +"${WINELOADER:-wine}" rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 wine.inf # Wait for the wineserver to finish -if [ $do_update = 0 ] +if [ $do_wait = 1 ] then - ${WINESERVER:-wineserver} -w - if [ $quiet = 0 ] - then - echo "$WINEPREFIX created successfully." - fi -else - if [ $quiet = 0 ] - then - echo "$WINEPREFIX updated successfully." - fi + "${WINESERVER:-wineserver}" -w +fi + +if [ $quiet = 0 ] +then + echo "$WINEPREFIX updated successfully." fi diff --git a/tools/winewrapper b/tools/winewrapper index 8ba170098e8..1165dc91a93 100755 --- a/tools/winewrapper +++ b/tools/winewrapper @@ -88,7 +88,7 @@ fi if [ -z "$WINEPREFIX" -a ! -d "$HOME/.wine" ] then - "$topdir/tools/wineprefixcreate" --update --use-wine-tree "$topdir" + "$topdir/tools/wineprefixcreate" --use-wine-tree "$topdir" fi # and run the application