Skip to content

IPC Route dialog

Timon Home edited this page Mar 19, 2026 · 2 revisions

IPC Route: dialog

Native OS file picker dialogs. All three handlers use dialog.showOpenDialog() attached to mainWindow, making them modal to the application.


dialog:pickJar

Transport: invoke

Opens a file picker filtered to .jar files.

Request

No parameters.

Response

string | null   // absolute path, or null if cancelled

Config

{ filters: [{ name: 'JAR', extensions: ['jar'] }], properties: ['openFile'] }

dialog:pickDir

Transport: invoke

Opens a directory picker.

Request

No parameters.

Response

string | null

Config

{ properties: ['openDirectory'] }

dialog:pickJava

Transport: invoke

Opens a file picker for selecting a Java executable. Accepts .exe and any extension (Unix compatibility).

Request

No parameters.

Response

string | null

Config

{ filters: [{ name: 'Executable', extensions: ['exe', '*'] }], properties: ['openFile'] }

Usage pattern

All three are called from the folder icon buttons in ConfigTab → Files & Paths. The renderer checks for null before applying the returned path to the draft profile:

const p = await window.api.pickJar()
if (p) update({ jarPath: p })

Clone this wiki locally