Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

CEF 2171 #492

Merged
merged 2 commits into from
Dec 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function (grunt) {
resolve = common.resolve,
platform = common.platform(),
staging;

if (platform === "mac") {
staging = "installer/mac/staging/<%= build.name %>.app/Contents";
} else if (platform === "win") {
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = function (grunt) {
/* mac */
"cef-mac": {
"dest" : "<%= downloads %>",
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_macosx.zip"
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_macosx32.zip"
},
"cef-mac-symbols": {
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_macosx32_release_symbols.zip",
Expand All @@ -76,7 +76,7 @@ module.exports = function (grunt) {
/* win */
"cef-win": {
"dest" : "<%= downloads %>",
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_windows.zip"
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_windows32.zip"
},
"cef-win-symbols": {
"src" : ["<%= cef.url %>/cef_binary_<%= cef.version %>_windows32_debug_symbols.zip", "<%= cef.url %>/cef_binary_<%= cef.version %>_windows32_release_symbols.zip"],
Expand Down Expand Up @@ -110,8 +110,10 @@ module.exports = function (grunt) {
"Brackets.exe",
"node.exe",
"cef.pak",
"cef_100_percent.pak",
"cef_200_percent.pak",
"devtools_resources.pak",
"icudt.dll",
"icudtl.dat",
"libcef.dll"
],
"dest" : "installer/win/staging/"
Expand Down Expand Up @@ -218,7 +220,7 @@ module.exports = function (grunt) {
},
"cef": {
"url" : "http://s3.amazonaws.com/files.brackets.io/cef",
"version" : "3.1547.1459"
"version" : "3.2171.1902"
},
"node": {
"version" : "0.10.24"
Expand Down
20 changes: 20 additions & 0 deletions appshell.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<!--The compatibility section will be merged from build/win/compatibility.manifest -->

<dependency>
<dependentAssembly>
<assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" />
</requestedPrivileges>
</security>
</trustInfo>

</assembly>
139 changes: 110 additions & 29 deletions appshell.gyp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
# Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.

Expand All @@ -7,11 +7,17 @@
'pkg-config': 'pkg-config',
'target_arch%': 'environment',
'chromium_code': 1,
'framework_name': 'Chromium Embedded Framework',
'linux_use_gold_binary': 0,
'linux_use_gold_flags': 0,
'conditions': [
[ 'OS=="mac"', {
# Don't use clang with CEF binary releases due to Chromium tree structure dependency.
'clang': 0,
}]
}],
[ 'OS=="win"', {
'multi_threaded_dll%': 0,
}],
]
},
'includes': [
Expand All @@ -27,7 +33,11 @@
'SDKROOT': '',
'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x',
'COMBINE_HIDPI_IMAGES': 'YES',
'ARCHS': "$(ARCHS_STANDARD_32_BIT)"
'ARCHS': "$(ARCHS_STANDARD_32_BIT)",
'FRAMEWORK_SEARCH_PATHS': [
'$(inherited)',
'$(CONFIGURATION)'
]
},
},
'targets': [
Expand Down Expand Up @@ -78,11 +88,34 @@
},
},
},
'variables': {
'win_exe_compatibility_manifest': 'compatibility.manifest',
'xparams': "/efy",
},
'actions': [
{
'action_name': 'copy_resources',
'msvs_cygwin_shell': 0,
'inputs': [],
'outputs': [
'<(PRODUCT_DIR)/copy_resources.stamp',
],
'action': [
'xcopy <(xparams)',
'Resources\*',
'$(OutDir)',
],
},
],
'msvs_settings': {
'VCLinkerTool': {
# Set /SUBSYSTEM:WINDOWS.
'SubSystem': '2',
'EntryPointSymbol' : 'wWinMainCRTStartup',
},
'VCManifestTool': {
'AdditionalManifestFiles': [
'appshell.exe.manifest',
],
},
},
'link_settings': {
Expand All @@ -92,9 +125,13 @@
'-lrpcrt4.lib',
'-lopengl32.lib',
'-lglu32.lib',
'-l$(ConfigurationName)/libcef.lib'
'-l$(ConfigurationName)/libcef.lib',
],
},
'library_dirs': [
# Needed to find cef_sandbox.lib using #pragma comment(lib, ...).
'$(ConfigurationName)',
],
'sources': [
'<@(includes_win)',
'<@(appshell_sources_win)',
Expand Down Expand Up @@ -125,6 +162,26 @@
}
],
}],
[ 'OS=="win" and multi_threaded_dll', {
'configurations': {
'Debug': {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 3,
'WarnAsError': 'false',
},
},
},
'Release': {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 2,
'WarnAsError': 'false',
},
},
}
}
}],
[ 'OS=="mac"', {
'product_name': '<(appname)',
'dependencies': [
Expand All @@ -133,34 +190,29 @@
'copies': [
{
# Add library dependencies to the bundle.
'destination': '<(PRODUCT_DIR)/<(appname).app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/',
'files': [
'$(CONFIGURATION)/libcef.dylib',
],
},
{
# Add other resources to the bundle.
'destination': '<(PRODUCT_DIR)/<(appname).app/Contents/Frameworks/Chromium Embedded Framework.framework/',
'files': [
'Resources/',
],
},
{
# Add the helper app.
'destination': '<(PRODUCT_DIR)/<(appname).app/Contents/Frameworks',
'files': [
'<(PRODUCT_DIR)/<(appname) Helper.app',
],
},
],
'postbuilds': [
{
'postbuild_name': 'Add framework',
'action': [
'cp',
'-Rf',
'${CONFIGURATION}/<(framework_name).framework',
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Frameworks/'
],
},
{
'postbuild_name': 'Fix Framework Link',
'action': [
'install_name_tool',
'-change',
'@executable_path/libcef.dylib',
'@executable_path/../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib',
'@executable_path/<(framework_name)',
'@executable_path/../Frameworks/<(framework_name).framework/<(framework_name)',
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
],
},
Expand Down Expand Up @@ -206,7 +258,7 @@
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/ScriptingBridge.framework',
'$(CONFIGURATION)/libcef.dylib',
'$(CONFIGURATION)/<(framework_name).framework/<(framework_name)',
],
},
'sources': [
Expand Down Expand Up @@ -239,7 +291,7 @@
}
],
'cflags': [
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0 glib-2.0)',
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
'<(march)',
],
'include_dirs': [
Expand Down Expand Up @@ -283,12 +335,12 @@
],
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-other gtk+-2.0 gthread-2.0 glib-2.0)',
'<!@(<(pkg-config) --libs-only-other gtk+-2.0 gthread-2.0)',
'-Wl,-rpath,\$$ORIGIN/lib',
'<(march)'
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0 glib-2.0)',
'<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)',
'$(BUILDTYPE)/libcef.so',
'appshell_extensions_js.o',
],
Expand Down Expand Up @@ -328,14 +380,39 @@
'conditions': [
['OS=="linux"', {
'cflags': [
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0 glib-2.0)',
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
'<(march)',
],
'default_configuration': 'Release',
'configurations': {
'Release': {},
'Debug': {},
},
}],
['OS=="win" and multi_threaded_dll', {
'configurations': {
'Common_Base': {
'msvs_configuration_attributes': {
'OutputDirectory': '$(ConfigurationName)',
},
},
'Debug': {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 3,
'WarnAsError': 'false',
},
},
},
'Release': {
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 2,
'WarnAsError': 'false',
},
},
}
}
}]
]
},
Expand Down Expand Up @@ -363,7 +440,7 @@
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/ScriptingBridge.framework',
'$(CONFIGURATION)/libcef.dylib',
'$(CONFIGURATION)/<(framework_name).framework/<(framework_name)',
],
},
'sources': [
Expand All @@ -389,6 +466,10 @@
'SYMROOT': 'xcodebuild',
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'FRAMEWORK_SEARCH_PATHS': [
'$(inherited)',
'$(CONFIGURATION)'
]
},
'postbuilds': [
{
Expand All @@ -400,8 +481,8 @@
'action': [
'install_name_tool',
'-change',
'@executable_path/libcef.dylib',
'@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib',
'@executable_path/<(framework_name)',
'@executable_path/../../../../Frameworks/<(framework_name).framework/<(framework_name)',
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
],
},
Expand Down
9 changes: 0 additions & 9 deletions appshell/FullScreenButton.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
*
*/
#import "FullScreenButton.h"
//#define FS_HOT_TO_COLD

//these are defined in MainMainu.xib file
static const int FULLSCREEN_BUTTON_TAG = 1004;

@implementation FullScreenButton {
NSImage *inactive;
NSImage *active;
Expand Down Expand Up @@ -58,12 +55,6 @@ - (void)setup {
hover = [NSImage imageNamed:@"window-fullscreen-hover"];
pressed = [NSImage imageNamed:@"window-fullscreen-pressed"];

#ifdef FS_HOT_TO_COLD
NSImage* saved = active;
active = pressed;
pressed = saved;
#endif

// assume active
activeState = YES;
[self updateButtonStates];
Expand Down
14 changes: 8 additions & 6 deletions appshell/appshell_extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,14 @@ class ProcessMessageDelegate : public ClientHandler::ProcessMessageDelegate {
}
} else if (message_name == "ShowDeveloperTools") {
// Parameters - none

// The CEF-hosted dev tools do not work. Open in a separate browser window instead.
// handler->ShowDevTools(browser);

ExtensionString url(browser->GetHost()->GetDevToolsURL(true));
OpenLiveBrowser(url, false);
CefWindowInfo wi;
CefBrowserSettings settings;

#if defined(OS_WIN)
wi.SetAsPopup(NULL, "DevTools");
#endif
browser->GetHost()->ShowDevTools(wi, browser->GetHost()->GetClient(), settings, CefPoint());

} else if (message_name == "GetNodeState") {
// Parameters:
// 0: int32 - callback id
Expand Down
Loading