Skip to content

Getting Started

Joey de l'Arago edited this page Feb 20, 2023 · 9 revisions

The instructions on this page will get you started developing Cura.

Cura Setup

This section covers developing Cura. We advise using Pycharm, we have preset run configurations that will make getting started easier.

  1. First install the build requirements listed here.
    1. You only have to install these build requirements. All dependencies will be handled by Conan.
  2. Then configure Conan
    1. This step only needs to be done once for Cura/Uranium/CuraEngine. Unless you clear your conan cache.
  3. Then clone Cura.
    1. If you plan to work with Uranium and CuraEngine clone them all in the same root folder.
  4. Now run conan install
    1. This will install all dependencies required for Cura including CuraEngine, Uranium. This will take a long time on the first run.
    2. We advise using the -g PyCharmRunEnv argument here to get the Pycharm run configurations.

If you are using Pycharm you are ready to go, otherwise you must activate the virtual environment each time you would like to start development and run cura from the command line.

Gif of Cura starting

You can now make changes to you Cura project and test them by running Cura.

Troubleshooting Conan

Here are some tips if you run into issues with conan.

  • Make sure you have the correct conan version installed. You can check this with conan --version.
    • Try to force installing the correct version pip install --force-reinstall -v "conan==X.XX.X". Where X.XX.X is the version specified in the requirements
  • Try deleting your local conan cache. You can do this with conan remove "*" -f
  • Do not run conan install using sudo. This will mess up the permissions in your cache.
    • If you have installed using sudo, delete your cache.
  • Make sure you are not using our internal repository remotes.
    • conan remote remove cura

Developing Uranium in Parallel to Cura

This section covers developing Cura and Uranium simultaneously.

  1. First install the build requirements listed here.
    1. If you have done this for Cura you should have all of the requirements already.
  2. Then clone Uranium.

Before you can run Cura using your development version of Uranium you must put Uranium into editable mode. Conan stores local copies of all dependencies in ~/.conan. Editable mode links the Uranium dependency in ~/.conan/data/uranium/... to the development copy we cloned in step 2.

  1. Inside your Uranium folder add conan as editable
    1. What you fill in here does not matter for local development.
    2. Example: conan editable add . uranium/5.4.0@jeff/testing
  2. Inside your Cura folder run conan install again with this flag --require-override=uranium/<version>@<username>/<channel>
    1. Example: conan install . --build=missing --update -o cura:devtools=True -g VirtualPythonEnv -g PyCharmRunEnv --require-override=uranium/5.4.0@jeff/testing
    2. Store this command somewhere, you will need to use this everytime you run conan install on Cura.

To test if this worked, delete Uranium/UM/Application.py. Cura should fail to start because this file is missing.

Pycharm Setup

We advise using Pycharm to develop Cura and Uranium in parallel. It offers excellent support for multi repository projects.

  1. With the Cura Project open, navigate to File > Open.
  2. Click Attach on the popup Dialog
  3. Now you should have both Cura and Uranium open in the same window.

  1. Using the built-in git plugin, you can create branches for both projects simultaniously

Clone this wiki locally