BAR Lobby is a new WIP lobby for the RTS game Beyond All Reason. It hopes to boldly go where no Spring client has gone before, providing a more streamlined experience, with good visuals and UX being high priority. The ultimate goal of BAR Lobby is to replace all other lobbies when it comes to playing BAR. If a significant amount of people don't wish to use it because of reasons such as functionality or speed, then this project is going very wrong.
- Provide functionality for everything related to BAR. Campaigns, Missions, Multiplayer, Replays etc
- Simple and intutive codebase, lots of documenation for contributing
- Steam integration, automatic account creation and login
- Smooth, seemless, fully integrated downloads. Content should be preloaded when sensible
- Communicate entirely via Teiserver's new protocol, Tachyon. No support for the legacy SpringLobbyProtocol
- TLS only, no unencypted comms
It is highly recommended to use VSCode for development, as it provides full, built-in TypeScript support, as well as useful extensions such as ESLint and Vue - Official (previously Volar).
npm install
npm start
.
├──buildResources # used by electron-builder
├──src
│ ├──main
│ │ ├──main.ts
│ │ └──...
│ ├──preload
│ │ ├──preload.ts
│ │ └──...
│ └──renderer # with vue
│ ├──public # (optional) publicDir for renderer
│ ├──index.ts
│ ├──index.html
│ └──...
├──electron-builder.config.ts
├──electron.vite.config.ts
├──package.json
└──...
- Main process
- Runs in a Node.js environment and has access to Node.js APIs
- Anything requiring access to the operating system or Node.js APIs needs to live here
- Preload script
- Runs in a Node.js environment
- Defines global objects that can be used in the renderer
- Handles communication between the main and renderer processes
- Uses Electron's ipcMain and ipcRenderer modules for inter-process communication (IPC).
- Renderer process
- Runs in a web environment and has no direct access to Node.js APIs
electron-forge
- Builds the app with a pre-configured Vite setup for Electron apps
- This intentionally does not include
electron
or any othernode_modules
dependencies in the build- Dependencies get added to the package by
electron-builder
with ASAR - Note: apps that only have CJS exports need to be included in the build, e.g.
glob-promise
- Dependencies get added to the package by
electron-builder
- Packages Electron app for distribution
- Configured for Windows NSIS installer and Linux AppImage
- Handles publishing updates
- Auto-updates TBD
- Packages Electron app for distribution
npm start
- Runs
electron-forge
indevelopment
mode - renderer runs with Hot Module Replacement (HMR)
- main and preload are directly bundled to
.vite/build
- Runs
npm run package
- Runs
electron-forge
inproduction
mode - renderer us bundled to
.vite/renderer
- main and preload are bundled to
.vite/build
- Runs
npm run preview
- Runs
electron-forge
inproduction
mode, and runs electron - main, preload, and renderer are bundled to
.vite/build
- This is useful for validating the
production
build without packaging the app
- Runs
npm run build:win
- Runs
npm run build
andelectron-builder
, building for Windows - Outputs NSIS installer in
dist
- Runs
npm run build:linux
- Runs
npm run build
andelectron-builder
, building for Linux - Outputs AppImage executable in
dist
- Runs
npm run build:unpack
- Runs
npm run build
andelectron-builder
, building an unpackaged directory - Outputs the unpacked contents in
dist
- Useful for testing
- Runs
npm run dev-cert
(optional and only for Windows development)- Runs
electron-builder
to create a self-signed cert for Windows apps. - After selecting "None" in the pop-up, a cert file should be created called
BAR Team.pfx
- Then run
npm run build:win:dev-cert
to build a signed Windows installer
- Runs