Update platform and build requirements.

- Mac: Require 10.7+ deployment target and 10.9+ system version
  (see https://codereview.chromium.org/1615823003/).
- Windows: Changes references from VS2013 to VS2015.
This commit is contained in:
Marshall Greenblatt 2016-04-29 12:42:09 -04:00
parent 79c8f30d46
commit e690fa444c
8 changed files with 33 additions and 165 deletions

View File

@ -44,19 +44,21 @@
#
# - Linux requirements:
# Currently supported distributions include Debian Wheezy, Ubuntu Precise, and
# related. Newer versions will likely also work but may not have been tested.
# related. Ubuntu 14.04 64-bit is recommended. Newer versions will likely also
# work but may not have been tested.
# Required packages include:
# build-essential
# libgtk2.0-dev (required by the cefclient target only)
# libgtkglext1-dev (required by the cefclient target only)
#
# - Mac OS X requirements:
# Xcode 5 or newer building on Mac OS X 10.7 (Lion) or newer. The Xcode
# command-line tools must also be installed.
# Xcode 5 or newer building on Mac OS X 10.9 (Mavericks) or newer. Xcode 7.2
# and OS X 10.11 are recommended. The Xcode command-line tools must also be
# installed. Only 64-bit builds are supported on OS X.
#
# - Windows requirements:
# Visual Studio 2010 or newer building on Windows XP SP3 or newer. 64-bit
# version of Windows 7 or newer recommended.
# Visual Studio 2010 or newer building on Windows 7 or newer. Visual Studio
# 2015 Update 2 and Windows 10 64-bit are recommended.
#
# BUILD EXAMPLES
#
@ -77,15 +79,6 @@
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Mac OS X build using a 32-bit CEF binary distribution:
# Using the Xcode IDE:
# > cmake -G "Xcode" -DPROJECT_ARCH="i386" ..
# Open build\cef.xcodeproj in Xcode and select Product > Build.
#
# Using Ninja:
# > cmake -G "Ninja" -DPROJECT_ARCH="i386" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Mac OS X build using a 64-bit CEF binary distribution:
# Using the Xcode IDE:
# > cmake -G "Xcode" -DPROJECT_ARCH="x86_64" ..
@ -96,24 +89,24 @@
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 32-bit CEF binary distribution:
# Using the Visual Studio 2013 IDE:
# > cmake -G "Visual Studio 12" ..
# Using the Visual Studio 2015 IDE:
# > cmake -G "Visual Studio 14" ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2013 command-line tools:
# Using Ninja with Visual Studio 2015 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 64-bit CEF binary distribution:
# Using the Visual Studio 2013 IDE:
# > cmake -G "Visual Studio 12 Win64" ..
# Using the Visual Studio 2015 IDE:
# > cmake -G "Visual Studio 14 Win64" ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2013 command-line tools:
# Using Ninja with Visual Studio 2015 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat"
# > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
@ -352,7 +345,7 @@ if(OS_MACOSX)
endforeach()
# Target SDK.
set(CEF_TARGET_SDK "10.6")
set(CEF_TARGET_SDK "10.7")
set(CEF_COMPILER_FLAGS "${CEF_COMPILER_FLAGS} -mmacosx-version-min=${CEF_TARGET_SDK}")
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CEF_TARGET_SDK})
@ -468,7 +461,7 @@ if(OS_WINDOWS)
# Configure use of the sandbox.
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1800)
# The cef_sandbox.lib static library is currently built with VS2013. It will
# The cef_sandbox.lib static library is currently built with VS2015. It will
# not link successfully with other VS versions.
set(USE_SANDBOX OFF)
endif()

View File

@ -75,102 +75,8 @@
@interface UnderlayOpenGLHostingWindow : NSWindow
@end
// Copy of definitions from base/mac/sdk_forward_declarations.h.
// Forward declarations for APIs that are part of the 10.7 SDK. This will allow
// using them when building with the 10.6 SDK.
#if !defined(MAC_OS_X_VERSION_10_7) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
enum {
NSEventPhaseNone = 0, // event not associated with a phase.
NSEventPhaseBegan = 0x1 << 0,
NSEventPhaseStationary = 0x1 << 1,
NSEventPhaseChanged = 0x1 << 2,
NSEventPhaseEnded = 0x1 << 3,
NSEventPhaseCancelled = 0x1 << 4,
};
typedef NSUInteger NSEventPhase;
@interface NSEvent (LionSDK)
+ (BOOL)isSwipeTrackingFromScrollEventsEnabled;
- (NSEventPhase)phase;
- (CGFloat)scrollingDeltaX;
- (CGFloat)scrollingDeltaY;
- (BOOL)isDirectionInvertedFromDevice;
@end
@interface NSScreen (LionSDK)
- (CGFloat)backingScaleFactor;
- (NSRect)convertRectToBacking:(NSRect)aRect;
@end
@interface NSWindow (LionSDK)
- (CGFloat)backingScaleFactor;
@end
#endif // MAC_OS_X_VERSION_10_7
// The Mac OS X 10.6 SDK introduced new protocols used for delegates. These
// protocol defintions were not present in earlier releases of the Mac OS X
// SDK. In order to support building against the new SDK, which requires
// delegates to conform to these protocols, and earlier SDKs, which do not
// define these protocols at all, this file will provide empty protocol
// definitions when used with earlier SDK versions.
#if !defined(MAC_OS_X_VERSION_10_6) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
#define DEFINE_EMPTY_PROTOCOL(p) \
@protocol p \
@end
DEFINE_EMPTY_PROTOCOL(NSAlertDelegate)
DEFINE_EMPTY_PROTOCOL(NSApplicationDelegate)
DEFINE_EMPTY_PROTOCOL(NSControlTextEditingDelegate)
DEFINE_EMPTY_PROTOCOL(NSMatrixDelegate)
DEFINE_EMPTY_PROTOCOL(NSMenuDelegate)
DEFINE_EMPTY_PROTOCOL(NSOpenSavePanelDelegate)
DEFINE_EMPTY_PROTOCOL(NSOutlineViewDataSource)
DEFINE_EMPTY_PROTOCOL(NSOutlineViewDelegate)
DEFINE_EMPTY_PROTOCOL(NSSpeechSynthesizerDelegate)
DEFINE_EMPTY_PROTOCOL(NSSplitViewDelegate)
DEFINE_EMPTY_PROTOCOL(NSTableViewDataSource)
DEFINE_EMPTY_PROTOCOL(NSTableViewDelegate)
DEFINE_EMPTY_PROTOCOL(NSTextFieldDelegate)
DEFINE_EMPTY_PROTOCOL(NSTextViewDelegate)
DEFINE_EMPTY_PROTOCOL(NSWindowDelegate)
#undef DEFINE_EMPTY_PROTOCOL
#endif
#endif // USING_CHROMIUM_INCLUDES
// Forward declarations for APIs that are part of the 10.7 SDK. This will allow
// using them when building with the 10.6 SDK.
#if !defined(MAC_OS_X_VERSION_10_7) || \
MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
@interface NSView (NSOpenGLSurfaceResolutionLionAPI)
- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag;
@end
@interface NSView (LionAPI)
- (NSSize)convertSizeToBacking:(NSSize)aSize;
- (NSRect)convertRectToBacking:(NSRect)aRect;
- (NSRect)convertRectFromBacking:(NSRect)aRect;
@end
static NSString* const NSWindowDidChangeBackingPropertiesNotification =
@"NSWindowDidChangeBackingPropertiesNotification";
static NSString* const NSBackingPropertyOldScaleFactorKey =
@"NSBackingPropertyOldScaleFactorKey";
#endif // MAC_OS_X_VERSION_10_7
// All CEF client applications must subclass NSApplication and implement this
// protocol.
@protocol CefAppProtocol<CrAppControlProtocol>

View File

@ -87,29 +87,6 @@
namespace {
// This method will return YES for OS X versions 10.7.3 and later, and NO
// otherwise.
// Used to prevent a crash when building with the 10.7 SDK and accessing the
// notification below. See: http://crbug.com/260595.
BOOL SupportsBackingPropertiesChangedNotification() {
// windowDidChangeBackingProperties: method has been added to the
// NSWindowDelegate protocol in 10.7.3, at the same time as the
// NSWindowDidChangeBackingPropertiesNotification notification was added.
// If the protocol contains this method description, the notification should
// be supported as well.
Protocol* windowDelegateProtocol = NSProtocolFromString(@"NSWindowDelegate");
struct objc_method_description methodDescription =
protocol_getMethodDescription(
windowDelegateProtocol,
@selector(windowDidChangeBackingProperties:),
NO,
YES);
// If the protocol does not contain the method, the returned method
// description is {NULL, NULL}
return methodDescription.name != NULL || methodDescription.types != NULL;
}
NSString* const kCEFDragDummyPboardType = @"org.CEF.drag-dummy-type";
NSString* const kNSURLTitlePboardType = @"public.url-name";
@ -191,14 +168,10 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
}
- (void)dealloc {
static BOOL supportsBackingPropertiesNotification =
SupportsBackingPropertiesChangedNotification();
if (supportsBackingPropertiesNotification) {
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:NSWindowDidChangeBackingPropertiesNotification
object:nil];
}
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:NSWindowDidChangeBackingPropertiesNotification
object:nil];
[super dealloc];
}
@ -377,7 +350,6 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
}
- (void)shortCircuitScrollWheelEvent:(NSEvent*)event {
// Phase is only supported in OS-X 10.7 and newer.
if ([event phase] != NSEventPhaseEnded &&
[event phase] != NSEventPhaseCancelled)
return;
@ -391,7 +363,6 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
}
- (void)scrollWheel:(NSEvent*)event {
// Phase is only supported in OS-X 10.7 and newer.
// Use an NSEvent monitor to listen for the wheel-end end. This ensures that
// the event is received even when the mouse cursor is no longer over the
// view when the scrolling ends. Also it avoids sending duplicate scroll
@ -1483,17 +1454,11 @@ void BrowserWindowOsrMac::Create(ClientWindowHandle parent_handle,
// Determine the default scale factor.
[GLView(nsview_) resetDeviceScaleFactor];
// Backing property notifications crash on 10.6 when building with the 10.7
// SDK, see http://crbug.com/260595.
static BOOL supportsBackingPropertiesNotification =
SupportsBackingPropertiesChangedNotification();
if (supportsBackingPropertiesNotification) {
[[NSNotificationCenter defaultCenter]
addObserver:nsview_
selector:@selector(windowDidChangeBackingProperties:)
name:NSWindowDidChangeBackingPropertiesNotification
object:[nsview_ window]];
}
[[NSNotificationCenter defaultCenter]
addObserver:nsview_
selector:@selector(windowDidChangeBackingProperties:)
name:NSWindowDidChangeBackingPropertiesNotification
object:[nsview_ window]];
}
} // namespace client

View File

@ -24,7 +24,7 @@
// #define CEF_USE_SANDBOX 1
#if defined(CEF_USE_SANDBOX)
// The cef_sandbox.lib static library is currently built with VS2013. It may not
// The cef_sandbox.lib static library is currently built with VS2015. It may not
// link successfully with other VS versions.
#pragma comment(lib, "cef_sandbox.lib")
#endif

View File

@ -20,6 +20,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.9.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>

View File

@ -21,7 +21,7 @@
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.5.0</string>
<string>10.9.0</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>

View File

@ -20,6 +20,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.9.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>

View File

@ -21,7 +21,7 @@
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.5.0</string>
<string>10.9.0</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>