wineprefixcreate: Make sure the path returned by GetTempPath() during the $WINEPREFIX creation will be writable.
Francois Gouget
fgouget at codeweavers.com
Wed Sep 12 16:40:42 CDT 2007
---
mshtml.dll (and probably many others) use GetTempPath() during the
self-registration process. But at that point the Windows environment
variables, and in particular $TMP and $TEMP, have not been set yet,
especially not in the currently running process. So when mshtml.dll
calls GetTempPath(), that function returns the current directory, which
obviously is no good if that directory is not writable (like '/' for
instance). So this patch makes 'c:\windows\temp' the current directory,
which we know will be writable (and the chdir() should have no other
side effect in this script).
tools/wineprefixcreate.in | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/wineprefixcreate.in b/tools/wineprefixcreate.in
index fb60140..73cb8d0 100644
--- a/tools/wineprefixcreate.in
+++ b/tools/wineprefixcreate.in
@@ -170,6 +170,10 @@ done
cp "$datadir/wine.inf" "$CROOT/windows/inf/wine.inf"
export WINEPREFIX
+
+# Make sure GetTempPath() will return a writable directory
+cd "$CROOT/windows/temp"
+
"${WINELOADER:-$bindir/wine}" rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 wine.inf
# Wait for the wineserver to finish
--
1.5.2.4
More information about the wine-patches
mailing list