From 293ac75246f482747b4dabb11a4268256438d25d Mon Sep 17 00:00:00 2001 From: daixiaoyu <2993728832@example.com> Date: Mon, 29 Jan 2024 14:07:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9Ewinecfg=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/main.ts | 7 +++++++ wine.sh | 2 ++ 2 files changed, 9 insertions(+) create mode 100755 wine.sh diff --git a/main/main.ts b/main/main.ts index 947ed39..2e3d03f 100644 --- a/main/main.ts +++ b/main/main.ts @@ -32,6 +32,7 @@ import { StatusManager } from "./managers/StatusManager"; import { Wineboot } from "./utils/Wineboot"; import { SysInfoManager } from "./managers/SysInfoManager"; import { logger } from "./utils/Logger"; +import { exec } from "child_process"; const createWindow = (): BrowserWindow => { const win = new BrowserWindow({ @@ -63,6 +64,12 @@ const devMenu: Electron.MenuItemConstructorOptions[] = [ { label: "View", submenu: [ + { + label: "wine配置", + click: () => { + exec("bash wine.sh"); + }, + }, { role: "reload", }, diff --git a/wine.sh b/wine.sh new file mode 100755 index 0000000..6d07321 --- /dev/null +++ b/wine.sh @@ -0,0 +1,2 @@ +source /opt/cxdepend/depend-env.sh +wine winecfg -- Gitee From a6eb635535f4c3a67070c1b4b5c8c642cc5b35d8 Mon Sep 17 00:00:00 2001 From: daixiaoyu <2993728832@example.com> Date: Mon, 29 Jan 2024 14:35:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9Ewinecfg=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wine.sh b/wine.sh index 6d07321..dda5dfa 100755 --- a/wine.sh +++ b/wine.sh @@ -1,2 +1,2 @@ source /opt/cxdepend/depend-env.sh -wine winecfg +env WINEPREFIX="/home/keming2/.okylin-wine/default" okylin-wine winecfg \ No newline at end of file -- Gitee From 8babca29f3684e5b7d7275714978b9be05f77ee5 Mon Sep 17 00:00:00 2001 From: daixiaoyu <2993728832@example.com> Date: Mon, 29 Jan 2024 14:38:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9Ewinecfg=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wine.sh b/wine.sh index dda5dfa..f78796f 100755 --- a/wine.sh +++ b/wine.sh @@ -1,2 +1,2 @@ source /opt/cxdepend/depend-env.sh -env WINEPREFIX="/home/keming2/.okylin-wine/default" okylin-wine winecfg \ No newline at end of file +env WINEPREFIX="$HOME/.okylin-wine/default" okylin-wine winecfg \ No newline at end of file -- Gitee