禁用gpu沙盒

pull/1050/head
lyswhut 2022-11-04 16:41:43 +08:00
parent 9bec54c454
commit 12336148d9
5 changed files with 26 additions and 18 deletions

28
package-lock.json generated
View File

@ -23,7 +23,7 @@
"image-size": "^1.0.2", "image-size": "^1.0.2",
"jschardet": "^3.0.0", "jschardet": "^3.0.0",
"koa": "^2.13.4", "koa": "^2.13.4",
"long": "^5.2.0", "long": "^5.2.1",
"music-metadata": "^8.1.0", "music-metadata": "^8.1.0",
"needle": "github:lyswhut/needle#95cd7135818824a90d1ed4bb5aa4f8610304ae34", "needle": "github:lyswhut/needle#95cd7135818824a90d1ed4bb5aa4f8610304ae34",
"node-id3": "^0.2.3", "node-id3": "^0.2.3",
@ -49,7 +49,7 @@
"@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"@volar/vue-language-plugin-pug": "^1.0.9", "@volar/vue-language-plugin-pug": "^1.0.9",
"babel-loader": "^9.0.1", "babel-loader": "^9.1.0",
"browserslist": "^4.21.4", "browserslist": "^4.21.4",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"changelog-parser": "^2.8.1", "changelog-parser": "^2.8.1",
@ -4188,9 +4188,9 @@
} }
}, },
"node_modules/babel-loader": { "node_modules/babel-loader": {
"version": "9.0.1", "version": "9.1.0",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.0.1.tgz", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.0.tgz",
"integrity": "sha512-szYjslOXFlj/po5KfrVmiuBAcI6GVHFuAgC96Qd6mMPHdwl4lmAJkYtvjQ1RxxPjgdkKjd3LQgXDE4jxEutNuw==", "integrity": "sha512-Antt61KJPinUMwHwIIz9T5zfMgevnfZkEVWYDWlG888fgdvRRGD0JTuf/fFozQnfT+uq64sk1bmdHDy/mOEWnA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"find-cache-dir": "^3.3.2", "find-cache-dir": "^3.3.2",
@ -10826,9 +10826,9 @@
} }
}, },
"node_modules/long": { "node_modules/long": {
"version": "5.2.0", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==" "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
}, },
"node_modules/lower-case": { "node_modules/lower-case": {
"version": "2.0.2", "version": "2.0.2",
@ -21031,9 +21031,9 @@
} }
}, },
"babel-loader": { "babel-loader": {
"version": "9.0.1", "version": "9.1.0",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.0.1.tgz", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.0.tgz",
"integrity": "sha512-szYjslOXFlj/po5KfrVmiuBAcI6GVHFuAgC96Qd6mMPHdwl4lmAJkYtvjQ1RxxPjgdkKjd3LQgXDE4jxEutNuw==", "integrity": "sha512-Antt61KJPinUMwHwIIz9T5zfMgevnfZkEVWYDWlG888fgdvRRGD0JTuf/fFozQnfT+uq64sk1bmdHDy/mOEWnA==",
"dev": true, "dev": true,
"requires": { "requires": {
"find-cache-dir": "^3.3.2", "find-cache-dir": "^3.3.2",
@ -26060,9 +26060,9 @@
} }
}, },
"long": { "long": {
"version": "5.2.0", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.0.tgz", "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
"integrity": "sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==" "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
}, },
"lower-case": { "lower-case": {
"version": "2.0.2", "version": "2.0.2",

View File

@ -217,7 +217,7 @@
"@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"@volar/vue-language-plugin-pug": "^1.0.9", "@volar/vue-language-plugin-pug": "^1.0.9",
"babel-loader": "^9.0.1", "babel-loader": "^9.1.0",
"browserslist": "^4.21.4", "browserslist": "^4.21.4",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"changelog-parser": "^2.8.1", "changelog-parser": "^2.8.1",
@ -285,7 +285,7 @@
"image-size": "^1.0.2", "image-size": "^1.0.2",
"jschardet": "^3.0.0", "jschardet": "^3.0.0",
"koa": "^2.13.4", "koa": "^2.13.4",
"long": "^5.2.0", "long": "^5.2.1",
"music-metadata": "^8.1.0", "music-metadata": "^8.1.0",
"needle": "github:lyswhut/needle#95cd7135818824a90d1ed4bb5aa4f8610304ae34", "needle": "github:lyswhut/needle#95cd7135818824a90d1ed4bb5aa4f8610304ae34",
"node-id3": "^0.2.3", "node-id3": "^0.2.3",

View File

@ -62,6 +62,8 @@ export const applyElectronEnvParams = () => {
// https://github.com/electron/electron/issues/22691 // https://github.com/electron/electron/issues/22691
app.commandLine.appendSwitch('wm-window-animations-disabled') app.commandLine.appendSwitch('wm-window-animations-disabled')
app.commandLine.appendSwitch('--disable-gpu-sandbox')
// proxy // proxy
if (global.envParams.cmdParams['proxy-server']) { if (global.envParams.cmdParams['proxy-server']) {
app.commandLine.appendSwitch('proxy-server', global.envParams.cmdParams['proxy-server']) app.commandLine.appendSwitch('proxy-server', global.envParams.cmdParams['proxy-server'])

View File

@ -124,8 +124,11 @@ export const createWindow = () => {
skipTaskbar: true, skipTaskbar: true,
webPreferences: { webPreferences: {
contextIsolation: false, contextIsolation: false,
webSecurity: !global.isDev, webSecurity: false,
sandbox: false,
nodeIntegration: true, nodeIntegration: true,
enableWebSQL: false,
webgl: false,
spellcheck: false, // 禁用拼写检查器 spellcheck: false, // 禁用拼写检查器
}, },
}) })

View File

@ -78,8 +78,11 @@ export const createWindow = () => {
webPreferences: { webPreferences: {
nodeIntegrationInWorker: true, nodeIntegrationInWorker: true,
contextIsolation: false, contextIsolation: false,
webSecurity: !global.isDev, webSecurity: false,
nodeIntegration: true, nodeIntegration: true,
sandbox: false,
enableWebSQL: false,
webgl: false,
spellcheck: false, // 禁用拼写检查器 spellcheck: false, // 禁用拼写检查器
}, },
} }