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
2 changes: 1 addition & 1 deletion THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ distributed by their own registries, not redistributed inside our binaries.

- **Components**: `selfie_segmentation.tflite`,
`selfie_segmentation_landscape.tflite` and the `selfie_segmentation_landscape.onnx`
derived from them, shipped inside `app.asar` under `dist/mediapipe/`.
derived from them, shipped under `resources/mediapipe/`.
- **License**: Apache-2.0 — <https://google.github.io/mediapipe/solutions/selfie_segmentation>.
Copyright The MediaPipe Authors.
- The `.onnx` is a **derived work**, generated from the vendored `.tflite` by
Expand Down
30 changes: 28 additions & 2 deletions electron-builder.json5
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,23 @@
// needs a system libvips we don't provide and breaks on CI/local ("vips-cpp.42 not found"), so we
// let electron-builder use the prebuilt instead of recompiling.
"buildDependenciesFromSource": false,
"compression": "normal",
"compression": "maximum",
// Strip unused Chromium locale pak files (saves ~20 MB). Only package locales supported by OpenScreen.
"electronLanguages": [
"en-US",
"fr",
"ar",
"es",
"it",
"ja",
"ko",
"pt-BR",
"ru",
"tr",
"vi",
"zh-CN",
"zh-TW"
],
"directories": {
"output": "release/${version}",
// Electron-builder's default, spelled out because the appx target depends on it:
Expand All @@ -72,6 +88,16 @@
"files": [
"dist",
"dist-electron",
// Exclude documentation assets that Vite copied from public/ (saves ~8 MB)
"!dist/demo.gif",
"!dist/preview*.png",
// Exclude assets already bundled into extraResources (saves ~17 MB duplicate in asar)
"!dist/wallpapers/**",
"!dist/cursors/**",
"!dist/mediapipe/**",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
// Exclude dead-weight node_modules: all frontend and electron code is pre-bundled by Vite (saves ~238 MB)
"!node_modules/**",
"!**/node_modules/**",
"!*.png",
"!preview*.png",
"!*.md",
Expand Down Expand Up @@ -369,7 +395,7 @@
// in the app spawns. Shipping it added a large binary to every Windows
// installer, plus an LGPL redistribution obligation, for a file no
// shipped code opens.
"filter": ["win32-*/*", "!win32-*/ffmpeg.exe"]
"filter": ["win32-*/*", "!win32-*/ffmpeg.exe", "!win32-*/ffmpeg-shared.exe"]
}
],
// The D3D11 compositor addon deliberately does NOT travel through `files` into
Expand Down
5 changes: 5 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
// HUD/tray/menu. Parsed before any GUI side effects; see electron/cli/.
const cliCommand = parseCliArgs(process.argv, app.isPackaged ? 1 : 2);

// Optimize V8 heap allocation to reduce memory footprint across renderer processes.
// Note: app.commandLine.appendSwitch('js-flags') does not affect the main process V8 isolate,
// which is already initialized before main.ts executes.
app.commandLine.appendSwitch("js-flags", "--optimize-for-size");
Comment thread
coderabbitai[bot] marked this conversation as resolved.

// Use Screen & System Audio Recording permissions instead of the CoreAudio Tap API on macOS.
// Tap needs NSAudioCaptureUsageDescription in the parent app's Info.plist, which breaks when
// running from a terminal/IDE during dev.
Expand Down