mirror of
https://github.com/zadam/trilium.git
synced 2026-09-13 18:46:08 +05:00
The `start-prod`/`start-prod-no-dir` scripts invoked the npm prebuilt Electron binary directly (`electron dist`), which fails to load on NixOS because it's dynamically linked against FHS system libraries that don't exist there (libcups.so.2, libgtk-3, libnss3, ...). The dev launcher already handles this via electron-start.mts, but prod never did. Add scripts/electron-run-prod.mts, a build-free launcher that reuses the same NixOS-aware getElectronPath() (preferring the Nix/nix-develop Electron over the prebuilt binary) and sets LD_LIBRARY_PATH plus --no-sandbox on NixOS. On all other platforms it's a transparent `electron <args>` wrapper, so behaviour is unchanged. Also extract the shared getNixLdLibraryPath() helper so the dev and prod launchers stay DRY. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| icon-packs | ||
| icons | ||
| repo-migration | ||
| translation | ||
| analyze-perf.ts | ||
| build-utils.ts | ||
| check-version-consistency.ts | ||
| electron-rebuild.mts | ||
| electron-run-prod.mts | ||
| electron-start.mts | ||
| filter-tsc-output.mts | ||
| generate-openapi.ts | ||
| tsconfig.json | ||
| update-build-info.ts | ||
| update-contributors.ts | ||
| update-nightly-version.ts | ||
| update-version.ts | ||
| utils.mts | ||
| wipe-node-modules.mts | ||