cckec / winetricks

Automatically exported from code.google.com/p/winetricks
0 stars 0 forks source link

Wine run with slash character in path #78

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In Issue 71, Dan Kegel remarked that "winetricks verbs have to work on cygwin, 
so you can't pass paths with /'s to $WINE."

I did:

  grep -nw WINE winetricks |grep / |grep -v \ /  |less

and noticed several places where this is done:

3992:        WINEDLLOVERRIDES="regsvcs.exe=b" w_try $WINE 
"$W_CACHE"/dotnet11/dotnetfx.exe
4015:        WINEDLLOVERRIDES="regsvcs.exe=b" w_try $WINE 
"$W_CACHE"/dotnet11sp1/NDP1.1sp1-KB867460-X86.exe
4048:        w_try $WINE "$W_CACHE"/dotnet20/dotnetfx.exe
4094:    w_try $WINE "$W_CACHE"/dotnet20sp2/NetFx20SP2_x86.exe 
4189:        w_try $WINE regedit "$W_TMP"/sp1.reg
4717:    w_try $WINE "$W_CACHE"/mono26/mono-2.6.7-gtksharp-2.12.10-win32-2.exe 
$W_UNATTENDED_SLASH_SILENT
4734:    w_try $WINE "$W_CACHE"/mono28/mono-2.8.2-gtksharp-2.12.10-win32-1.exe 
$W_UNATTENDED_SLASH_SILENT
5019:    w_try $WINE "$W_CACHE"/ogg/opencodecs_0.84.17338.exe 
$W_UNATTENDED_SLASH_S
5530:    $WINE "$W_CACHE"/vcrun6/vcredist.exe
5622:    w_try $WINE "$W_CACHE"/vcrun2003/BZEditW32_1.6.5_Installer.exe 
$W_UNATTENDED_SLASH_S
5720:        w_try $WINE "$W_CACHE"/vjrun20/vjredist.exe            
6107:    test x"$W_UNATTENDED_SLASH_Q" = x"" || w_try $WINE 
"$W_CACHE"/corefonts/arial32.exe $W_UNATTENDED_SLASH_Q
6954:        w_try "$WINE" "$W_CACHE/$W_PACKAGE/$file1"
6982:    $WINE "$W_CACHE"/ie6/ie60.exe
9369:        w_try "$WINE" "$W_CACHE/$W_PACKAGE/$file1"

Original issue reported on code.google.com by t...@hush.ai on 16 May 2011 at 4:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I found some more when I did:

  grep -nw WINE winetricks |grep \ /  |less

All are from r597.

3439:    w_try $WINE "$W_CACHE"/comctl32/cc32inst.exe "/T:$W_TMP_WIN" /c 
$W_UNATTENDED_SLASH_Q
3441:    w_try $WINE "$W_TMP"/x86/50ComUpd.Exe "/T:$W_TMP_WIN" /c 
$W_UNATTENDED_SLASH_Q
3990:        WINEDLLOVERRIDES="regsvcs.exe=b" w_try $WINE 
"$W_CACHE"/dotnet11/dotnetfx.exe /q /C:"install /q"
4013:        WINEDLLOVERRIDES="regsvcs.exe=b" w_try $WINE 
"$W_CACHE"/dotnet11sp1/NDP1.1sp1-KB867460-X86.exe /q /C:"install /q"
4050:        w_try $WINE "$W_CACHE"/dotnet20/dotnetfx.exe /q /c:"install.exe /q"
4611:    w_try $WINE "$W_CACHE"/kindle/$file1 ${W_OPT_UNATTENDED:+ /S}
4655:    w_try $WINE "$W_CACHE"/mdac27/mdac_typ.exe ${W_OPT_UNATTENDED:+ /q 
/C:"setup /QNT"}
5002:    w_try $WINE msiexec /i "$W_CACHE"/msxml6/msxml6_x86.msi 
$W_UNATTENDED_SLASH_Q
5470:        w_try $WINE "$W_CACHE"/vb6run/VB6.0-KB290887-X86.exe 
"/T:$W_TMP_WIN" /c $W_UNATTENDED_SLASH_Q
5502:        w_try $WINE "$W_CACHE"/vcrun6/vc6redistsetup_enu.exe 
"/T:$W_TMP_WIN" /c $W_UNATTENDED_SLASH_Q
5718:        w_try $WINE "$W_CACHE"/vjrun20/vjredist.exe /q /C:"install /QNT"
7355:    $WINE "$W_CACHE"/nook/$file1 ${W_OPT_UNATTENDED:+ /S}
9851:    w_try $WINE "$W_CACHE/$W_PACKAGE/$file1" ${W_OPT_UNATTENDED:+ /sp- 
/silent /norestart}

Original comment by t...@hush.ai on 16 May 2011 at 4:17

GoogleCodeExporter commented 8 years ago
In general, the way to fix these is to change
  $WINE "$DIR/file"
into
  cd "$DIR"
  $WINE "file"
but they have to be tested individually.

Original comment by daniel.r...@gmail.com on 16 May 2011 at 4:37

GoogleCodeExporter commented 8 years ago
I found this in winetricks:

 3127-    # System-specific variables
 3128-    case "$OS" in
 3129-     "Windows_NT")
 3130:        WINE=""

so it looks like the WINE variable is a no-op under Cygwin. Cygwin accepts 
slashes as a path separator, so most of these should work fine. The usage on 
line 5002 looks like the only one that might be a problem.

Original comment by t...@hush.ai on 17 May 2011 at 4:02

GoogleCodeExporter commented 8 years ago
You'd think so, but have a look at w_try:

    250     case "$1" in
    251     *.exe)
    252         chmod +x "$1" || true # don't care if it fails
    253         cmd /c "$@"
    254         ;;
    255     *)

cmd doesn't look kindly upon slashes.

Original comment by daniel.r...@gmail.com on 17 May 2011 at 4:41

GoogleCodeExporter commented 8 years ago
That said, verbs that install things already on windows xp by default
are unlikely to need to be fixed.  So it's more the recent mistakes
(e.g. nook and kindle) that need fixing.

Original comment by daniel.r...@gmail.com on 17 May 2011 at 2:57

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r603.

Original comment by daniel.r...@gmail.com on 18 May 2011 at 4:54