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

Win64/Win32/Mac cef 3202 integration(Just for reference) #659

Closed
wants to merge 6 commits into from
Closed
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
42 changes: 28 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function (grunt) {
var common = require("./tasks/common")(grunt),
platform = common.platform(),
staging,
cef_version = "3.2623.1402";
cef_version = "3.3497.1836.gb472a8d";

if (platform === "mac") {
staging = "installer/mac/staging/<%= build.name %>.app/Contents";
Expand All @@ -37,12 +37,6 @@ module.exports = function (grunt) {
staging = "installer/linux/debian/package-root/opt/brackets";
}

if (platform === "mac") {
cef_version = "3.2704.1434";
} else if (platform === "linux") {
cef_version = "3.2785.1487";
}

grunt.initConfig({
"pkg": grunt.file.readJSON("package.json"),
"config-json": staging + "/www/config.json",
Expand Down Expand Up @@ -91,23 +85,43 @@ module.exports = function (grunt) {
"src" : "<%= icu.url %>/icu_<%= icu.version %>_macosx64.zip"
},
/* win */
"cef-win": {
"cef-win32": {
"dest" : "<%= downloads %>",
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_windows32.zip"
},
"cef-win-symbols": {
"cef-win32-symbols": {
"src" : ["<%= cef.url %>/cef_binary_<%= cef.version %>_windows32_debug_symbols.zip", "<%= cef.url %>/cef_binary_<%= cef.version %>_windows32_release_symbols.zip"],
"dest" : "<%= downloads %>/cefsymbols"
},
"node-win": {
"node-win32": {
"dest" : "<%= downloads %>",
"src" : "http://nodejs.org/dist/v<%= node.version %>/win-x86/node.exe"
},
"icu-win": {
"icu-win32": {
"dest" : "<%= downloads %>",
"src" : "<%= icu.url %>/icu_<%= icu.version %>_windows32.zip"
},
"vs-crt-win": {
"vs-crt-win32": {
"dest" : "<%= downloads %>",
"src" : "<%= vsCrt.url %>/vs<%= vsCrt.version %>-crt-ia32.zip"
},
"cef-win64": {
"dest" : "<%= downloads %>",
"src" : "<%= cef.url %>/cef_binary_<%= cef.version %>_windows64.zip"
},
"cef-win64-symbols": {
"src" : ["<%= cef.url %>/cef_binary_<%= cef.version %>_windows64_debug_symbols.zip", "<%= cef.url %>/cef_binary_<%= cef.version %>_windows64_release_symbols.zip"],
"dest" : "<%= downloads %>/cefsymbols"
},
"node-win64": {
"dest" : "<%= downloads %>",
"src" : "http://nodejs.org/dist/v<%= node.version %>/win-x86/node.exe"
},
"icu-win64": {
"dest" : "<%= downloads %>",
"src" : "<%= icu.url %>/icu_<%= icu.version %>_windows64.zip"
},
"vs-crt-win64": {
"dest" : "<%= downloads %>",
"src" : "<%= vsCrt.url %>/vs<%= vsCrt.version %>-crt-ia32.zip"
}
Expand Down Expand Up @@ -325,14 +339,14 @@ module.exports = function (grunt) {
}
},
"cef": {
"url" : "http://s3.amazonaws.com/files.brackets.io/cef",
"url" : "http://localhost:8000",
"version" : cef_version
},
"node": {
"version" : "6.14.0"
},
"icu": {
"url" : "http://s3.amazonaws.com/files.brackets.io/icu",
"url" : "http://localhost:8001",
"version" : "58"
},
"vsCrt": {
Expand Down
37 changes: 20 additions & 17 deletions appshell.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
],
'defines': [
'USING_CEF_SHARED',
'WRAPING_CEF_SHARED',
],
'include_dirs': [
'.',
Expand Down Expand Up @@ -304,22 +305,22 @@
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/Brackets-node',
],
},
{
# This postbuid step is responsible for creating the following
# helpers:
#
# <(appname) Helper EH.app and <(appname) Helper NP.app are created
# from <(appname) Helper.app.
#
# The EH helper is marked for an executable heap. The NP helper
# is marked for no PIE (ASLR).
'postbuild_name': 'Make More Helpers',
'action': [
'tools/make_more_helpers.sh',
'Frameworks',
'<(appname)',
],
},
# {
# # This postbuid step is responsible for creating the following
# # helpers:
# #
# # <(appname) Helper EH.app and <(appname) Helper NP.app are created
# # from <(appname) Helper.app.
# #
# # The EH helper is marked for an executable heap. The NP helper
# # is marked for no PIE (ASLR).
# 'postbuild_name': 'Make More Helpers',
# 'action': [
# 'tools/make_more_helpers.sh',
# 'Frameworks',
# '<(appname)',
# ],
# },
],
'link_settings': {
'libraries': [
Expand Down Expand Up @@ -444,6 +445,7 @@
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
'defines': [
'USING_CEF_SHARED',
'WRAPPING_CEF_SHARED',
],
'configurations': {
'Common_Base': {
Expand Down Expand Up @@ -521,6 +523,7 @@
],
'defines': [
'USING_CEF_SHARED',
'WRAPING_CEF_SHARED',
],
'include_dirs': [
'.',
Expand Down Expand Up @@ -628,4 +631,4 @@
},
}],
],
}
}
8 changes: 4 additions & 4 deletions appshell/appshell_extension_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CefRefPtr<CefV8Value> ListValueToV8Value(CefRefPtr<CefListValue> value, int inde
switch (type) {
case VTYPE_LIST: {
CefRefPtr<CefListValue> list = value->GetList(index);
new_value = CefV8Value::CreateArray(list->GetSize());
new_value = CefV8Value::CreateArray(static_cast<int>(list->GetSize()));
SetList(list, new_value);
} break;
case VTYPE_BOOL:
Expand Down Expand Up @@ -106,7 +106,7 @@ void SetListValue(CefRefPtr<CefV8Value> list, int index,
switch (type) {
case VTYPE_LIST: {
CefRefPtr<CefListValue> listValue = value->GetList(index);
new_value = CefV8Value::CreateArray(listValue->GetSize());
new_value = CefV8Value::CreateArray(static_cast<int>(listValue->GetSize()));
SetList(listValue, new_value);
} break;
case VTYPE_BOOL:
Expand Down Expand Up @@ -136,7 +136,7 @@ void SetListValue(CefRefPtr<CefV8Value> list, int index,
void SetList(CefRefPtr<CefListValue> source, CefRefPtr<CefV8Value> target) {
DCHECK(target->IsArray());

int arg_length = source->GetSize();
int arg_length = static_cast<int>(source->GetSize());
if (arg_length == 0)
return;

Expand All @@ -157,7 +157,7 @@ class AppShellExtensionHandler : public CefV8Handler {
CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments,
CefRefPtr<CefV8Value>& retval,
CefString& exception) {
CefString& exception) OVERRIDE {

// The only messages that are handled here is getElapsedMilliseconds(),
// GetCurrentLanguage(), GetApplicationSupportDirectory(), and GetRemoteDebuggingPort().
Expand Down
7 changes: 4 additions & 3 deletions appshell/appshell_extensions_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <unicode/ucsdet.h>
#include <unicode/ucnv.h>
#include <fstream>
#include <memory>

#ifdef OS_LINUX
#include "appshell/browser/main_context.h"
Expand Down Expand Up @@ -32,7 +33,7 @@ void CharSetDetect::operator()(const char* bufferData, size_t bufferLength, std:
const UCharsetMatch* charsetMatch_;

// send text
ucsdet_setText(m_charsetDetector_, bufferData, bufferLength, &error);
ucsdet_setText(m_charsetDetector_, bufferData, static_cast<int32_t>(bufferLength), &error);
if (U_FAILURE(error))
throw "Failed to set text";

Expand Down Expand Up @@ -71,7 +72,7 @@ void CharSetEncode::operator()(std::string &contents) {
if(error != U_BUFFER_OVERFLOW_ERROR) {
throw "Unable to convert encoding";
}
std::auto_ptr<char> target(new char[targetLen + 1]());
std::unique_ptr<char> target(new char[targetLen + 1]());
error = U_ZERO_ERROR;
ustr.extract(target.get(), targetLen, m_conv, error);
target.get()[targetLen] = '\0';
Expand All @@ -87,7 +88,7 @@ void DecodeContents(std::string &contents, const std::string& encoding) {
if(status != U_BUFFER_OVERFLOW_ERROR) {
throw "Unable to decode contents";
}
std::auto_ptr<char> target(new char[targetLen + 1]());
std::unique_ptr<char> target(new char[targetLen + 1]());
status = U_ZERO_ERROR;
ustr.extract(target.get(), targetLen, NULL, status);
target.get()[targetLen] = '\0';
Expand Down
Loading