Skip to content
Permalink
Browse files

Merge pull request #1361 from beakerbrowser/electron5

Electron5 (WIP)
  • Loading branch information...
pfrazee committed Apr 26, 2019
2 parents ca18809 + f3f8865 commit bb80da5275ecfa1a2794913763ac1ba27ede6a54
@@ -57,7 +57,10 @@ if (beakerCore.getEnvVar('BEAKER_TEST_DRIVER')) {
app.enableSandbox()

// configure the protocols
protocol.registerStandardSchemes(['dat', 'beaker'], { secure: true })
protocol.registerSchemesAsPrivileged([
{scheme: 'dat', privileges: {standard: true, secure: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true}},
{scheme: 'beaker', privileges: {standard: true, secure: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true}}
])

// handle OS event to open URLs
app.on('open-url', (e, url) => {
@@ -122,9 +125,6 @@ app.on('ready', async function () {
throw new Error('Failed to create protocol: dat')
}
})

// configure chromium's permissions for the protocols
protocol.registerServiceWorkerSchemes(['dat'])
})

app.on('quit', () => {
@@ -8,7 +8,7 @@
"copyright": "© 2019, Blue Link Labs",
"main": "background-process.build.js",
"dependencies": {
"@beaker/core": "beakerbrowser/beaker-core#46716e74cd5abcc6519e30e58fe927b92bb7d958",
"@beaker/core": "beakerbrowser/beaker-core#electron5",
"@beaker/dat-archive-file-diff": "^1.0.0",
"anymatch": "^1.3.2",
"await-lock": "^1.1.3",
@@ -8,15 +8,7 @@ import setupExitFullScreenHackfix from './webview-preload/exit-full-screen-hackf
import readableStreamAsyncIteratorPolyfill from './webview-preload/readable-stream-async-iterator-polyfill'
import windowOpenCloseHackfix from './webview-preload/window-open-close-hackfix'

// register protocol behaviors
/* This marks the scheme as:
- Secure
- Allowing Service Workers
- Supporting Fetch API
- CORS Enabled
*/
webFrame.registerURLSchemeAsPrivileged('dat', { bypassCSP: false })
webFrame.setSpellCheckProvider('en-US', true, beakerCoreWebview.createSpellChecker(rpcAPI))
webFrame.setSpellCheckProvider('en-US', beakerCoreWebview.createSpellChecker(rpcAPI))

// HACKS
setupExitFullScreenHackfix()
@@ -3,7 +3,7 @@
"name": "beakerbrowser",
"devDependencies": {
"browserify": "^13.0.1",
"electron": "4.1.4",
"electron": "5.0.0",
"electron-builder": "~20.38.5",
"eslint": "^4.5.0",
"eslint-plugin-import": "^2.7.0",
@@ -2,7 +2,7 @@ var gulp = require('gulp')
var path = require('path')
var run = require('./util-run')

//(cd app && npm rebuild --runtime=electron --target=4.1.4 --disturl=https://atom.io/download/atom-shell --build-from-source); gulp build
//(cd app && npm rebuild --runtime=electron --target=5.0.0 --disturl=https://atom.io/download/atom-shell --build-from-source); gulp build

gulp.task('rebuild', gulp.series(function () {
// TODO read electron version
@@ -17,7 +17,7 @@ gulp.task('rebuild', gulp.series(function () {
LDFLAGS: '-mmacosx-version-min=10.10'
}
}
run(`npm rebuild --runtime=electron --target=4.1.4 --disturl=https://atom.io/download/atom-shell --build-from-source`, {cwd, env, shell: true}, function () {
run(`npm rebuild --runtime=electron --target=5.0.0 --disturl=https://atom.io/download/atom-shell --build-from-source`, {cwd, env, shell: true}, function () {
run(`npm run build`, {shell: true}, function () {
resolve()
})
File renamed without changes.

0 comments on commit bb80da5

Please sign in to comment.
You can’t perform that action at this time.