Skip to content

Running Cura from Source

j.spijker@ultimaker.com edited this page Jul 7, 2022 · 39 revisions

Running Cura from Source

Note: We're currently still in the process of updating our workflow how to run Cura from source. Although most of the workflow has been determined already, there are bound to be some changes along the way. If you run into any issues, please feel free to to open an issue on our Cura repository.

Process description and workflow

Note: Most notable changes compared to the previous workflow is the deprecation of cura-build and cura-build-environment.

Cura consists of a Python module in this repository and multiple other dependencies (C++, C++ Python bindings, Python modules) either owned by Ultimaker or third-parties. Ultimaker owned repositories which are party of Cura will be build or exported with a GitHub Action on a certain repository events, such as a push to a branch. These exported packages and/or binaries can then be used by other repositories when required. This workflow greatly reduces complexity, maintenance and build time. The figure below shows the sequence diagram for an individual repository.

push-build

C++ and C++ Python binding dependencies are now managed by Conan, while the Python modules are managed by Pip. Conan is the orchestrator for the complete installation and setting up the development environment. All dependencies are build, stored and used in such away that interaction and 'pollution' of the global system should be non-existing. Installing dependencies for Cura and initializing a Virtual Python environment should be as simple as executing a single command in the end.

System requirements

For the above workflow to actually work, the following system requirements must first be met.

Windows

  • Windows 10 or higher
  • Visual Studio with MSVC 2019 or higher
  • Python 3.6 or higher
  • CMake 3.20 or higher
  • Ninja 1.10 or higher
  • Conan 1.48 or higher

Executing from the Powershell is preferred. Make sure that the binaries for the system dependencies can be found on the PATH

macOS

  • macOS 10.15 or higher
  • apple-clang-9.0 or higher
  • Python 3.6 or higher
  • CMake 3.20 or higher
  • Ninja 1.10 or higher
  • Conan 1.48 or higher

Linux

  • Ubuntu/Debian/Arch/Manjaro (glibc 2.28 or higher)
  • gcc-9 or higher
  • Python 3.6 or higher
  • CMake 3.20 or higher
  • Ninja 1.10 or higher
  • Conan 1.48 or higher

Configuring Conan (All OSes)

pip install conan --upgrade
conan config install https://github.com/ultimaker/conan-config.git
conan profile new default --detect

Community developers would have to remove the Conan cura repository because that one requires credentials.

conan remote remove cura

Initializing a Virtual Python Development Environment (All OSes)

Note: The way we handle versions will probably change in the future. For now it has to be explicitly set.

Install the dependencies for the development environment and initialize a Virtual Python environment. Execute the following command in the root directory of the Cura repository.

conan install . cura/5.1.0-beta+1234 --build=missing --update -g VirtualPythonEnv

Use the Virtual Python Environment and run Cura from Source (All OSes)

Activate the virtual environment by executing the following command in the root directory of the Cura repository.

source venv/bin/activate

Then execute the following command to start Cura.

python cura_app.py
Clone this wiki locally