Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into 指定されているVVPPがなかったら確認…
Browse files Browse the repository at this point in the history
…後にインストールし、使えるようにするようにする
  • Loading branch information
Hiroshiba committed Nov 10, 2024
2 parents 40e180a + 7043359 commit 973a5a5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/backend/electron/manager/engineInfoManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ export class EngineInfoManager {
this.vvppEngineDir = payload.vvppEngineDir;
}

/** デフォルトエンジンかどうかを判定する */
private isDefaultEngine(engineId: EngineId): boolean {
return this.envEngineInfos.some((e) => e.uuid === engineId);
}

/** エンジンディレクトリからエンジン情報を読み込む */
/**
* エンジンディレクトリのエンジンマニフェストからエンジンの情報を読み込む。
*/
private loadEngineInfo(
engineDir: string,
type: "vvpp" | "path",
Expand All @@ -62,7 +59,7 @@ export class EngineInfoManager {

const [command, ...args] = shlex.split(manifest.command);

const engineInfo = {
return success({
uuid: manifest.uuid,
protocol: "http:",
hostname: "127.0.0.1",
Expand All @@ -74,9 +71,8 @@ export class EngineInfoManager {
executionFilePath: path.join(engineDir, command),
executionArgs: args,
type,
isDefault: this.isDefaultEngine(manifest.uuid),
} satisfies EngineInfo;
return success(engineInfo);
isDefault: false,
} satisfies EngineInfo);
}

/**
Expand Down

0 comments on commit 973a5a5

Please sign in to comment.