Skip to content

Commit

Permalink
electron builderでは、.envファイルが読み込まれないっぽい?のでフォールバック (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba authored Feb 28, 2022
1 parent 803b52d commit f8fdceb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,20 @@ const engineInfos: EngineInfo[] = (() => {
return JSON.parse(defaultEngineInfosEnv) as EngineInfo[];
}

return [];
// FIXME: electron builderでは、.envファイルが読み込まれないらしいのでフォールバック
// .envから情報を取得するようにするべき
// https://github.com/VOICEVOX/voicevox/issues/721
const isMac = process.platform === "darwin";
const isLinux = process.platform === "linux";
return [
{
key: "074fc39e-678b-4c13-8916-ffca8d505d1d",
executionEnabled: true,
executionFilePath: isMac || isLinux ? "./run" : "run.exe",
host: "http://127.0.0.1:50021",
},
];
// return [];
})();

let win: BrowserWindow;
Expand Down

0 comments on commit f8fdceb

Please sign in to comment.