WineHQ
Wine Forums

Board index » WineHQ » Wine Help




 Page 1 of 1 [ 6 posts ] 



 
Author Message
 Post Posted: Sun Jun 02, 2019 8:19 am 
Offline
Newbie
Newbie

Joined: Sun Jun 02, 2019 7:36 am
Posts: 4
Hello everyone community's member! I'm new here, but I really want to share my observations on using Wine.

I'm always noticing that many operations in .bat/.cmd user scripts performs incorrectly with current (v4.x stable) native cmd.exe module. Maybe there's no such an objective to have 100% compatibility with original command processor, but let's be consistent: people who set "Windows version" to "Windows 7" (or different) in WineCfg will expect that command line will behave like in selected OS too. Moreover, incorrect executing batch scripts may even harm user's data in cases where he doesn't even expects that.

1) Commands "mode" and "chcp" are not supported, although they play important role in some cases.

2) Constructions like
Code:
for %%m in (blah blah) do if exist %%m (
    do something...
)

returns syntax error with "(" or tries to read "do something" first, although
Code:
for %%m in (blah blah) do (if exist %%m (
    do something...
))

already works correctly.

Also, there's technically valid code that doesn't want to work in wine too, returning
Can't find "%LauncherLoc%_%~l.ini" and "do " is not a program or correct command.
Code:
set AppLanguage=rus
set LauncherLoc=%cd%\launcher
for %%l in ("eng" "%AppLanguage%") do (
if exist "%LauncherLoc%_%%~l.ini" (
for /f "usebackq eol=; delims== tokens=1,*" %%a in ("%LauncherLoc%_%%~l.ini") do (
   call set "%%~a=%%~b"
)))


3) Empty lines in reading file (f.e. *.ini in example above) may be considered as empty commands and throw error, although they just must be skipped in normal command processor.

4) Console window doesn't clear itself correctly with "cls" command and draws old text behind the new one.

5) Command "start /b ..." (run external file inside of current console window) doesn't work as intended and runs external console window.

Installing cmd.exe from winetricks or copying cmd.exe from Windows XP over the original one helps with 2) and 3), but not with others. To make "mode" and "chcp" commands work, we also need to copy chcp.com, mode.com, ulib.dll and ureg.dll from Windows XP. Also, CLS still doesn't normally work. Why the native cmd module is still so incomplete?


Top 
 Post Posted: Mon Jun 03, 2019 1:50 pm 
Offline
Newbie
Newbie

Joined: Sun Jun 02, 2019 7:36 am
Posts: 4
Continuing my observations...

6) if Setlocal EnableDelayedExpansion is enabled, and some of for cycle variable used inside of target variable, then it doesn't expand in IF expression. F.e.
Set Var1=Blah blah...
for /l %%n in (1,1,9) do (

)


Top 
 Post Posted: Mon Jun 03, 2019 2:00 pm 
Offline
Newbie
Newbie

Joined: Sun Jun 02, 2019 7:36 am
Posts: 4
Continuing my observations...

6) if Setlocal EnableDelayedExpansion is enabled, and some of for cycle variable used inside of target variable, then it doesn't expand in IF expression. F.e.
Code:
Set Var1=Blah blah...
for /l %%n in (1,1,9) do (
    if exist "!Var%%n!" (
        rem do something...
    )
)

variable !Var%%n! won't expand (although in Windows 2000-10 do).

7) Transfering "> nul" over the () brackets reports and error: "" is not an appication or command. Example:
Code:
if exist "File.ext" (
    reg export "HKLM\Software\AppName"
    reg delete "HKLM\Software\AppName" /f
)> nul


8) MOVE command doesn't normally work with /y key and doesn't overwrite target file. Also it doesn't work on transferring files between disk partitions.

9) Variable of FOR cycle doesn't expand to next FOR /f cycle if it's used for reading files. F.e. in
Code:
for %%m in (eng rus ita) do (
for /f "usebackq delims== tokens=1,2" %%a in ("SomeFile_%%m.txt") do (
    rem do something...
))

cmd returns the error of missing "SomeFile_%%m.txt" file instead of read "SomeFile_rus.txt" file.

10) If we're specifying EOL=# in some file in FOR /f cycle, then empty lines will be read too, although they should normally not.

Maybe it's even not full list of bugs, although, figuring all of that out, I could adapt my batch scripts to be compatible with Wine console.


Top 
 Post Posted: Mon Jun 10, 2019 4:42 pm 
Offline
Level 7
Level 7
User avatar

Joined: Tue Nov 22, 2016 5:39 pm
Posts: 783
Did you report those issues as bugs already?


Top 
 Post Posted: Wed Jun 12, 2019 10:21 am 
Offline
Newbie
Newbie

Joined: Sun Jun 02, 2019 7:36 am
Posts: 4
DarkShadow44 wrote:
Did you report those issues as bugs already?

No. How can I do that? I'm newbie here amd just registered here after my Wine experience under Linux Mint 19.1...


Top 
 Post Posted: Wed Jun 12, 2019 12:53 pm 
Offline
Level 7
Level 7
User avatar

Joined: Tue Nov 22, 2016 5:39 pm
Posts: 783
The bugtracker is here: https://bugs.winehq.org/

You just need an account, then you can create bug reports. Those will get looked at by the wine devs, the forums are mostly for user help, devs don't necessarily patrol them.
When creating a bugreport, make sure you fill us in with as much information as you can, and please also link them here. :)


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 6 posts ] 




Board index » WineHQ » Wine Help


Who is online

Users browsing this forum: No registered users and 18 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: