Commit 3b5875e3 authored by Alexandre Julliard's avatar Alexandre Julliard

Replace the wineprefixcreate --update option by a --wait option, and

make the non-wait behavior the default.
parent 3e2f2a52
...@@ -742,13 +742,14 @@ static void create_config_dir(void) ...@@ -742,13 +742,14 @@ static void create_config_dir(void)
} }
if (!pid) if (!pid)
{ {
const char *argv[5]; const char *argv[6];
argv[0] = "wineprefixcreate"; argv[0] = "wineprefixcreate";
argv[1] = "--quiet"; argv[1] = "--quiet";
argv[2] = "--prefix"; argv[2] = "--wait";
argv[3] = tmp_dir; argv[3] = "--prefix";
argv[4] = NULL; argv[4] = tmp_dir;
argv[5] = NULL;
wine_exec_wine_binary( argv[0], (char **)argv, NULL, FALSE ); wine_exec_wine_binary( argv[0], (char **)argv, NULL, FALSE );
rmdir( tmp_dir ); rmdir( tmp_dir );
fatal_perror( "could not exec wineprefixcreate" ); fatal_perror( "could not exec wineprefixcreate" );
......
...@@ -29,8 +29,8 @@ usage() ...@@ -29,8 +29,8 @@ usage()
echo " -h, --help Display this message" echo " -h, --help Display this message"
echo " --prefix <dir> Directory to create (default: \$WINEPREFIX or ~/.wine)" echo " --prefix <dir> Directory to create (default: \$WINEPREFIX or ~/.wine)"
echo " -q, --quiet Don't print status messages" echo " -q, --quiet Don't print status messages"
echo " -u, --update Update the prefix directory if it already exists"
echo " --use-wine-tree <dir> Run from the Wine source tree <dir>" echo " --use-wine-tree <dir> Run from the Wine source tree <dir>"
echo " -w, --wait Wait for the wineserver to exit before returning"
echo "" echo ""
} }
...@@ -39,7 +39,7 @@ set -e ...@@ -39,7 +39,7 @@ set -e
dlldir="@dlldir@" dlldir="@dlldir@"
datadir="@datadir@/wine" datadir="@datadir@/wine"
do_update=0 do_wait=0
quiet=0 quiet=0
while [ $# -gt 0 ] while [ $# -gt 0 ]
...@@ -53,14 +53,14 @@ do ...@@ -53,14 +53,14 @@ do
WINEPREFIX="$2" WINEPREFIX="$2"
shift 2 shift 2
;; ;;
-u|--update)
do_update=1
shift
;;
-q|--quiet) -q|--quiet)
quiet=1 quiet=1
shift shift
;; ;;
-w|--wait)
do_wait=1
shift
;;
--use-wine-tree) --use-wine-tree)
topdir=`cd "$2" && pwd` topdir=`cd "$2" && pwd`
if [ -x "$topdir/server/wineserver" ] if [ -x "$topdir/server/wineserver" ]
...@@ -165,20 +165,16 @@ link_app winebrowser "$CROOT/windows/winebrowser.exe" ...@@ -165,20 +165,16 @@ link_app winebrowser "$CROOT/windows/winebrowser.exe"
cp "$datadir/wine.inf" "$CROOT/windows/inf/wine.inf" cp "$datadir/wine.inf" "$CROOT/windows/inf/wine.inf"
export WINEPREFIX 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 # Wait for the wineserver to finish
if [ $do_update = 0 ] if [ $do_wait = 1 ]
then then
${WINESERVER:-wineserver} -w "${WINESERVER:-wineserver}" -w
if [ $quiet = 0 ] fi
then
echo "$WINEPREFIX created successfully." if [ $quiet = 0 ]
fi then
else echo "$WINEPREFIX updated successfully."
if [ $quiet = 0 ]
then
echo "$WINEPREFIX updated successfully."
fi
fi fi
...@@ -88,7 +88,7 @@ fi ...@@ -88,7 +88,7 @@ fi
if [ -z "$WINEPREFIX" -a ! -d "$HOME/.wine" ] if [ -z "$WINEPREFIX" -a ! -d "$HOME/.wine" ]
then then
"$topdir/tools/wineprefixcreate" --update --use-wine-tree "$topdir" "$topdir/tools/wineprefixcreate" --use-wine-tree "$topdir"
fi fi
# and run the application # and run the application
......
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