Skip to content

Commit

Permalink
Require Windows Vista SP2 or later
Browse files Browse the repository at this point in the history
With this CL, Mozc binaries are configured to run only on Windows Vista SP2 and later.  Windows XP and Windows Server 2003 are no longer supported.

Closes Issue 277.

BUG=Issue mozc:277
TEST=compile

git-svn-id: https://mozc.googlecode.com/svn/trunk@508 a6090854-d499-a067-5803-1114d4e51264
  • Loading branch information
yukawa committed Jan 25, 2015
1 parent 851af49 commit e373cda
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 58 deletions.
55 changes: 2 additions & 53 deletions src/base/system_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -903,62 +903,11 @@ bool SystemUtil::IsPlatformSupported() {
}
}
{
// Windows Vista SP1 <= |OSVERSION| < Windows 7: supported
// Windows Vista SP2 <= |OSVERSION| < Windows 7: supported
OSVERSIONINFOEX osvi = {};
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 6;
osvi.dwMinorVersion = 0;
osvi.wServicePackMajor = 1;
DWORDLONG conditional = 0;
VER_SET_CONDITION(conditional, VER_MAJORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(conditional, VER_MINORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(conditional, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
const DWORD typemask = VER_MAJORVERSION | VER_MINORVERSION |
VER_SERVICEPACKMAJOR;
if (::VerifyVersionInfo(&osvi, typemask, conditional) != 0) {
return true; // supported
}
}
{
// Windows Vista RTM <= |OSVERSION| < Windows Vista SP1: not supported
OSVERSIONINFOEX osvi = {};
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 6;
osvi.dwMinorVersion = 0;
osvi.wServicePackMajor = 0;
DWORDLONG conditional = 0;
VER_SET_CONDITION(conditional, VER_MAJORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(conditional, VER_MINORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(conditional, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
const DWORD typemask = VER_MAJORVERSION | VER_MINORVERSION |
VER_SERVICEPACKMAJOR;
if (::VerifyVersionInfo(&osvi, typemask, conditional) != 0) {
return false; // not supported
}
}
{
// Windows XP x64/Server 2003 <= |OSVERSION| < Windows Vista RTM: supported
// ---
// Note: We do not oficially support these platforms but allows users to
// install Mozc into them. See b/5182031 for the background information.
OSVERSIONINFOEX osvi = {};
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 5;
osvi.dwMinorVersion = 2;
DWORDLONG conditional = 0;
VER_SET_CONDITION(conditional, VER_MAJORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(conditional, VER_MINORVERSION, VER_GREATER_EQUAL);
const DWORD typemask = VER_MAJORVERSION | VER_MINORVERSION;
if (::VerifyVersionInfo(&osvi, typemask, conditional) != 0) {
return true; // supported
}
}
{
// Windows XP SP2 <= |OSVERSION| < Windows XP x64/Server 2003: supported
OSVERSIONINFOEX osvi = {};
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 5;
osvi.dwMinorVersion = 1;
osvi.wServicePackMajor = 2;
DWORDLONG conditional = 0;
VER_SET_CONDITION(conditional, VER_MAJORVERSION, VER_GREATER_EQUAL);
Expand All @@ -970,7 +919,7 @@ bool SystemUtil::IsPlatformSupported() {
return true; // supported
}
}
// |OSVERSION| < Windows XP SP2: not supported
// |OSVERSION| < Windows Vista SP2: not supported
return false; // not support
#else // !OS_LINUX && !OS_MACOSX && !OS_WIN
#error "Unsupported platform".
Expand Down
9 changes: 5 additions & 4 deletions src/gyp/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
'EnableUAC': 'true',
'UACExecutionLevel': '0', # level="asInvoker"
'UACUIAccess': 'false', # uiAccess="false"
'MinimumRequiredVersion': '6.00',
},
},
'msvs_configuration_attributes': {
Expand Down Expand Up @@ -677,8 +678,8 @@
'OS_WIN',
'UNICODE',
'WIN32',
'WIN32_IE=0x0600',
'WINVER=0x0501',
'WIN32_IE=0x0800',
'WINVER=0x0600',
'WIN32_LEAN_AND_MEAN',
'_ATL_ALL_WARNINGS',
'_ATL_ALLOW_CHAR_UNSIGNED',
Expand All @@ -688,8 +689,8 @@
'_STL_MSVC',
'_UNICODE',
'_WIN32',
'_WIN32_WINDOWS=0x0501',
'_WIN32_WINNT=0x0501',
'_WIN32_WINDOWS=0x0600',
'_WIN32_WINNT=0x0600',
'_WINDOWS',
],
'include_dirs': [
Expand Down
2 changes: 1 addition & 1 deletion src/mozc_version_template.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MAJOR=2
MINOR=16
BUILD=2034
BUILD=2035
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
Expand Down

0 comments on commit e373cda

Please sign in to comment.