This example shows how to use Electron to distribute your Excalibur game to Mac, Linux, and PC desktops!
If you need access to the dev tools comment out remove menu, and uncomment the dev tools
// Remove menu
mainWindow.removeMenu();
// Open the DevTools.
// mainWindow.webContents.openDevTools();
# Install dependencies
npm install
# Run locally
npm start
# Package for distribution (run as administrator)
npm run build
-
Windows
npm run test:update-snapshot
-
Linux for CI
docker run --rm --network host -v C:\projects\template-electron:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.41.2-jammy /bin/bash npm install xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:update-snapshot
The game files are compiled via TypeScript in the src folder. You could easily use a bundler like parcel to bundle Excalibur and your game into one file.