mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
register app automaticaly
This commit is contained in:
parent
d30cb88651
commit
126e147afa
5 changed files with 24 additions and 18 deletions
|
|
@ -11,18 +11,18 @@ module.exports = {
|
|||
icon: './icons/icon', // .icns extension added automatically
|
||||
appBundleId: 'com.rowboat.app',
|
||||
appCategoryType: 'public.app-category.productivity',
|
||||
// osxSign: {
|
||||
// batchCodesignCalls: true,
|
||||
// optionsForFile: () => ({
|
||||
// entitlements: path.join(__dirname, 'entitlements.plist'),
|
||||
// 'entitlements-inherit': path.join(__dirname, 'entitlements.plist'),
|
||||
// }),
|
||||
// },
|
||||
// osxNotarize: {
|
||||
// appleId: process.env.APPLE_ID,
|
||||
// appleIdPassword: process.env.APPLE_PASSWORD,
|
||||
// teamId: process.env.APPLE_TEAM_ID
|
||||
// },
|
||||
osxSign: {
|
||||
batchCodesignCalls: true,
|
||||
optionsForFile: () => ({
|
||||
entitlements: path.join(__dirname, 'entitlements.plist'),
|
||||
'entitlements-inherit': path.join(__dirname, 'entitlements.plist'),
|
||||
}),
|
||||
},
|
||||
osxNotarize: {
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_PASSWORD,
|
||||
teamId: process.env.APPLE_TEAM_ID
|
||||
},
|
||||
// Since we bundle everything with esbuild, we don't need node_modules at all.
|
||||
// These settings prevent Forge's dependency walker (flora-colossus) from trying
|
||||
// to analyze/copy node_modules, which fails with pnpm's symlinked workspaces.
|
||||
|
|
|
|||
|
|
@ -720,10 +720,10 @@ export function setupIpcHandlers() {
|
|||
return { success: false, error: 'Unknown format' };
|
||||
},
|
||||
'meeting:checkScreenPermission': async () => {
|
||||
if (process.platform !== 'darwin') return { granted: true };
|
||||
if (process.platform !== 'darwin') return { granted: true, status: 'non-darwin' };
|
||||
const status = systemPreferences.getMediaAccessStatus('screen');
|
||||
console.log('[meeting] Screen recording permission status:', status);
|
||||
return { granted: status === 'granted' };
|
||||
return { granted: status === 'granted', status };
|
||||
},
|
||||
'meeting:openScreenRecordingSettings': async () => {
|
||||
await shell.openExternal('x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture');
|
||||
|
|
|
|||
|
|
@ -129,13 +129,18 @@ function createWindow() {
|
|||
// Auto-approve display media requests and route system audio as loopback.
|
||||
// Electron requires a video source in the callback even if we only want audio.
|
||||
// We pass the first available screen source; the renderer discards the video track.
|
||||
// We use cached sources to avoid calling desktopCapturer.getSources() every time,
|
||||
// which on macOS Sequoia triggers a native permission popup on each call.
|
||||
let cachedScreenSources: Electron.DesktopCapturerSource[] | null = null;
|
||||
session.defaultSession.setDisplayMediaRequestHandler(async (_request, callback) => {
|
||||
const sources = await desktopCapturer.getSources({ types: ['screen'] });
|
||||
if (sources.length === 0) {
|
||||
if (!cachedScreenSources) {
|
||||
cachedScreenSources = await desktopCapturer.getSources({ types: ['screen'] });
|
||||
}
|
||||
if (cachedScreenSources.length === 0) {
|
||||
callback({});
|
||||
return;
|
||||
}
|
||||
callback({ video: sources[0], audio: 'loopback' });
|
||||
callback({ video: cachedScreenSources[0], audio: 'loopback' });
|
||||
});
|
||||
|
||||
// Show window when content is ready to prevent blank screen
|
||||
|
|
|
|||
|
|
@ -3497,7 +3497,7 @@ function App() {
|
|||
// On macOS, check screen recording permission before starting
|
||||
if (isMac) {
|
||||
const result = await window.ipc.invoke('meeting:checkScreenPermission', null)
|
||||
console.log('[meeting] Permission check result:', result)
|
||||
console.log('[meeting] Permission check result:', result, 'raw status:', result.status)
|
||||
if (!result.granted) {
|
||||
setShowMeetingPermissions(true)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ const ipcSchemas = {
|
|||
req: z.null(),
|
||||
res: z.object({
|
||||
granted: z.boolean(),
|
||||
status: z.string(),
|
||||
}),
|
||||
},
|
||||
'meeting:openScreenRecordingSettings': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue