Skip to content

Commit

Permalink
riot-desktop: add patch for startup failure due to electron 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshpak committed Jun 18, 2019
1 parent 2cbfe1a commit a9e9f7a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions srcpkgs/riot-desktop/patches/electron5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from https://gist.github.com/dbkr/e898624be6d53590ebf494521d868fec

diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js
index 99ddfbd1..c3aa4f5d 100644
--- electron_app/src/electron-main.js
+++ electron_app/src/electron-main.js
@@ -206,7 +206,10 @@ const launcher = new AutoLaunch({
// work.
// Also mark it as secure (ie. accessing resources from this
// protocol and HTTPS won't trigger mixed content warnings).
-protocol.registerStandardSchemes(['vector'], {secure: true});
+//protocol.registerStandardSchemes(['vector'], {secure: true});
+protocol.registerSchemesAsPrivileged([{
+ scheme: 'vector', privileges: {standard: true, secure: true, supportFetchAPI: true},
+}]);

app.on('ready', () => {
if (argv['devtools']) {
diff --git a/electron_app/src/preload.js b/electron_app/src/preload.js
index 3a4f7c9a..f63e19d4 100644
--- electron_app/src/preload.js
+++ electron_app/src/preload.js
@@ -23,7 +23,7 @@ window.ipcRenderer = ipcRenderer;
// protocol: this is necessary to load olm.wasm.
// (Also mark it a secure although we've already
// done this in the main process).
-webFrame.registerURLSchemeAsPrivileged('vector', {
+/*webFrame.registerURLSchemeAsPrivileged('vector', {
secure: true,
supportFetchAPI: true,
-});
+});*/
2 changes: 1 addition & 1 deletion srcpkgs/riot-desktop/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'riot-desktop'
pkgname=riot-desktop
version=1.2.1
revision=1
revision=2
archs="i686 x86_64"
wrksrc="riot-web-${version}"
conf_files="/etc/${pkgname}/config.json"
Expand Down

0 comments on commit a9e9f7a

Please sign in to comment.