Skip to content

Building CuraEngine From Source

Jesse Wood edited this page Oct 5, 2022 · 19 revisions

Note:
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. At the moment not everything is fully ported yet, so bear with us.

System Requirements

Windows

  • Python 3.6 or higher
  • Ninja 1.10 or higher
  • VS2022 or higher
  • CMake 3.23 or higher
  • nmake

MacOs

  • Python 3.6 or higher
  • Ninja 1.10 or higher
  • apply clang 11 or higher
  • CMake 3.23 or higher
  • make

Linux

  • Python 3.6 or higher
  • Ninja 1.10 or higher
  • gcc 12 or higher
  • CMake 3.23 or higher
  • make

Installation

We are using conan to manage our dependencies and build configuration. If you have never used Conan read their documentation which is quite extensive and well maintained.

1. Configure Conan

pip install conan --upgrade
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 cura

2. Clone CuraEngine

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

3. Install & Build CuraEngine (Release OR Debug)

Release

conan install . --build=missing --update
# optional for a specific version: conan install . curaengine/<version>@<user>/<channel> --build=missing --update
cmake --preset release
cmake --build --preset release

Debug

conan install . --build=missing --update -s build_type=Debug
cmake --preset debug
cmake --build --preset debug

4. Activate Conan Run Environment

# For Linux/MacOS
source build/generators/conanrun.sh
# For Windows (Powershell)
.\build\generators\conanrun.sh

Running

You can run CuraEngine using a frontend, such as Cura. It is also possible to run CuraEngine from the command line. For that you need a settings JSON file, which can be found in the Ultimaker/Cura repository.

Run CuraEngine help for a general description of how to use the CuraEngine tool.

Set the environment variable CURA_ENGINE_SEARCH_PATH to the appropriate paths, delimited by a colon e.g.

CURA_ENGINE_SEARCH_PATH=/path/to/Cura/resources/definitions:/user/defined/path