Compare commits

...

8 Commits

Author SHA1 Message Date
electron
de428ebec0 Bump v2.0.0-beta.7 2018-04-03 12:54:17 -07:00
John Kleinschmidt
c6c49b9e4b Add native arm/arm64 mksnapshot for 2-0-x (#12524)
* Add logic to bundle native mksnapshot for arm/arm64

(cherry picked from commit 79eff95a39)

* Update to latest libchromiumcontent
2018-04-03 14:24:38 -05:00
John Kleinschmidt
98495fabfb Fix pushRelease for autorelease (#12523) 2018-04-03 14:14:25 -05:00
trop[bot]
06c33c7e56 WebFrame.setVisualZoomLevelLimits sets user-agent scale constraints (#12510)
Fixes #11216.
2018-04-03 07:50:37 -05:00
trop[bot]
33aad6ae11 Handle in-app-purchase less fatally on non-Darwin (#12512)
Fixes #12471

Right now it throws a new error when the file is even require()d, but this isn't ideal as there are cases where everything is mass-required, such as Spectron.

Instead, we should throw an error on non-Darwin environments only when the IAP methods are invoked.
2018-04-02 19:23:28 -05:00
Charles Kerr
6c00b37dd1 update libcc submodule reference to electron-2-0-x (#12448)
* update libcc submodule reference to electron-2-0-x

* remove MarkHighMemoryUsage api
2018-04-02 19:12:55 -05:00
trop[bot]
d209e59c30 re-enable null check against menu item accelerators (#12455) 2018-03-28 16:45:34 -05:00
trop[bot]
14f8a2a0e8 Backport (2-0-x) - update doc for setProgressBar (#12454)
* update doc for setProgressBar

The linter was unable to get `paused` as a possible value for `mode`

* update doc for setProgressBar

Addressing PR feedback
2018-03-28 11:35:40 +11:00
17 changed files with 83 additions and 42 deletions

2
.gitignore vendored
View File

@@ -43,6 +43,8 @@
/vendor/llvm/
/vendor/npm/
/vendor/python_26/
/vendor/native_mksnapshot
/vendor/LICENSES.chromium.html
node_modules/
SHASUMS256.txt
**/package-lock.json

View File

@@ -328,10 +328,6 @@ WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options)
request_id_(0),
background_throttling_(true),
enable_devtools_(true) {
// WebContents may need to emit events when it is garbage collected, so it
// has to be deleted in the first gc callback.
MarkHighMemoryUsage();
// Read options.
options.Get("backgroundThrottling", &background_throttling_);

View File

@@ -56,8 +56,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,6
PRODUCTVERSION 2,0,0,6
FILEVERSION 2,0,0,7
PRODUCTVERSION 2,0,0,7
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L

View File

@@ -223,7 +223,6 @@ NativeImage::NativeImage(v8::Isolate* isolate, const gfx::Image& image)
isolate->AdjustAmountOfExternalAllocatedMemory(
image_.ToImageSkia()->bitmap()->computeSize64());
}
MarkHighMemoryUsage();
}
#if defined(OS_WIN)
@@ -238,7 +237,6 @@ NativeImage::NativeImage(v8::Isolate* isolate, const base::FilePath& hicon_path)
isolate->AdjustAmountOfExternalAllocatedMemory(
image_.ToImageSkia()->bitmap()->computeSize64());
}
MarkHighMemoryUsage();
}
#endif

View File

@@ -8,7 +8,7 @@
#define ATOM_MAJOR_VERSION 2
#define ATOM_MINOR_VERSION 0
#define ATOM_PATCH_VERSION 0
#define ATOM_PRE_RELEASE_VERSION -beta.6
#define ATOM_PRE_RELEASE_VERSION -beta.7
#ifndef ATOM_STRINGIFY
#define ATOM_STRINGIFY(n) ATOM_STRINGIFY_HELPER(n)

View File

@@ -152,6 +152,7 @@ double WebFrame::GetZoomFactor() const {
void WebFrame::SetVisualZoomLevelLimits(double min_level, double max_level) {
web_frame_->View()->SetDefaultPageScaleLimits(min_level, max_level);
web_frame_->View()->SetIgnoreViewportTagScaleLimits(true);
}
void WebFrame::SetLayoutZoomLevelLimits(double min_level, double max_level) {

View File

@@ -1199,7 +1199,7 @@ menu bar.
* `progress` Double
* `options` Object (optional)
* `mode` String _Windows_ - Mode for the progress bar. Can be `none`, `normal`, `indeterminate`, `error`, or `paused`.
* `mode` String _Windows_ - Mode for the progress bar. Can be `none`, `normal`, `indeterminate`, `error` or `paused`.
Sets progress value in progress bar. Valid range is [0, 1.0].

View File

@@ -4,7 +4,7 @@
'product_name%': 'Electron',
'company_name%': 'GitHub, Inc',
'company_abbr%': 'github',
'version%': '2.0.0-beta.6',
'version%': '2.0.0-beta.7',
'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c',
},
'includes': [

View File

@@ -1,14 +1,20 @@
'use strict'
if (process.platform !== 'darwin') {
throw new Error('The inAppPurchase module can only be used on macOS')
if (process.platform === 'darwin') {
const {EventEmitter} = require('events')
const {inAppPurchase, InAppPurchase} = process.atomBinding('in_app_purchase')
// inAppPurchase is an EventEmitter.
Object.setPrototypeOf(InAppPurchase.prototype, EventEmitter.prototype)
EventEmitter.call(inAppPurchase)
module.exports = inAppPurchase
} else {
module.exports = {
purchaseProduct: (productID, quantity, callback) => {
throw new Error('The inAppPurchase module can only be used on macOS')
},
canMakePayments: () => false,
getReceiptURL: () => ''
}
}
const {EventEmitter} = require('events')
const {inAppPurchase, InAppPurchase} = process.atomBinding('in_app_purchase')
// inAppPurchase is an EventEmitter.
Object.setPrototypeOf(InAppPurchase.prototype, EventEmitter.prototype)
EventEmitter.call(inAppPurchase)
module.exports = inAppPurchase

View File

@@ -20,7 +20,7 @@ const delegate = {
getAcceleratorForCommandId: (menu, id, useDefaultAccelerator) => {
const command = menu.commandsMap[id]
if (!command) return
if (command.accelerator) return command.accelerator
if (command.accelerator != null) return command.accelerator
if (useDefaultAccelerator) return command.getDefaultRoleAccelerator()
},
executeCommand: (menu, event, id) => {

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "2.0.0-beta.6",
"version": "2.0.0-beta.7",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -40,6 +40,9 @@ def main():
if args.target_arch == 'mips64el':
download_mips64el_toolchain()
if args.target_arch.startswith('arm'):
download_native_mksnapshot(args.target_arch)
# Redirect to use local libchromiumcontent build.
if args.build_release_libcc or args.build_debug_libcc:
build_libchromiumcontent(args.verbose, args.target_arch, defines,
@@ -218,6 +221,15 @@ def download_mips64el_toolchain():
subprocess.check_call(['tar', '-xf', tar_name, '-C', VENDOR_DIR])
os.remove(tar_name)
def download_native_mksnapshot(arch):
if not os.path.exists(os.path.join(VENDOR_DIR,
'native_mksnapshot')):
tar_name = 'native-mksnapshot.tar.bz2'
url = '{0}/linux/{1}/{2}/{3}'.format(BASE_URL, arch,
get_libchromiumcontent_commit(), tar_name)
download(tar_name, url, os.path.join(SOURCE_ROOT, tar_name))
subprocess.call(['tar', '-jxf', tar_name, '-C', VENDOR_DIR])
os.remove(tar_name)
def create_chrome_version_h():
version_file = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'VERSION')

View File

@@ -24,6 +24,7 @@ DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'download',
'libchromiumcontent', 'static_library')
NATIVE_MKSNAPSHOT_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'native_mksnapshot')
PROJECT_NAME = electron_gyp()['project_name%']
PRODUCT_NAME = electron_gyp()['product_name%']
@@ -141,7 +142,6 @@ def copy_chrome_binary(binary):
shutil.copyfile(src, dest)
os.chmod(dest, os.stat(dest).st_mode | stat.S_IEXEC)
def copy_vcruntime_binaries():
with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
r"SOFTWARE\Microsoft\VisualStudio\14.0\Setup\VC", 0,
@@ -260,17 +260,39 @@ def create_dist_zip():
def create_chrome_binary_zip(binary, version):
dist_name = get_zip_name(binary, version)
file_suffix = ''
create_native_mksnapshot = False
if binary == 'mksnapshot':
arch = get_target_arch()
if arch.startswith('arm'):
# if the arch is arm/arm64 the mksnapshot executable is an x64 binary,
# so name it as such.
file_suffix = 'x64'
create_native_mksnapshot = True
dist_name = get_zip_name(binary, version, file_suffix)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
files = ['LICENSE', 'LICENSES.chromium.html']
if PLATFORM == 'win32':
files += [binary + '.exe']
else:
files += [binary]
with scoped_cwd(DIST_DIR):
files = ['LICENSE', 'LICENSES.chromium.html']
if PLATFORM == 'win32':
files += [binary + '.exe']
else:
files += [binary]
make_zip(zip_file, files, [])
if create_native_mksnapshot == True:
# Create a zip with the native version of the mksnapshot binary.
src = os.path.join(NATIVE_MKSNAPSHOT_DIR, binary)
dest = os.path.join(DIST_DIR, binary)
# Copy file and keep the executable bit.
shutil.copyfile(src, dest)
os.chmod(dest, os.stat(dest).st_mode | stat.S_IEXEC)
dist_name = get_zip_name(binary, version)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
with scoped_cwd(DIST_DIR):
make_zip(zip_file, files, [])
def create_ffmpeg_zip():
dist_name = get_zip_name('ffmpeg', ELECTRON_VERSION)

View File

@@ -177,8 +177,8 @@ async function createRelease (branchToTarget, isBeta) {
console.log(`${pass} Draft release for ${newVersion} has been created.`)
}
async function pushRelease () {
let pushDetails = await GitProcess.exec(['push', 'origin', 'HEAD', '--follow-tags'], gitDir)
async function pushRelease (branch) {
let pushDetails = await GitProcess.exec(['push', 'origin', `HEAD:${branch}`, '--follow-tags'], gitDir)
if (pushDetails.exitCode === 0) {
console.log(`${pass} Successfully pushed the release. Wait for ` +
`release builds to finish before running "npm run release".`)
@@ -255,7 +255,7 @@ async function prepareRelease (isBeta, notesOnly) {
} else {
await verifyNewVersion()
await createRelease(currentBranch, isBeta)
await pushRelease()
await pushRelease(currentBranch)
await runReleaseBuilds(currentBranch)
}
}

View File

@@ -85,12 +85,16 @@ def main():
upload_electron(github, release, os.path.join(DIST_DIR, ffmpeg),
args.upload_to_s3)
# Upload chromedriver and mksnapshot for minor version update.
if parse_version(args.version)[2] == '0':
chromedriver = get_zip_name('chromedriver', ELECTRON_VERSION)
upload_electron(github, release, os.path.join(DIST_DIR, chromedriver),
args.upload_to_s3)
mksnapshot = get_zip_name('mksnapshot', ELECTRON_VERSION)
chromedriver = get_zip_name('chromedriver', ELECTRON_VERSION)
upload_electron(github, release, os.path.join(DIST_DIR, chromedriver),
args.upload_to_s3)
mksnapshot = get_zip_name('mksnapshot', ELECTRON_VERSION)
upload_electron(github, release, os.path.join(DIST_DIR, mksnapshot),
args.upload_to_s3)
if get_target_arch().startswith('arm'):
# Upload the x64 binary for arm/arm64 mksnapshot
mksnapshot = get_zip_name('mksnapshot', ELECTRON_VERSION, 'x64')
upload_electron(github, release, os.path.join(DIST_DIR, mksnapshot),
args.upload_to_s3)