feat: add macOS application menu and icon support, enhance permissions for microphone and camera

This commit is contained in:
miles committed 2026-08-04 00:49:50 -05:00
1 parent 075a051f74
commit bbdcbd1e7f
6 files changed
+542 -28

No files matched your search

+12
View File
@@ -12,6 +12,7 @@
const { EventEmitter } = require('events');
const path = require('path');
const fs = require('fs');
const { bridge } = require('./native-bridge');
const NativeImage = require('./native-image');
@@ -46,6 +47,17 @@ class App extends EventEmitter {
};
this._commandLine = new Map();
// Real Electron creates these dirs at startup; mirror that so apps can
// chdir/write into userData immediately.
for (const p of [this._paths.userData, this._paths.crashDumps, this._paths.logs]) {
try {
fs.mkdirSync(p, { recursive: true });
} catch (e) {
// Non-fatal: some paths may not be creatable in odd environments
}
}
this._dock = process.platform === 'darwin' ? {
setIcon: (icon) => {
const b64 = this._iconToBase64Png(icon);