arm64 support

This commit is contained in:
Natsumi
2025-09-02 22:30:46 +12:00
parent d4bf9ef0f6
commit f1c8c0fa65
9 changed files with 174 additions and 146 deletions

View File

@@ -22,6 +22,7 @@ contextBridge.exposeInMainWorld('interopApi', {
const validChannels = ['launch-command'];
contextBridge.exposeInMainWorld('electron', {
getArch: () => ipcRenderer.invoke('getArch'),
openFileDialog: () => ipcRenderer.invoke('dialog:openFile'),
openDirectoryDialog: () => ipcRenderer.invoke('dialog:openDirectory'),
onWindowPositionChanged: (callback) =>
@@ -48,7 +49,6 @@ contextBridge.exposeInMainWorld('electron', {
ipcRenderer: {
on(channel, func) {
if (validChannels.includes(channel)) {
console.log('contextBridge', channel, func);
ipcRenderer.on(channel, (event, ...args) => func(...args));
}
}