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

make the non-wait behavior the default.
This commit is contained in:
Alexandre Julliard 2005-04-20 13:12:14 +00:00
parent 3e2f2a5265
commit 3b5875e35f
3 changed files with 20 additions and 23 deletions

View File

@ -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" );

View File

@ -29,8 +29,8 @@ usage()
echo " -h, --help Display this message"
echo " --prefix <dir> 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 <dir> Run from the Wine source tree <dir>"
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

View File

@ -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