diff options
author | Bruce Zhang | 2019-04-12 15:08:22 +0800 |
---|---|---|
committer | Bruce Zhang | 2019-04-12 15:08:22 +0800 |
commit | aeea7ebce552732097083fd9a4e5dbf1fbd59e1d (patch) | |
tree | 3131af5f879ec005ec944fff2a1e93e88778e365 /build.patch | |
parent | ada66eb41ea1b4dd77e8eee44cf2c618f3b7736b (diff) | |
download | aur-aeea7ebce552732097083fd9a4e5dbf1fbd59e1d.tar.gz |
fix electron 4.x compatibility - 2
Signed-off-by: Bruce Zhang <zttt183525594@gmail.com>
Diffstat (limited to 'build.patch')
-rw-r--r-- | build.patch | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/build.patch b/build.patch index 41edfbe76689..1c2063eab2fb 100644 --- a/build.patch +++ b/build.patch @@ -63,18 +63,30 @@ diff -ura electron-ssr-0.2.6/src/main/logger.js electron-ssr-0.2.6-new/src/main/ ensureDirSync(logFolder) diff -ura electron-ssr-0.2.6/src/main/index.js electron-ssr-0.2.6-new/src/main/index.js ---- electron-ssr-0.2.6/src/main/index.js 2019-04-12 14:42:05.591574100 +0800 -+++ electron-ssr-0.2.6-new/src/main/index.js 2019-04-12 14:43:48.209798254 +0800 -@@ -17,8 +17,11 @@ +--- electron-ssr-0.2.6/src/main/index.js 2019-04-12 15:05:00.420443178 +0800 ++++ electron-ssr-0.2.6-new/src/main/index.js 2019-04-12 15:06:38.004324260 +0800 +@@ -17,7 +17,8 @@ import { loadConfigsFromString } from '../shared/ssr' import { isMac, isWin } from '../shared/env' -const isSecondInstance = app.makeSingleInstance((argv, workingDirectory) => { -+let isSecondInstance = false +app.requestSingleInstanceLock() +app.on('second-instance', (event, argv, workingDirectory) => { // Someone tried to run a second instance, we should focus our window. -+ isSecondInstance = true const _window = getWindow() if (_window) { - if (_window.isMinimized()) { +@@ -38,13 +39,8 @@ + addConfigs(configs) + } + } +-}) +- +-if (isSecondInstance) { +- // cannot find module '../dialog' +- // https://github.com/electron/electron/issues/8862#issuecomment-294303518 + app.exit() +-} ++}) + + bootstrap.then(() => { + createWindow() |