Added alias capability to --winver.
win2000 is the official value.
This commit is contained in:
parent
71d68bbae0
commit
c3350c537e
@ -249,7 +249,8 @@ Turn on synchronous display mode. Useful for debugging X11 graphics problems.
|
|||||||
Specify which Windows version
|
Specify which Windows version
|
||||||
.B wine
|
.B wine
|
||||||
should imitate.
|
should imitate.
|
||||||
Possible arguments are: win95, nt40, win31, nt2k, win98, nt351, win30 and win20.
|
Possible arguments are: win95, nt40, win31, win2000, win98, nt351, win30
|
||||||
|
and win20.
|
||||||
.PD 1
|
.PD 1
|
||||||
.SH PROGRAM/ARGUMENTS
|
.SH PROGRAM/ARGUMENTS
|
||||||
The program name may be specified in DOS format (
|
The program name may be specified in DOS format (
|
||||||
|
@ -122,7 +122,7 @@ static VERSION_DATA VersionData[NB_WINDOWS_VERSIONS] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const char *WinVersionNames[NB_WINDOWS_VERSIONS] =
|
static const char *WinVersionNames[NB_WINDOWS_VERSIONS] =
|
||||||
{
|
{ /* no spaces in here ! */
|
||||||
"win20",
|
"win20",
|
||||||
"win30",
|
"win30",
|
||||||
"win31",
|
"win31",
|
||||||
@ -130,7 +130,7 @@ static const char *WinVersionNames[NB_WINDOWS_VERSIONS] =
|
|||||||
"win98",
|
"win98",
|
||||||
"nt351",
|
"nt351",
|
||||||
"nt40",
|
"nt40",
|
||||||
"nt2k"
|
"win2000,win2k,nt2k,nt2000"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* if one of the following dlls is importing ntdll the windows
|
/* if one of the following dlls is importing ntdll the windows
|
||||||
@ -154,21 +154,36 @@ static WINDOWS_VERSION defaultWinVersion = WIN31;
|
|||||||
*/
|
*/
|
||||||
void VERSION_ParseWinVersion( const char *arg )
|
void VERSION_ParseWinVersion( const char *arg )
|
||||||
{
|
{
|
||||||
int i;
|
int i, len;
|
||||||
|
const char *pCurr, *p;
|
||||||
for (i = 0; i < NB_WINDOWS_VERSIONS; i++)
|
for (i = 0; i < NB_WINDOWS_VERSIONS; i++)
|
||||||
{
|
{
|
||||||
if (!strcmp( WinVersionNames[i], arg ))
|
pCurr = WinVersionNames[i];
|
||||||
{
|
/* iterate through all winver aliases separated by comma */
|
||||||
defaultWinVersion = (WINDOWS_VERSION)i;
|
do {
|
||||||
versionForced = TRUE;
|
p = strchr(pCurr, ',');
|
||||||
return;
|
len = p ? (int)p - (int)pCurr : strlen(pCurr);
|
||||||
}
|
if ( (!strncmp( pCurr, arg, len )) && (arg[len] == '\0') )
|
||||||
|
{
|
||||||
|
defaultWinVersion = (WINDOWS_VERSION)i;
|
||||||
|
versionForced = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pCurr = p+1;
|
||||||
|
} while (p);
|
||||||
}
|
}
|
||||||
MESSAGE("Invalid winver value '%s' specified.\n", arg );
|
MESSAGE("Invalid winver value '%s' specified.\n", arg );
|
||||||
MESSAGE("Valid versions are:" );
|
MESSAGE("Valid versions are:" );
|
||||||
for (i = 0; i < NB_WINDOWS_VERSIONS; i++)
|
for (i = 0; i < NB_WINDOWS_VERSIONS; i++)
|
||||||
MESSAGE(" '%s'%c", WinVersionNames[i],
|
{
|
||||||
(i == NB_WINDOWS_VERSIONS - 1) ? '\n' : ',' );
|
/* only list the first, "official" alias in case of aliases */
|
||||||
|
pCurr = WinVersionNames[i];
|
||||||
|
p = strchr(pCurr, ',');
|
||||||
|
len = (p) ? (int)p - (int)pCurr : strlen(pCurr);
|
||||||
|
|
||||||
|
MESSAGE(" '%.*s'%c", len, pCurr,
|
||||||
|
(i == NB_WINDOWS_VERSIONS - 1) ? '\n' : ',' );
|
||||||
|
}
|
||||||
ExitProcess(1);
|
ExitProcess(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user