mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 12:03:45 +00:00
- added winver settings nt2k, win30 and win20 (yes, some rare programs need this)
and *document* it (win98 was not documented previously) - OaBuildVersion: add value for NT4 SP6 - spelling fixes
This commit is contained in:
parent
d6deb6db91
commit
cb45438be2
4 changed files with 54 additions and 12 deletions
|
@ -352,9 +352,14 @@ HRESULT WINAPI UnRegisterTypeLib(
|
|||
* OLE 2.03 W98 SE orig. file !! 1993-95 10 3024
|
||||
* OLE 2.1 NT 1993-95 ?? ???
|
||||
* OLE 2.3.1 W95 23 700
|
||||
* OLE2 4.0 NT4SP6 1993-98 40 4277
|
||||
*/
|
||||
DWORD WINAPI OaBuildVersion16(void)
|
||||
{
|
||||
/* FIXME: I'd like to return the highest currently known version value
|
||||
* in case the user didn't force a --winver, but I don't know how
|
||||
* to retrieve the "versionForced" info from misc/version.c :(
|
||||
* (this would be useful in other places, too) */
|
||||
FIXME("Please report to a.mohr@mailto.de if you get version error messages !\n");
|
||||
switch(GetVersion() & 0x8000ffff) /* mask off build number */
|
||||
{
|
||||
|
@ -364,8 +369,10 @@ DWORD WINAPI OaBuildVersion16(void)
|
|||
return MAKELONG(700, 23); /* Win95A */
|
||||
case 0x80000a04: /* WIN98 */
|
||||
return MAKELONG(3024, 10); /* W98 SE */
|
||||
case 0x00000004: /* NT4 */
|
||||
return MAKELONG(4277, 40); /* NT4 SP6 */
|
||||
default:
|
||||
FIXME_(ole)("Version value not known yet. Please investigate it !");
|
||||
FIXME("Version value not known yet. Please investigate it !");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ Turn on synchronous display mode. Useful for debugging X11 graphics problems.
|
|||
Specify which Windows version
|
||||
.B wine
|
||||
should imitate.
|
||||
Possible arguments are: win31, win95, nt351, and nt40.
|
||||
Possible arguments are: win95, nt40, win31, nt2k, win98, nt351, win30 and win20.
|
||||
.PD 1
|
||||
.SH PROGRAM/ARGUMENTS
|
||||
The program name may be specified in DOS format (
|
||||
|
|
|
@ -82,7 +82,8 @@ static const struct option option_table[] =
|
|||
{ "dll", 0, 1, 1, do_dll,
|
||||
"--dll name Enable or disable built-in DLLs" },
|
||||
{ "dosver", 0, 1, 1, VERSION_ParseDosVersion,
|
||||
"--dosver x.xx DOS version to imitate (e.g. 6.22). Only valid with --winver win31" },
|
||||
"--dosver x.xx DOS version to imitate (e.g. 6.22)\n"
|
||||
" Only valid with --winver win31" },
|
||||
{ "help", 'h', 0, 0, do_help,
|
||||
"--help,-h Show this help message" },
|
||||
{ "language", 0, 1, 1, do_language,
|
||||
|
@ -95,7 +96,7 @@ static const struct option option_table[] =
|
|||
{ "version", 'v', 0, 0, do_version,
|
||||
"--version,-v Display the Wine version" },
|
||||
{ "winver", 0, 1, 1, VERSION_ParseWinVersion,
|
||||
"--winver Version to imitate (one of win31,win95,nt351,nt40)" },
|
||||
"--winver Version to imitate (win95,nt40,win31,nt2k,win98,nt351,win30,win20)" },
|
||||
{ NULL, 0, 0, 0, NULL, NULL } /* terminator */
|
||||
};
|
||||
|
||||
|
|
|
@ -26,11 +26,15 @@ DEFAULT_DEBUG_CHANNEL(ver);
|
|||
|
||||
typedef enum
|
||||
{
|
||||
WIN20, /* Windows 2.0 */
|
||||
WIN30, /* Windows 3.0 */
|
||||
WIN31, /* Windows 3.1 */
|
||||
WIN95, /* Windows 95 */
|
||||
WIN98, /* Windows 98 */
|
||||
/* insert Windows ME here as WINME if needed */
|
||||
NT351, /* Windows NT 3.51 */
|
||||
NT40, /* Windows NT 4.0 */
|
||||
NT2K, /* Windows 2000 */
|
||||
NB_WINDOWS_VERSIONS
|
||||
} WINDOWS_VERSION;
|
||||
|
||||
|
@ -44,6 +48,24 @@ typedef struct
|
|||
/* FIXME: compare values below with original and fix */
|
||||
static VERSION_DATA VersionData[NB_WINDOWS_VERSIONS] =
|
||||
{
|
||||
/* WIN20 FIXME: verify values */
|
||||
{
|
||||
MAKELONG( 0x0002, 0x0303 ), /* assume DOS 3.3 */
|
||||
MAKELONG( 0x0003, 0x8000 ),
|
||||
{
|
||||
sizeof(OSVERSIONINFOA), 2, 0, 0,
|
||||
VER_PLATFORM_WIN32s, "Win32s 1.3"
|
||||
}
|
||||
},
|
||||
/* WIN30 FIXME: verify values */
|
||||
{
|
||||
MAKELONG( 0x0003, 0x0500 ), /* assume DOS 5.00 */
|
||||
MAKELONG( 0x0003, 0x8000 ),
|
||||
{
|
||||
sizeof(OSVERSIONINFOA), 3, 0, 0,
|
||||
VER_PLATFORM_WIN32s, "Win32s 1.3"
|
||||
}
|
||||
},
|
||||
/* WIN31 */
|
||||
{
|
||||
MAKELONG( 0x0a03, 0x0616 ), /* DOS 6.22 */
|
||||
|
@ -86,18 +108,30 @@ static VERSION_DATA VersionData[NB_WINDOWS_VERSIONS] =
|
|||
0x05650004,
|
||||
{
|
||||
sizeof(OSVERSIONINFOA), 4, 0, 0x565,
|
||||
VER_PLATFORM_WIN32_NT, "Service Pack 3"
|
||||
VER_PLATFORM_WIN32_NT, "Service Pack 6"
|
||||
}
|
||||
},
|
||||
/* NT2K FIXME: verify values */
|
||||
{
|
||||
0x05000A03, /* ? */
|
||||
0x08930005, /* better build ? using 2195 (final) for now */
|
||||
{
|
||||
sizeof(OSVERSIONINFOA), 5, 0, 0x893,
|
||||
VER_PLATFORM_WIN32_NT, "FIXME: OS version string not known yet"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static const char *WinVersionNames[NB_WINDOWS_VERSIONS] =
|
||||
{
|
||||
"win20",
|
||||
"win30",
|
||||
"win31",
|
||||
"win95",
|
||||
"win98",
|
||||
"nt351",
|
||||
"nt40"
|
||||
"nt40",
|
||||
"nt2k"
|
||||
};
|
||||
|
||||
/* if one of the following dlls is importing ntdll the windows
|
||||
|
@ -162,10 +196,10 @@ void VERSION_ParseDosVersion( const char *arg )
|
|||
/**********************************************************************
|
||||
* VERSION_GetSystemDLLVersion
|
||||
*
|
||||
* This function tryes to figure out if a given (native) dll comes from
|
||||
* This function tries to figure out if a given (native) dll comes from
|
||||
* win95/98 or winnt. Since all values in the OptionalHeader are not a
|
||||
* usable hint, we test if a dll imports the ntdll.
|
||||
* This is at least working for all system-dlls like comctl32, comdlg32 and
|
||||
* This is at least working for all system dlls like comctl32, comdlg32 and
|
||||
* shell32.
|
||||
* If you have a better idea to figure this out...
|
||||
*/
|
||||
|
@ -242,13 +276,13 @@ DWORD VERSION_GetLinkedDllVersion(PDB *pdb)
|
|||
ophd->MajorImageVersion, ophd->MinorImageVersion,
|
||||
ophd->MajorSubsystemVersion, ophd->MinorSubsystemVersion);
|
||||
|
||||
/* test if it is a external (native) dll */
|
||||
/* test if it is an external (native) dll */
|
||||
if (!(wm->flags & WINE_MODREF_INTERNAL))
|
||||
{
|
||||
int i;
|
||||
for (i = 0; special_dlls[i]; i++)
|
||||
{
|
||||
/* test if it a special dll */
|
||||
/* test if it is a special dll */
|
||||
if (!strncasecmp(wm->modname, special_dlls[i], strlen(special_dlls[i]) ))
|
||||
{
|
||||
DWORD DllVersion = VERSION_GetSystemDLLVersion(wm->module);
|
||||
|
@ -287,7 +321,7 @@ DWORD VERSION_GetLinkedDllVersion(PDB *pdb)
|
|||
return NT351;
|
||||
}
|
||||
|
||||
/* the MajorSubsystemVersion is the only usable singn */
|
||||
/* the MajorSubsystemVersion is the only usable sign */
|
||||
if (ophd->MajorSubsystemVersion < 4)
|
||||
{
|
||||
if ( ophd->MajorOperatingSystemVersion == 1
|
||||
|
|
Loading…
Reference in a new issue