Hi, I had a problem loading a second program under wine. I called the first program with: wine --winver win2000 pgm1 I input a password and it wirtes a data file, unloads itself and loads a second program. But there was an error every time the second program was to start that send me to the debug screen. So I found misc/version.c line 196 that the default value to wine load a program was WIN31, so I changed it to NT2K.
Is there any problem doing this? If not, why is the default still WIN31?
Thanks, Ricardo.
On Mon, Apr 29, 2002 at 04:58:16PM -0300, Insyde wrote:
Hi, I had a problem loading a second program under wine. I called the first program with: wine --winver win2000 pgm1 I input a password and it wirtes a data file, unloads itself and loads a second program. But there was an error every time the second program was to start that send me to the debug screen. So I found misc/version.c line 196 that the default value to wine load a program was WIN31, so I changed it to NT2K.
Is there any problem doing this? If not, why is the default still WIN31?
No, it's *not*.
If you examine the code more closely, then you'll notice that defaultWinVersion only gets used in case versionForced is TRUE, which is only the case once defaultWinVersion gets set to an actually specified value.
I know, the code is sort of confusing if you don't examine it closely, so feel free to comment on how to improve the situation with regards to defaultWinVersion initialization (I'd like to not initialize it at all, since it isn't being used unless there's a user setting, but that's not very clean of course ;-)
Ok, it worked!!
Wine is NOT passing the --winver parameter to the child process. So what I did (I know that's not right, but I needed this working): Edit misc/version.c and changed line (193 of wine-20020411) static BOOL versionForced = FALSE; to static BOOL versionForced = TRUE;
and line (194 of wine-20020411) WINDOWS_VERSION = WIN31; to WINDOWS_VERSION = NT2K;
As I'm using NT2K DLLs, on a non-windows wine instalation, I didn't copy any of the DLLs wine implements, maybe wine can't guess what Windows version to use (no clue), just the DLLs needed by the program to run.
Why don't use something inside .wine/config or wine.conf like winver = "win98" to set the environment we want to use? If the user wants to override this he would use the command line so force a different one.
If someone can help me, I would be happy to try to do it.
Ricardo.
ps.: but please be patient, I'm not very skilled with C. :)