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:
- OpenCOR: a desktop application that can be run on Windows, Linux, and macOS on Intel/ARM; and
- 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.
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:
- Windows:
- Intel:
- Visual Studio Community 2019 (
Desktop development with C++
withMSVC v142 - VS 2019 C++ x64/x86 build tools
andWindows 10 SDK
); or - Visual Studio Community 2022 (
Desktop development with C++
withMSVC v143 - VS 2022 C++ x64/x86 build tools
andWindows 11 SDK
);
- Visual Studio Community 2019 (
- ARM:
- Visual Studio Community 2019 (
Desktop development with C++
withMSVC v142 - VS 2019 C++ ARM64 build tools
andWindows 10 SDK
);
- Visual Studio Community 2019 (
- Intel:
- Linux: G++ (
g++
package) on Ubuntu 22.04 LTS/Ubuntu 24.04 LTS; and - macOS: Xcode (including its Command Line Tools).
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 thatelectron-builder
can get access toopj_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).
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; andstart:web
: start OpenCOR's Web app in production mode.