Skip to content

ZIMkaRU/bfx-report-electron

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bfx-report-electron

Binaries

Already complied binaries can be found on release section release section

Download the correspondent binary according your operating system. Available the following binaries:

  • AppImages for the Linux
  • zipped DMG for the MacOS
  • NSIS installer for the Windows

I get some errors related to something called “FUSE”

AppImages require a Linux technology called Filesystem in Userspace (or short FUSE). The majority of systems ships with a working FUSE setup. However, sometimes, it doesn’t quite work. This section explains a few solutions that fix the most frequently reported problems.

Setup

Functionality has been tested on Ubuntu 22.04 LTS

Main Structure

To simplify setup/build/publish processes the following bash scripts are provided:

  • ./scripts/setup.sh - CLI as an easy way to get through the setup process. It will launch ./scripts/sync-repo.sh script and then setup the development environment
  • ./scripts/sync-repo.sh - CLI to fetch the last changes of the repository/sub-modules from the main remote repo
  • ./scripts/launch.sh - CLI to launch Docker Compose services to build releases and publish executable artifacts of the electron app with the last fetched changes

Additional bash scripts:

  • ./scripts/build-release.sh - CLI as the entrypoint to start the build release process, uses in the docker container, but can be used independently
  • ./scripts/build-ui.sh - CLI as the entrypoint to start the build UI process, uses in the docker container, but can be used independently
  • ./scripts/helpers - folder with addition bash functions
  • ./scripts/node - folder with addition NodeJS scripts

Requirements

The setup was tested with the following dependencies:

  • Docker version 24.0.6
  • Docker Compose version 2.21.0
  • git version 2.24.1

To install Docker/Docker Compose check the corresponding sections of the official docs:

  • install Docker
  • install Docker Compose Compose V2 is included with all currently supported versions of Docker Desktop
  • if you don’t want to preface the docker command with sudo, create a Unix group called docker and add users to it, check the doc

Setup electron app

After cloning the repository there's needed to configure the app. For it can be used ./scripts/setup.sh bash script. Available the following arguments:

./scripts/setup.sh -h

Usage: ./scripts/setup.sh [options] [-h]

Options:
  -r    Sync all repositories
  -o    Sync only sub-modules
  -s    Use staging BFX API
  -d    Set development environment
  -u    Turn off auto-update
  -h    Display help

Also there will be executed the following steps:

  • setup backend configs
  • install all backend dependencies
  • setup and build the UI static files

To launch ./scripts/setup.sh script also can be used the following NPM script:

npm run setup -- -r

Sync repo process

In case needs to fetch the last changes all repository/sub-modules might be used ./scripts/sync-repo.sh bash script. Available the following arguments:

./scripts/sync-repo.sh -h

Usage: ./scripts/sync-repo.sh [options] | [-h]

Options:
  -a    Sync all repositories
  -m    Sync bfx-report-electron only
  -w    Sync bfx-reports-framework only
  -u    Sync bfx-report-ui only
  -e    Sync bfx-report-express only
  -h    Display help

To launch ./scripts/sync-repo.sh script also can be used the following NPM script:

npm run sync-repo -- -wue

Launch Electron App for dev purpose

For Dev purpose to launch the Electron app locally might be used the following NPM script:

npm start

Also, there's available an option to debug the auto-update flow non-packaged build, in that case, just need to set the corresponding environment variable before running npm start:

export IS_AUTO_UPDATE_BEING_TESTED=true

Launch build process

For doing builds for other platforms please have Multi Platform Build in consideration

To launch Docker Compose services to build releases and publish executable artifacts of the electron app available the ./scripts/launch.sh bash script. Available the following arguments:

./scripts/launch.sh -h

Usage: ./scripts/launch.sh [options] [-h]

Options:
  -a    Build all releases
  -l    Build Linux release
  -w    Build Windows release
  -m    Build Mac release
  -r    Sync all repositories
  -o    Sync only sub-modules
  -s    Use staging BFX API
  -d    Set development environment
  -u    Turn off auto-update
  -p    Publish artifacts
  -h    Display help

It provides the following steps:

  • if the corresponding flag is added will be fetched the last changes repository/sub-modules
  • launch Docker container to build UI using ./scripts/build-ui.sh entrypoint, compiled UI files will be used in the build process of the Electron app
  • launch Docker containers for selected OSs (Linux, Windows, Mac) to build releases of the Electron app using ./scripts/build-release.sh entrypoint
  • if -p flag is passed and GH_TOKEN or GITHUB_TOKEN environment variable is set:
    • after the binary artifacts are successfully built
    • publish artifacts on the github releases page as a draft
    • after which they can be downloaded/tested and if everything is fine, press the buttons for editing and then publishing the release with the corresponding tag, check this Recommended GitHub Releases Workflow
  • without -p flag, artifacts will be in the ./dist folder

To launch ./scripts/launch.sh script also can be used the following NPM script:

npm run launch -- -aop

Also, we provide GitHub Actioins workflows configs for automated building and publishing of the Electron app artifacts using the above-described scripts ./scripts/launch.sh and ./scripts/build-release.sh, see the corresponding file .github/workflows/build-electron-app.yml

Locations of ElectronJS App files on different OSs

  • Logs:
    • Ubuntu: ~/.config/Bitfinex Report/logs
    • Windows: C:\Users\$username\AppData\Roaming\Bitfinex Report\logs
    • Mac: ElectronJS logs: ~/Library/Logs/Bitfinex Report and app logs ~/Library/Application Support/Bitfinex Report/logs
  • DB files db-sqlite_sync_m0.db, db-sqlite_sync_m0.db-shm (optional), db-sqlite_sync_m0.db-wal (optional):
    • Ubuntu: ~/.config/Bitfinex Report
    • Windows: C:\Users\$username\AppData\Roaming\Bitfinex Report
    • Mac: ~/Library/Application Support/Bitfinex Report

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 81.1%
  • Shell 12.2%
  • HTML 4.2%
  • CSS 2.5%