Skip to content

Developer documentation

Nicolas Pavie edited this page Dec 1, 2022 · 15 revisions

Developer documentation

Prerequisites

Steps to run the code

  • Check out this repository
  • Copy the Pipeline
    • Get a build of the DAISY Pipeline, with the web service enabled
    • Copy the DAISY Pipeline build into src/resources as daisy-pipeline so you have src/resources/daisy-pipeline/bin, src/resources/daisy-pipeline/cli, etc.
  • Run yarn to install dependencies
  • Run yarn dev to run the app in development mode

Steps to build and sign the code

Mac

  • Configure your machine for code signing and notarizing
    • Get credentials (e.g. signing certificate)
    • Create a file called .env in the root with this information:
APPLE_ID=*******
APPLE_ID_PASS=*********
APPLE_ID_TEAM=********
  • Build the distributable
    • yarn dist --mac
    • This creates a dmg file, signs the code, and notarizes the app.

Windows

As this project relies on electron-builder, it should be possible for anyone wanting to sign the executable to follow the electorn-builder documentation regarding code signing.

Note that this process has not been investigated yet by the development team, as a separate signing process is currently used after the project release build process.

Building a release

To build the windows version of the application, you will need a copy of the DAISY Pipeline 2 with

  • webservice capabilites enabled
  • embedded windows-compatible java runtime environment.

Please check the pipeline assembly to build this copy.

Put the DAISY pipeline 2 folder (the daisy-pipeline folder of your copy) in the src/resources directory, then build the release version of the application with the following command line : yarn dist --win.

The command should produce:

  • An installer executable (ending by Setup <version>.exe)
  • A portable version of the app provided as an executable,
  • A zipped version of the application,
  • An win-unpacked folder with the release version of the application.

Structure & concepts

This project was created from this electron template.

It starts the Pipeline engine upon startup, and interacts with it via the Pipeline's web service.

There is one main window, consisting of a tabbed job management interface, and one settings window.

The Pipeline engine is instructed to use an APPDATA directory for its data directory, and then the job results are copied by the Pipeline UI to a directory that the user sets in Settings.

Ideas for future versions

UX

  • Users should be able to drag and drop files to filter suggested scripts.

  • Users should have a fast way to edit and re-run a recent job.

  • After a user starts filling out a new job form, if they close the tab, they should get a warning.

  • If a user has entered an invalid form value, including pointing to the wrong file type, they should get a validation warning.

  • Some scripts require support for inputs and options with multiple values (sorted and unsorted). Currently only single values are supported.

Refactoring

  • Introduce Redux
    • Web service calls are currently part of the renderer code (see MainView) but could move to the main process instead

Testing

Clone this wiki locally