https://bugs.winehq.org/show_bug.cgi?id=50132
Bug ID: 50132
Summary: Command line: Incorrect behaviors in FOR () and IF ()
blocks
Product: Wine
Version: 5.21
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: cmd
Assignee: wine-bugs(a)winehq.org
Reporter: Psycho-A(a)yandex.ru
Distribution: ---
The native CMD.exe contains many syntax and other errors related to the FOR and
IF commands processing inside of ()-blocks. This is very importans for apps
that require complex batch scripts on run. Let's begin.
Case 1:
-------
Different behavior when using brackets after "DO"
:: Returns ")" error:
for %%a in (*.txt) do if #==# (
echo File: "%%~a"
)
:: Works normal:
for %%a in (*.txt) do (if #==# (
echo File: "%%~a"
))
:: Works normal:
for %%a in (*.txt) do if #==# echo File: "%%~a"
In Windows CMD all three results works the same (returns ECHO text).
Case 2:
-------
Reading empty lines of text file if EOL=# specified
:: ECHO will return "" text here:
for /f "usebackq eol=: tokens=1" %%a in ("File.txt") do (
echo "%%~a"
)
Windows CMD skips empty lines anyway.
Case 3:
-------
Error behavior if an empty line with Space ot Tab is defined in body
:: Will return ")" error:
if #==# (
echo Some text
)
:: Just will show ECHO text:
if #==# (
echo Some text
)
Case 4:
-------
Not-expanding variables from parent cycle child one
:: Will show "%~m" in child cycles:
for %%f in (*.txt) do (
echo In parent cycle: "%%~f"
for %%x in ("%%~f") do (
echo In child cycle: "%%~x"
)
)
:: Will seek in "%~f" dir instead of "Folder1":
for %%f in ("Folder1") do (
for /r "%%~f" %%x in (*.txt) do (
echo "%%~x"
)
)
Windows CMD expands "%%f" in any child cycle's place.
Case 5:
-------
Error if no quotes in file/command condition
:: Returns "DO is not an application" error:
for /f %%a in (File.txt) do (
echo "%%~a"
)
:: Reads strings of File.txt:
for /f "usebackq" %%a in ("File.txt") do (
echo "%%~a"
)
Windows CMD reads file in both cases
("usebackq" uses to use quotes around filename).
This error appears only when target file not found.
Case 6:
-------
Using global ">" redirection after ()-body issue:
:: Will show ECHO text and create empty Test.bug
if #==# (
echo Text 1...
echo Text 2...
)> "Test.bug"
:: Will write Test.bug with echo text (normal case)
if #==# (
echo Text 1...> "Test.bug"
echo Text 2...> "Test.bug"
)
Windows CMD does the same as second in both cases.
Case 7:
-------
Incorrect IF() ELSE() processing if FOR() inside
:: Returns "ELSE is not an application" error:
if #==# (
echo IF condition.
for %%m in (*.txt) do (
echo FOR cycle.
)
) else (
echo ELSE condition.
)
:: Works normally:
if #==# (
echo IF condition.
) else (
echo ELSE condition.
)
Also ELSE works normal when IF condition is NOT equal.
Case 8:
-------
No processing file mask if it's quoted
:: Returns txt files that found:
for %%f in (*.txt) do (
echo "%%~f"
)
:: Returns nothing
for %%f in ("*.txt") do (echo "%%~f")
for %%f in ("Dir\*.txt") do (echo "%%~f")
The same is if FOR with /R key is used.
For now that's all I found.
Some of Wine 4.x bugs I knew seems to be fixed already.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=47486
Bug ID: 47486
Summary: GsView draws one menu item with white background
Product: Wine
Version: 4.11
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs(a)winehq.org
Reporter: dark.shadow4(a)web.de
Distribution: ---
Created attachment 64866
--> https://bugs.winehq.org/attachment.cgi?id=64866
Screenshot on wine
See screenshot.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52484
Bug ID: 52484
Summary: ShaderGlass crashes on startup
Product: Wine
Version: 7.1
Hardware: x86-64
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs(a)winehq.org
Reporter: jeffz(a)jeffz.name
Distribution: ---
$ wine ShaderGlass.exe
007c:fixme:imm:ImeSetActiveContext (0x3e020, 0): stub
007c:fixme:imm:ImmReleaseContext (0000000000010020, 000000000003E020): stub
002c:fixme:imm:ImeSetActiveContext (0x412a0, 1): stub
002c:fixme:imm:ImmReleaseContext (000000000001004A, 00000000000412A0): stub
wine: configuration in L"/home/jeffz/.wine-shaderglass" has been updated.
0130:fixme:combase:RoGetActivationFactory
(L"Windows.Foundation.Metadata.ApiInformation",
{997439fe-f681-4a11-b416-c13a47e8ba36}, 000000000011F6F0): semi-stub
0130:err:combase:RoGetActivationFactory Failed to find library for
L"Windows.Foundation.Metadata.ApiInformation"
0130:fixme:combase:RoOriginateLanguageException (80040154 L"" 0000000000000000)
stub
0130:fixme:imm:ImeSetActiveContext (0x165ac0, 1): stub
0130:fixme:imm:ImmReleaseContext (0000000000050056, 0000000000165AC0): stub
wine: Unhandled exception 0x80000003 in thread 130 at address 00000001700574C4
(thread 0130), starting debugger...
0138:fixme:imm:ImeSetActiveContext (0x34f00, 1): stub
0138:fixme:imm:ImmReleaseContext (0000000000060072, 0000000000034F00): stub
RtlDefaultNpAcl () at Z:\usr\src\packages\BUILD\dlls\ntdll\sec.c:1731
0x00000001700574c4 ntdll+0x574c4
[Z:\usr\src\packages\BUILD\dlls\ntdll\sec.c:1731]: int $3
Unable to access file 'Z:\usr\src\packages\BUILD\dlls\ntdll\sec.c'
System information:
Wine build: wine-7.1
Platform: x86_64
Version: Windows 7
Host system: Linux
Host version: 5.13.0-27-generic
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50876
Bug ID: 50876
Summary: Sid Meier's SimGolf does not render properly
Product: Wine
Version: 6.3
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: directx-d3d
Assignee: wine-bugs(a)winehq.org
Reporter: haakobja(a)gmail.com
Distribution: ---
Created attachment 69686
--> https://bugs.winehq.org/attachment.cgi?id=69686
Screenshot of the bug
The terrain in SimGolf is not rendering properly. I've attached a screenshot
and a trace log, however I'm not certain where this problem occur, but it's
probably a rendering problem.
I didn't get anything when using the following debug channels:
+ddraw,+d2d,+d3d. In the attached log, I've used
+all,-relay,-dsound,-heap,-pulse,-sync, which might provide a log with too much
information.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=47071
Bug ID: 47071
Summary: Nest or mixed "FOR" and "IF" command sometimes get
different result in Wine and Windows.
Product: Wine
Version: 3.0
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: cmd
Assignee: wine-bugs(a)winehq.org
Reporter: mzidbh(a)hotmail.com
Distribution: ---
Created attachment 64257
--> https://bugs.winehq.org/attachment.cgi?id=64257
batch files and snapshots of execution result
The Wine's command interpreter seems to ...
1. could not pair "IF" and "ELSE" correctly. ( Case 1 4 )
2. would ignore scripts after inner "ELSE". ( Case 2 3 )
Case 1
========================================
@ECHO OFF
ECHO FOR in IF 01 :
IF 1 EQU 1 (
FOR %%A IN (1,1) DO (
ECHO A=%%A
)
) ELSE (
ECHO This line should NOT be executed.
)
ECHO This line should be executed.
EXIT /B
----------------------------------------
Result in WINE 3.0
----------------------------------------
FOR in IF 01 :
A=1
A=1
Can't recognize 'ELSE ' as an internal or external command, or batch script.
This line should NOT be executed.
This line should be executed.
----------------------------------------
Result in Windows 7
----------------------------------------
FOR in IF 01 :
A=1
A=1
This line should be executed.
========================================
Case 2
========================================
@ECHO OFF
ECHO IF in FOR 01 :
FOR %%A IN (1,1) DO (
IF 1 EQU 1 (
ECHO This line should be executed. [No.1]
) ELSE (
ECHO This line should NOT be executed.
)
ECHO This line should be executed. [No.2]
)
EXIT /B
----------------------------------------
Result in WINE 3.0
----------------------------------------
IF in FOR 01 :
This line should be executed. [No.1]
This line should be executed. [No.1]
----------------------------------------
Result in Windows 7
----------------------------------------
IF in FOR 01 :
This line should be executed. [No.1]
This line should be executed. [No.2]
This line should be executed. [No.1]
This line should be executed. [No.2]
========================================
Case 3
========================================
@ECHO OFF
ECHO IF in IF 01 :
IF 1 EQU 1 (
IF 1 EQU 1 (
ECHO This line should be executed. [No.1]
) ELSE (
ECHO This line should NOT be executed. [No.1]
)
ECHO This line should be executed. [No.2]
) ELSE (
ECHO This line should NOT be executed. [No.2]
)
EXIT /B
----------------------------------------
Result in WINE 3.0
----------------------------------------
IF in IF 01 :
This line should be executed. [No.1]
----------------------------------------
Result in Windows 7
----------------------------------------
IF in IF 01 :
This line should be executed. [No.1]
This line should be executed. [No.2]
========================================
Case 4
========================================
@ECHO OFF
ECHO IF in IF 04 :
IF 4 EQU 4 (
IF 4 EQU 5 CALL :Label1
ECHO This line should be executed. [No.1]
) ELSE (
ECHO This line should NOT be executed. [No.2]
)
GOTO :Label2
:Label1
ECHO This line should NOT be executed. [No.1]
GOTO :EOF
:Label2
EXIT /B
----------------------------------------
Result in WINE 3.0
----------------------------------------
IF in IF 04 :
This line should NOT be executed. [No.2]
----------------------------------------
Result in Windows 7
----------------------------------------
IF in IF 04 :
This line should be executed. [No.1]
========================================
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49993
Bug ID: 49993
Summary: CUERipper 2.1.6 and 2.1.7 do not run with wine-mono
Product: Wine
Version: 5.19
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: mscoree
Assignee: wine-bugs(a)winehq.org
Reporter: toadking(a)toadking.com
Distribution: ---
When trying to run CUERipper 2.1.7, wine fails with this error:
Unhandled Exception:
System.TypeLoadException: Could not resolve type with token 01000085 from
typeref (expected class 'System.Deployment.Application.DeploymentException' in
assembly 'System.Deployment, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a')
at CUERipper.Program.Main () [0x00035] in
<5c4f365916584c81bcdf752cec08f1e3>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not resolve
type with token 01000085 from typeref (expected class
'System.Deployment.Application.DeploymentException' in assembly
'System.Deployment, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a')
Version 2.1.6 fails with a similar error, only for dotnet 2.0 instead of 4.0
Unhandled Exception:
System.TypeLoadException: Could not resolve type with token 01000116 from
typeref (expected class 'System.Deployment.Application.DeploymentException' in
assembly 'System.Deployment, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a')
at CUERipper.Program.Main () [0x0003a] in
<6963147f6a904857af87d170dcff6c6e>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not resolve
type with token 01000116 from typeref (expected class
'System.Deployment.Application.DeploymentException' in assembly
'System.Deployment, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a')
Installing dotnet40 or dotnet20 for their respective versions allows them to
run.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=47798
Bug ID: 47798
Summary: Incorrect substring result using
enableDelayedExpansion
Product: Wine
Version: 4.16
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: cmd
Assignee: wine-bugs(a)winehq.org
Reporter: lois.diqual(a)gmail.com
Distribution: ---
Created attachment 65289
--> https://bugs.winehq.org/attachment.cgi?id=65289
Test file
Batch variable substring yields incorrect results when using
enableDelayedExpansion.
setlocal enableDelayedExpansion
set foo=bar
echo "!foo:~0,2!"
endlocal
Expected output: "ba"
Actual output:
- Wine cmd: "~0,2"
- Windows cmd: "ba"
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43337
Bug ID: 43337
Summary: Conditional command with parentheses not working.
Product: Wine
Version: unspecified
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: cmd
Assignee: wine-bugs(a)winehq.org
Reporter: distjubo(a)gmail.com
Distribution: ---
If a conditional command contains parentheses, it fails to execute properly.
Example 1:
Command:
echo C:\Program Files (x86)\
Output:
C:\Program Files (x86)\
Example 2:
Command:
if ""=="" echo C:\Program Files (x86)\
Example 2 fails to execute. On Windows, the output of Example 1 and Example 2
are identical, but wine complains about not having found the command "x86".
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52344
Bug ID: 52344
Summary: Can't substitute variables as a command
Product: Wine
Version: 6.0.2
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs(a)winehq.org
Reporter: EmilySeville7cf(a)gmail.com
Distribution: ---
Created attachment 71511
--> https://bugs.winehq.org/attachment.cgi?id=71511
Bug screenshot
In Windows environment (10.0.19043.1415) everything works fine.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.