Skip to content

Cura engine developer's guide

Ricky Zhang edited this page May 28, 2018 · 7 revisions

Disclaimer

I'm a lazy programmer. I hate typing unless it is necessary.

So I automate the build for you with fewest typing as possible. My Windows machine is for Video gaming. So I can only provide you how to build my repo in Linux and Mac.

Linux

You need to get cmake, gcc, git and all the build tools ready. I can't provide you a complete list. Just google the package name if you have trouble.

Because I enhance logging. You need to build G3LOG. This is a great stuff when shit happens. It saved me a lot of trouble when dealing with multi-thread.

But if you don't care logging, you can also avoid using this developer's log tool.

Here is the build step:

If you need debug flag with G3LOG, use

sh clean-build.sh debug

If you need optimized version with G3LOG, use

sh clean-build.sh 

If you need optimized version without G3LOG, use

sh clean-build.sh production

The script clean-build.sh will wipe out build folder. If you are doing incremental change and build incrementally, use

sh linux-refresh.sh

This will trigger make and replace Cura engine binary in Linux. Assuming you use my LegacyCura to build RPM, it will replace the right path to the Cura engine binary.

Mac

I used Macports to get all my tools available. You can also use alternative build tools.

The step is similar to Linux except in incremental build, you should use

sh mac-refresh.sh

This will trigger make and replace Cura engine binary in Mac OS X. Assuming you use my LegacyCura to build PKG, it will replace the right path to the Cura engine binary.

UI and engine in the form of releasing package

  1. Clone my git repo: https://github.com/rickyzhang82/LegacyCura
  2. run the following command according your OS.
    • If you are Fedora, ./package.sh fedora. It will generate RPM if you follow the instructin in README to setup all pre-requsite. I tested the script works under Fedora 28.

    • If you are Mac, ./packaage.sh darwin. It will generate PKG if you get all Python package installed properly. I tested the script works under Mac OS X 10.13.

Note that Cura engine from script is built from master branch of my git repo here.