Build installer and management site from spec

This commit is contained in:
2026-05-07 23:22:34 +09:00
parent 0b061e63b7
commit af6e559682
33 changed files with 7125 additions and 1 deletions

17
src/installer/preload.ts Normal file
View File

@@ -0,0 +1,17 @@
import { contextBridge, ipcRenderer } from 'electron'
contextBridge.exposeInMainWorld('installerApi', {
getDefaults: () => ipcRenderer.invoke('installer:get-defaults'),
loadPacks: (manifestUrl: string) => ipcRenderer.invoke('installer:load-packs', manifestUrl),
chooseDirectory: () => ipcRenderer.invoke('installer:choose-directory'),
detectJdk: () => ipcRenderer.invoke('installer:detect-jdk'),
chooseJdk: () => ipcRenderer.invoke('installer:choose-jdk'),
startInstall: (payload: unknown) => ipcRenderer.invoke('installer:start-install', payload),
acceptEula: () => ipcRenderer.invoke('installer:accept-eula'),
openConfigEditor: () => ipcRenderer.invoke('installer:open-config-editor'),
configurePort: () => ipcRenderer.invoke('installer:configure-port'),
openFolder: () => ipcRenderer.invoke('installer:open-folder'),
createShortcut: (enabled: boolean) => ipcRenderer.invoke('installer:create-shortcut', enabled),
runServer: (enabled: boolean) => ipcRenderer.invoke('installer:run-server', enabled),
onLog: (handler: (entry: unknown) => void) => ipcRenderer.on('installer:log', (_event, entry) => handler(entry))
})