Files
materialious/docs/BUILDING.md
T
2024-10-24 23:17:52 +13:00

3.1 KiB

Work in Progress

This documentation is currently under development and subject to updates.

Building

Web Deployment (via Docker)

Materialious supports web deployment through Docker.

Desktop Release (via GitHub Releases)

Materialious desktop builds are handled through GitHub using prod-desktop.yml.

  • First, the typical build steps are run: npm install and npm run build.
  • We utilize Capacitor with @capacitor-community/electron to integrate Electron into the project. The command npx cap sync @capacitor-community/electron is used to synchronize the latest build.
  • The patch_capacitor_plugin.py script removes the Capacitor-NodeJS plugin from the desktop build, as it's not required and currently has no better alternative.
  • From here, the process follows standard electron-builder steps to complete the build.

Desktop Release (via Flatpak)

Flatpak builds for desktop releases are managed via us.materailio.app.

  • We generate the necessary remote npm packages with flatpak-node-generator npm -r ../materialious/package-lock.json -R ../materialious/electron/package-lock.json, which creates generated-sources.json.
  • The Linux x64 runtime is downloaded as part of the Flatpak build sources and placed in main/materialious/electron/.electron-cache. The electron-builder.config.json is configured to use this cache directory to avoid downloading the runtime again during the build.
  • The build process is similar to prod-desktop.yml, following the guidelines for Flatpak Electron.

Android Release

Android builds are handled using the workflow prod-android.yml.