-
Install bun from here.
-
Install a C/C++ toolchain:
- Windows:
- Intel:
- Visual Studio Community 2019 (
Desktop development with C++withMSVC v142 - VS 2019 C++ x64/x86 build toolsandWindows 10 SDK); or - Visual Studio Community 2022 (
Desktop development with C++withMSVC v143 - VS 2022 C++ x64/x86 build toolsandWindows 11 SDK);
- Visual Studio Community 2019 (
- ARM:
- Visual Studio Community 2019 (
Desktop development with C++withMSVC v142 - VS 2019 C++ ARM64 build toolsandWindows 10 SDK); Note: yes, only Visual Studio Community 2019 can be used. This is because we must useMSVC v142(see here for more information).
- 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).
- Windows:
-
Install additional dependencies:
- On Ubuntu on ARM, you need to install the
libopenjp2-toolspackage so thatelectron-buildercan get access toopj_decompress.
- On Ubuntu on ARM, you need to install the
-
Install OpenCOR's dependencies:
bun install
-
Start the development version of OpenCOR:
-
Desktop version:
bun dev
-
Web app version:
bun dev:web
-
-
Test OpenCOR:
- Desktop version: the application will open automatically; and
- Web app version: open your browser and navigate to the local development URL (typically http://localhost:5173).
| Script | Description |
|---|---|
archive:web |
Archive OpenCOR's Web app |
build |
Build OpenCOR |
build:web |
Build OpenCOR's Web app |
clean |
Clean OpenCOR's environment |
dependencies:update |
Update all dependencies to their latest versions |
dev |
(Build and) start OpenCOR and OpenCOR's Web app with hot reload |
dev:web |
(Build and) start OpenCOR's Web app with hot reload |
format |
Format the code |
format:check |
Check code formatting without making changes |
lint |
Lint and automatically fix issues |
release |
Release OpenCOR for the current platform |
release:local |
Release OpenCOR for the current platform without code signing |
start |
(Build and) start (the production version of) OpenCOR |
start:web |
(Build and) start (the production version of) OpenCOR's Web app |
version:new |
Update the version of 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
release-based version of OpenCOR. When it comes to thestart-based anddev-based versions, the URI scheme "works" as follows: