diff --git a/public/contact.md b/public/contact.md index 72ec3486..a40d4012 100644 --- a/public/contact.md +++ b/public/contact.md @@ -28,7 +28,7 @@ - エラーログ > [!NOTE] -> エラーログは AivisSpeech ソフトウェア内のヘルプ → お問い合わせ → 「ログフォルダを開く」ボタンから確認できます。 +> エラーログは AivisSpeech ソフトウェア内のヘルプ → お問い合わせ → 「ログフォルダを開く」「音声合成エンジンのログフォルダを開く」ボタンから確認できます。 > [!WARNING] > エラーログには PC ユーザー名などのシステム情報が含まれる場合があります。 diff --git a/public/qAndA.md b/public/qAndA.md index b9053e84..648e1875 100644 --- a/public/qAndA.md +++ b/public/qAndA.md @@ -213,7 +213,8 @@ PC の空きメモリが不足している環境では、音声合成エンジ ### Q. エラーログはどこで確認できますか? -ヘルプ → お問い合わせ → ログフォルダを開くボタン から確認できます。具体的には以下のフォルダに保存されています。 +ヘルプ → お問い合わせ → 「ログフォルダを開く」ボタンをクリックすると、ログの保存先フォルダが開きます。 +具体的には、以下のフォルダに保存されています。 #### Windows 版 @@ -225,7 +226,8 @@ PC の空きメモリが不足している環境では、音声合成エンジ ### Q. 音声合成エンジンのエラーログはどこで確認できますか? -以下のフォルダに保存されています。 +ヘルプ → お問い合わせ → 「音声合成エンジンのログフォルダを開く」ボタンをクリックすると、音声合成エンジンのログの保存先フォルダが開きます。 +具体的には、以下のフォルダに保存されています。 #### Windows 版 diff --git a/src/backend/browser/sandbox.ts b/src/backend/browser/sandbox.ts index 80f5a7a1..220d1a13 100644 --- a/src/backend/browser/sandbox.ts +++ b/src/backend/browser/sandbox.ts @@ -218,6 +218,9 @@ export const api: Sandbox = { openLogDirectory() { throw new Error("Not supported on Browser version: openLogDirectory"); }, + openDefaultEngineLogDirectory() { + throw new Error("Not supported on Browser version: openDefaultEngineLogDirectory"); + }, /* eslint-enable no-console */ engineInfos() { return Promise.resolve([defaultEngine]); diff --git a/src/backend/electron/main.ts b/src/backend/electron/main.ts index 0e5af788..21c39813 100644 --- a/src/backend/electron/main.ts +++ b/src/backend/electron/main.ts @@ -659,9 +659,29 @@ registerIpcMainHandle({ ZOOM_RESET: () => { win.webContents.setZoomFactor(1); }, + OPEN_LOG_DIRECTORY: () => { void shell.openPath(app.getPath("logs")); }, + OPEN_DEFAULT_ENGINE_LOG_DIRECTORY: () => { + // AivisSpeech Engine のログ保存先ディレクトリを OS ごとに取得 + let logPath = ""; + switch (process.platform) { + case "win32": + logPath = path.join(app.getPath("appData"), "AivisSpeech-Engine", "Logs"); + break; + case "darwin": + logPath = path.join(app.getPath("appData"), "AivisSpeech-Engine", "Logs"); + break; + case "linux": + logPath = path.join(app.getPath("home"), ".local", "share", "AivisSpeech-Engine", "Logs"); + break; + default: + return; + } + // ログディレクトリを開く + void shell.openPath(logPath); + }, ENGINE_INFOS: () => { // エンジン情報を設定ファイルに保存しないためにelectron-storeは使わない diff --git a/src/backend/electron/preload.ts b/src/backend/electron/preload.ts index f3b41e9b..9bc4e662 100644 --- a/src/backend/electron/preload.ts +++ b/src/backend/electron/preload.ts @@ -152,6 +152,10 @@ const api: Sandbox = { void ipcRendererInvokeProxy.OPEN_LOG_DIRECTORY(); }, + openDefaultEngineLogDirectory: () => { + void ipcRendererInvokeProxy.OPEN_DEFAULT_ENGINE_LOG_DIRECTORY(); + }, + engineInfos: () => { return ipcRendererInvokeProxy.ENGINE_INFOS(); }, diff --git a/src/components/Dialog/HelpDialog/HelpDialog.vue b/src/components/Dialog/HelpDialog/HelpDialog.vue index 7afc5390..e2331c40 100644 --- a/src/components/Dialog/HelpDialog/HelpDialog.vue +++ b/src/components/Dialog/HelpDialog/HelpDialog.vue @@ -68,6 +68,15 @@ class="text-no-wrap text-bold q-mr-sm" @click="openLogDirectory" /> + @@ -274,6 +283,7 @@ const selectedPageIndex = ref(0); // }); const openLogDirectory = () => window.backend.openLogDirectory(); +const openDefaultEngineLogDirectory = () => window.backend.openDefaultEngineLogDirectory();