Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 5.75 KB

README.md

File metadata and controls

76 lines (56 loc) · 5.75 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:

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:web: build OpenCOR's Web app;
  • clean: clean OpenCOR's environment;
  • dev: (build and) start OpenCOR and OpenCOR's Web app in development mode;
  • dev:web: (build and) 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;
  • libopencor: build OpenCOR's JavaScript interface to libOpenCOR's C++ bindings;
  • 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: (build and) start OpenCOR in production mode; and
  • start:web: (build and) start OpenCOR's Web app in production mode.

Notes:

  • To run or package OpenCOR, you first need to build OpenCOR's JavaScript interface to libOpenCOR's C++ bindings (using pnpm libopencor). From there, you can run (using either pnpm start or pnpm dev) or package (using pnpm package) OpenCOR.
  • OpenCOR does not, by default, work on Ubuntu 24.04 LTS and later (see here for more information), although it can be made to work by running the following command:
    sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
  • The URI scheme works fine when using the package-based version of OpenCOR. When it comes to the start-based and dev-based versions of OpenCOR, the URI scheme "works" as follows:
    • On Windows and Linux, it just does not work; and
    • On macOS, it only works when OpenCOR is already running.