Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 4.38 KB

README.md

File metadata and controls

66 lines (48 loc) · 4.38 KB

OpenCOR

OpenCOR is a frontend to libOpenCOR, a library that can be used to organise, edit, simulate, and analyse CellML files.

There are two versions of OpenCOR:

  1. OpenCOR: a desktop application that can be run on Windows, Linux, and macOS on Intel/ARM; and
  2. OpenCOR's Web app: a Web app that can be run using a Web browser.

The main difference between the two versions is that models in OpenCOR are, by default, compiled while they can only be interpreted in OpenCOR's Web app.

Prerequisites

To build OpenCOR and OpenCOR's Web app, you need to install node.js and npm, which you can do from here. Then, you need to install pnpm:

npm -g install pnpm

To build OpenCOR, you also need a C/C++ toolchain:

Notes:

  • Yes, OpenCOR for Windows on ARM can only be built using Visual Studio Community 2019 (this is because we must use MSVC v142; see here for more information).
  • On Ubuntu, you need to install the patchelf package so that OpenCOR can be properly packaged.
  • On Ubuntu on ARM, you need to install the libopenjp2-tools package so that electron-builder can get access to opj_decompress.
  • On Ubuntu 24.04 LTS, you need to deactivate restrictions using sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 (see here for more information).

Scripts

Before doing anything, you need to install all of OpenCOR's dependencies:

pnpm install

Then, you can run a given script:

pnpm <script>

where <script> is one of the following:

  • build: build OpenCOR;
  • build:libopencor: build OpenCOR's JavaScript interface to the C++ bindings of libOpenCOR;
  • build:web: build OpenCOR's Web app;
  • clean: clean OpenCOR's environment;
  • dev: start OpenCOR and OpenCOR's Web app in development mode;
  • dev:web: start OpenCOR's Web app in development mode;
  • format: format OpenCOR's code and OpenCOR's Web app's code;
  • format:check: check that OpenCOR's code and OpenCOR's Web app's code are properly formatted;
  • lint: lint OpenCOR's code and OpenCOR's Web app's code;
  • package: (build and) package OpenCOR for the current platform;
  • publish:web: publish OpenCOR's Web app on npm;
  • start: start OpenCOR in production mode; and
  • start:web: start OpenCOR's Web app in production mode.