Skip to content

Commit

Permalink
Update to Electron v12, allow packaging as arm64 for macOS (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb authored Nov 23, 2021
1 parent b1bcc4b commit 47b36c8
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 122 deletions.
6 changes: 4 additions & 2 deletions main/windows/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const openConfigWindow = async (pluginName: string) => {
modal: true,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});

Expand Down Expand Up @@ -52,7 +53,8 @@ const openEditorConfigWindow = async (pluginName: string, serviceTitle: string,
modal: true,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});

Expand Down
3 changes: 2 additions & 1 deletion main/windows/cropper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const openCropper = (display: Display, activeDisplayId?: number) => {
show: false,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});

Expand Down
3 changes: 2 additions & 1 deletion main/windows/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const showDialog = async (options: DialogOptions) => new Promise<number | void>(
useContentSize: true,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});

Expand Down
3 changes: 2 additions & 1 deletion main/windows/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const openExportsWindow = async () => {
transparent: true,
vibrancy: 'window',
webPreferences: {
nodeIntegration: true
nodeIntegration: true,
contextIsolation: false
},
route: 'exports'
});
Expand Down
1 change: 1 addition & 0 deletions main/windows/kap-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default class KapWindow<State = any> {
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
...rest.webPreferences
},
show: false
Expand Down
3 changes: 2 additions & 1 deletion main/windows/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ const openPrefsWindow = async (options?: PreferencesWindowOptions) => {
vibrancy: 'window',
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});

Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@sentry/electron": "^2.4.0",
"@sindresorhus/to-milliseconds": "^1.2.0",
"ajv": "^6.12.2",
"aperture": "^5.2.0",
"aperture": "^6.1.0",
"base64-img": "^1.0.4",
"classnames": "^2.2.6",
"clean-stack": "^3.0.1",
Expand Down Expand Up @@ -109,8 +109,8 @@
"@typescript-eslint/parser": "^4.15.0",
"ava": "^3.15.0",
"babel-eslint": "^10.1.0",
"electron": "10.4.6",
"electron-builder": "^22.10.5",
"electron": "12.2.3",
"electron-builder": "^22.13.1",
"electron-builder-notarize": "^1.2.0",
"eslint-config-xo": "^0.35.0",
"eslint-config-xo-react": "^0.24.0",
Expand Down Expand Up @@ -277,6 +277,10 @@
]
}
]
},
"target": {
"target": "dmg",
"arch": ["x64", "arm64"]
}
},
"dmg": {
Expand Down
Loading

0 comments on commit 47b36c8

Please sign in to comment.