Skip to content

Building And Developing

Jaime van Kessel edited this page Apr 12, 2023 · 2 revisions

We are currently in the process of switch our builds
and pipelines to an approach which uses Conan and
pip to manage our dependencies, which are stored
on our JFrog Artifactory server and in the pypi.org.

Not everything has been fully ported yet, so bare with us.

Related

If you want to develop Cura with Uranium see the Cura Wiki.

Conan is a Python program and can be installed using pip.
If you have never used it read their Documentation which
is quite extensive and well maintained.

System Requirements

  • CMake 3.20+
  • Conan 1.48+
  • Python 3.6+
  • Ninja 1.10+
  • venv

Badge Windows

Execution from the Powershell is preferred.

  • Visual Studio with MSVC 2019+

Badge Ubuntu   Badge Debian   Badge Arch   Badge Manjaro

  • autoreconf
  • glibc 2.28+
  • gcc-9+

Badge MacOS


M1 Mac users have to follow the build instructions using a Rossetta terminal.

It is recommended to install the dependencies with brew.

  • apple-clang-9.0+
  • xcode 11.4+
  • automake
  • altool

Building

Configuring Conan

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

Community developers would have to remove the
Conan Cura repository because it requires credentials.

Ultimaker developers need to request an
account for our JFrog Artifactory server at IT.

conan remote remove cura

Clone Uranium

git clone https://github.com/Ultimaker/Uranium.git
cd Uranium

Environment Initialization

Initializing the Virtual Python Development Environment.

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 .             \
    --build=missing         \
    -o cura:devtools=True   \
    -g VirtualPythonEnv

Running Tests

Linux / MacOS

source venv/bin/activate
cd tests
pytest

Windows

.\venv\Scripts\activate.ps1
cd tests
pytests

Developing Uranium
In Editable Mode

This is useful if you want to develop Cura but don't want to have to conan install after every change to Uranium. This will point Cura to your local copy of Uranium instead of the one in the .conan folder.

You can use your local development repository downsteam by adding it as an editable mode package, which also means that you can test it in a consuming project without creating a new package for this project every time.

conan editable add . \
    uranium/<version>@<username>/<channel>

Then in your downsteam project's ( Cura ) root directory
override the package with your editable mode package.

conan install .     \
    -build=missing  \
    --update        \
    --require-override=uranium/<version>@<username>/<channel>