Building Companion Binaries
The Companion repo allows you to build a distributable binary from sources by running
yarn dist
You can also cross-build for a specific platform using one of the following:
- Desktop Linux:
yarn lindist - Raspberry Pi:
yarn rpidist - Windows:
yarn windist - macOS intel:
yarn macdist - macOS Apple silicon:
yarn macarmdist
The build will be added to a sub-directory of electron-output/ named xxx-unpacked. For example electron-output/linux-unpacked or electron-output/win-unpacked.
There you will find a binary to run a Headed build (a system with a monitor, keyboard, and mouse). On Windows it is named Companion.exe on linux it is named companion-launcher
Windows builds also include an installer program named companion-win64.exe in electron-output/ (not electron-ouptut/win-unpacked!), which can be distributed independently of the "unpacked" contents.
Linux builds include a shell script to run headless named companion_headless.sh
You can also start a "headless" run manually by running main.js from xxx-unpacked/resources, more specifically:
./node-runtimes/main/bin/node main.js
To build Windows distributables from Linux systems (even WSL) you must install Wine first:
sudo apt install wine
sudo bash -c “dpkg --add-architecture i386 && apt-get update && apt-get install wine32:i386”
note: if your wine config gets corrupted, delete ~/.wine.
It is not recommended to run Companion on a Raspberry Pi with the desktop environment installed.