Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ app-data
downloads
logs
python-embedded
configs
configs

# Map Mask smoke/debug artifacts and Electron profiles
.map-mask-smoke-user-data*/
map-mask-smoke-artifacts/
map-mask-viewport-artifacts/
*.log
*.png
2 changes: 1 addition & 1 deletion src/lib/electron-router-dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export const { Router, registerRoute, settings } = createElectronRouter({
port: 4927,

types: {
ids: ['main', 'about', 'overlay', 'video-overlay', 'splash'],
ids: ['main', 'about', 'overlay', 'video-overlay', 'map-mask-overlay', 'splash'],
},
})
12 changes: 12 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BrowserWindow, app, ipcMain } from 'electron'
import { execFile } from 'node:child_process'
import { join } from 'node:path'
import { promisify } from 'node:util'

import { makeAppWithSingleInstanceLock } from 'lib/electron-app/factories/app/instance'
Expand All @@ -19,12 +20,17 @@ import { registerConversationBridge } from './services/conversation-bridge'
import { MainWindow } from './windows/main'
import { OverlayWindow, persistOverlayState } from './windows/overlay'
import { SplashWindow } from './windows/splash'
import { persistMapMaskOverlayState } from './windows/map-mask-overlay'
import { persistVideoOverlayState, unregisterVideoOverlayShortcuts } from './windows/video-overlay'
import log from 'electron-log/main.js'

const execFileAsync = promisify(execFile)
const AUTO_START_TASK_NAME = 'Whimbox Auto Start'

if (process.env.WHIMBOX_MAP_MASK_SMOKE === '1') {
app.setPath('userData', join(process.cwd(), '.map-mask-smoke-user-data'))
}

if (process.platform === 'win32') {
app.commandLine.appendSwitch('no-sandbox')
app.commandLine.appendSwitch('disable-gpu-sandbox')
Expand Down Expand Up @@ -267,6 +273,11 @@ makeAppWithSingleInstanceLock(async () => {
registerAppLogger()
registerLauncherIpc(window)
registerAppUpdater(window)
if (process.env.WHIMBOX_MAP_MASK_SMOKE === '1') {
void import('./services/map-mask-smoke')
.then(({ runMapMaskSmoke }) => runMapMaskSmoke({ waitForRpcConnected }))
.catch((error) => log.error('[map-mask-smoke] failed', error))
}
try {
await startAuthServer(window)
} catch (error) {
Expand All @@ -289,6 +300,7 @@ makeAppWithSingleInstanceLock(async () => {
app.on('before-quit', () => {
persistOverlayState()
persistVideoOverlayState()
persistMapMaskOverlayState()
unregisterVideoOverlayShortcuts()
primaryWindow = null
destroyTray()
Expand Down
Loading