Electronite Local Development
How to make changes to Electronite while using a local development server.
Table of Contents
Windows, MacOS, or Linux
Prerequisites
-
Consider App Spin-up and Scripts.
Electronite Dev Viewer
- π‘ To create an Electronite viewer for use with your local dev build environment, run this script while online:
- Linux:
cd linux/scripts./build_viewer.bsh - Windows:
cd windows\\scripts.\build_viewer.ps1(use a powershell terminal) - MacOS:
cd macos/scripts./build_viewer.zsh
- Linux:
-
Read the βUseβ and βClient Developmentβ sections at the top of Scripts.
- π‘ When the server is running (the
runscript), start the Electronite viewer created by thebuild_viewerscript:- Linux:
cd linux/scripts./viewer.bshβ Dev Tools: Ctrl + Shift + Iβ - Windows:
cd windows\scripts.\viewer.batβ Dev Tools: Ctrl + Shift + Iβ - MacOS:
cd macos/scripts./viewer.zshβ Dev Tools: Cmd + Option + Iβ
- Linux:
Making dev changes to Electronite
Electronite is a drop-in replacement for electron that provides an enhanced font rendering system. Make your dev changes the same way as for an Electron viewer.
This project works in either a web browser or the Electronite viewer. Only add code to Electron/Electronite that are necessary for it to handle things that web browser already do (e.g., Print, Find, Zoom, Back, Forward). Avoid coding in such a way that prevents web browser use.
π‘ The way to develop in Electronite is to start by modifying sourcecode in the following location. The electron orechestrator is electronStartup.js.
βββ buildResources
βββ electron
βββ config
β βββ paths.js
βββ core
β βββ archiveUtil.js
β βββ downloadUtil.js
β βββ ports.js
β βββ server.js
β βββ startupErrors.js
β βββ window.js
βββ features
β βββ ffmpeg.js
β βββ firefox.js
β βββ pdf.js
βββ electronStartup.js
βββ package.json
βββ preload.js
Deploying tested dev changes to Electronite
Test by re-running the build_viewer script. See Electronite Dev Viewer above. This will setup the Electron files above in the following location with app-specific variables configured.
βββ [linux | windows | macos]
βββ viewer
βββ project
βββ payload
βββ app
βββ electron
Test bundle_viewer.<bsh|ps1|zsh> by either building locally on Windows or MacOS or by pushing a branch, building via git hub actions, then testing the resulting installs.
Required packages are copied by script!
If packages required in Electron are changed or updated, it is not enough to address them in the repo root
package.jsonas applicable files from this repo copied into installs rather than being handled by a package manager. See additional info to make and test changes.
If a change needs to be made to favicon*.png, make those changes in the globalBuildResources directory. The same test instructions above apply.
Local Installer Build
See bundle_viewer. Before doing this, also consider To Generate Artifacts