My console app doesn't run in wine

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Nobuo T
Newbie
Newbie
Posts: 4
Joined: Tue Jan 13, 2009 12:10 pm

My console app doesn't run in wine

Post by Nobuo T »

Hi,

Dunno wether it's a problem in my app or wine, so I thought I'd better post here first before going to bugzilla. So pardon me if I'm wrong here with this.

I wrote a Win32 console app which runs without problems on at least Win98 and WinXP.
If I start it by doubleclick it also seems to run fine in wine (as far as it runs as a console app started without any command line args ;) ) but it doesn't run if I start it from command line (of course also without args - just "wine wmod.exe").
Then it fails to resize the console with SetConsoleScreenBufferSize and also to write anything to screen with WriteConsoleA.
I use the latest stable wine release (? 1.0.1) and start the app from the Ubuntu 8.10 preinstalled Terminal window.

These should be the relevant wine debug messages:
0009:Call KERNEL32.GetStdHandle(fffffff6) ret=0040aada
0009:Ret KERNEL32.GetStdHandle() retval=00000004 ret=0040aada
0009:Call KERNEL32.GetStdHandle(fffffff5) ret=0040aae6
0009:Ret KERNEL32.GetStdHandle() retval=00000008 ret=0040aae6
0009:Call KERNEL32.GetConsoleScreenBufferInfo(00000008,0040c27c) ret=0040ab06
0009:Ret KERNEL32.GetConsoleScreenBufferInfo() retval=00000000 ret=0040ab06
0009:Call KERNEL32.SetConsoleScreenBufferSize(00000008,00190050) ret=0040ab30
0009:Ret KERNEL32.SetConsoleScreenBufferSize() retval=00000000 ret=0040ab30
0009:Call KERNEL32.WriteConsoleA(00000008,0040ab58,00000032,0032ff08,00000000) ret=0040ab4c
0009:Ret KERNEL32.WriteConsoleA() retval=00000000 ret=0040ab4c
0009:Call KERNEL32.ExitProcess(00000065) ret=0040ab58

Thanks in advance.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

My console app doesn't run in wine

Post by austin987 »

On Tue, Jan 13, 2009 at 12:09 PM, Nobuo T <[email protected]> wrote:
Hi,

Dunno wether it's a problem in my app or wine, so I thought I'd better post here first before going to bugzilla. So pardon me if I'm wrong here with this.

I wrote a Win32 console app which runs without problems on at least Win98 and WinXP.
If I start it by doubleclick it also seems to run fine in wine (as far as it runs as a console app started without any command line args ;) ) but it doesn't run if I start it from command line (of course also without args - just "wine wmod.exe").
Then it fails to resize the console with SetConsoleScreenBufferSize and also to write anything to screen with WriteConsoleA.
I use the latest stable wine release (? 1.0.1) and start the app from the Ubuntu 8.10 preinstalled Terminal window.

These should be the relevant wine debug messages:
0009:Call KERNEL32.GetStdHandle(fffffff6) ret=0040aada
0009:Ret KERNEL32.GetStdHandle() retval=00000004 ret=0040aada
0009:Call KERNEL32.GetStdHandle(fffffff5) ret=0040aae6
0009:Ret KERNEL32.GetStdHandle() retval=00000008 ret=0040aae6
0009:Call KERNEL32.GetConsoleScreenBufferInfo(00000008,0040c27c) ret=0040ab06
0009:Ret KERNEL32.GetConsoleScreenBufferInfo() retval=00000000 ret=0040ab06
0009:Call KERNEL32.SetConsoleScreenBufferSize(00000008,00190050) ret=0040ab30
0009:Ret KERNEL32.SetConsoleScreenBufferSize() retval=00000000 ret=0040ab30
0009:Call KERNEL32.WriteConsoleA(00000008,0040ab58,00000032,0032ff08,00000000) ret=0040ab4c
0009:Ret KERNEL32.WriteConsoleA() retval=00000000 ret=0040ab4c
0009:Call KERNEL32.ExitProcess(00000065) ret=0040ab58

Thanks in advance.





Try:

$ wine cmd.exe
wmod.exe

Or:
$ wine start wmod.exe
--
-Austin
Plamen.Vassilev
Level 2
Level 2
Posts: 25
Joined: Thu Mar 13, 2008 7:41 am

wineconsole ?

Post by Plamen.Vassilev »

wineconsole [options] <command>
Nobuo T
Newbie
Newbie
Posts: 4
Joined: Tue Jan 13, 2009 12:10 pm

Post by Nobuo T »

Ok, wine start wmod.exe [args] is the only option that worked, although the character set in the new window that opened to run the app looked not exactly like what you'd expect in a Win console. :roll:

Starting from cmd seems to have the same problem as just starting with "wine" and wineconsole says " Starten des Programms "wmod.exe D:\\Modules\\ITs\\converts\\SM.it" fehlgeschlagen.
Der Befehl ist ungültig."
What roughly means it couldn't start because the command in quotes is invalid. :?:
Nobuo T
Newbie
Newbie
Posts: 4
Joined: Tue Jan 13, 2009 12:10 pm

Post by Nobuo T »

Sry to bother again, but my questions still aren't really answered yet.

1. Now is this first described problem intended behaviour, a missing feature, or a bug in wine worth reporting? At least the faq doesn't say you have to use "wine start" or "wineconsole" to run console apps...

2. Is it normal that wine displays nearly all characters that are not in \w as the same square sign (with ncurs and user)? How can I make it use some font that looks more like standard VGA?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

Nobuo T wrote:Sry to bother again, but my questions still aren't really answered yet.

1. Now is this first described problem intended behaviour, a missing feature, or a bug in wine worth reporting? At least the faq doesn't say you have to use "wine start" or "wineconsole" to run console apps...
Wine uses wineconsole only when explicitly asked for. And it's needed to fully emulate windows' console which is highly not compatible with standard *NIX terminal.
Nobuo T wrote:2. Is it normal that wine displays nearly all characters that are not in \w as the same square sign (with ncurs and user)? How can I make it use some font that looks more like standard VGA?
This is a known problem. Console apps display text in wrong locale.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

A bit irrelevant to your problem, but what does your program do? I create IT module music every once in a while and I kind of like tools surrounding these kind of things, so...
Nobuo T
Newbie
Newbie
Posts: 4
Joined: Tue Jan 13, 2009 12:10 pm

Post by Nobuo T »

vitamin wrote:Wine uses wineconsole only when explicitly asked for. And it's needed to fully emulate windows' console which is highly not compatible with standard *NIX terminal.
Ok, so it IS a missing feature - at least there could be an option in the settings in what way to run console apps by default... :roll:
vitamin wrote:This is a known problem. Console apps display text in wrong locale.
Well, yes "wrong locale" - it also especially displays special text mode characters like lines, blocks, etc. (char >127) you use to draw "windows", bars and stuff in the console wrong.
DaVince wrote:A bit irrelevant to your problem, but what does your program do? I create IT module music every once in a while and I kind of like tools surrounding these kind of things, so...
It's just yet another .it-player for DOS and Win32 (probably also for native linux soon). :P
Like the original impulse tracker completely written in asm.
It's called pmmod - you can download it from my website (if you don't mind all the german :lol: ) in the "Assembler" section.
Locked