Page MenuHomeAleph Objects Inc

Cura 2 Dev env setup notes
ActivePublic

Authored by nickthetait on Aug 16 2016, 9:53 AM.
This is a walkthrough on how to setup a development environment to allow making modifications to Cura 2. Hope you find it useful :)
Word of caution:
These instructions are written for Debian Jessie, other platforms will need slightly different steps. Additionally with how much development is happening at the moment this document will likely become out of date rapidly.
I have stored all repositories and dependencies inside a directory that will be referred to as <project-dir>
verify python3 is installed
python3
exit()
get QT5 (needed for uranium)
cd <project-dir>
mkdir QT && cd QT
mkdir install
download an "offline installer" from https://www.qt.io/download-open-source/#section-2
following instructions based on http://doc.qt.io/qt-5/gettingstarted.html & http://doc.qt.io/qt-5/linux.html
chmod u+x qt-file-name.run
./qt-file-name.run
skip logging in
pick empty "install" directory as where to install QT (created a few steps above)
(you can skip launching QT creator)
finish install process
get SIP (needed for PyQT5)
cd <project-dir>
sudo apt-get install libpython3-dev
mkdir SIP && cd SIP
download it https://riverbankcomputing.com/software/sip/download
tar -zxvf sip-4.18.tar.gz
cd sip-4.18
python3 configure.py
make
sudo make install
get PyQt5
cd <project-dir>
mkdir PyQT && cd PyQT
download from https://www.riverbankcomputing.com/software/pyqt/download5
tar -zxvf PyQt5_gpl-5.6.tar.gz
cd PyQt5_gpl-5.6/
following instructions based on http://pyqt.sourceforge.net/Docs/PyQt5/installation.html
sudo python3 configure.py --qmake <project-dir>/QT/install/5.6/gcc_64/bin/qmake
accept license
next step took over 30 minutes on my machine :O
sudo make
sudo make install
get Numpy (needed for Uranium)
sudo apt-get install python3-numpy
get Protobuf (needed for Arcus)
cd <project-dir>
mkdir Protobuf && cd Protobuf
download source code protobuf-3.0.0-beta-2.tar.gz from https://github.com/google/protobuf/releases
tar -zxvf protobuf-3.0.0-beta-2.tar.gz
cd protobuf-3.0.0-beta-2
sudo apt-get install autoconf
./autogen.sh
./configure
next step took about 10 minutes
make
sudo make install
get Arcus
cd <project-dir>
clone the repo as 'arcus'
sudo apt-get install libtool
cd arcus
mkdir build && cd build
cmake ..
export LD_LIBRARY_PATH=/usr/local/lib (as explained here https://groups.google.com/forum/#!topic/protobuf/PiMeN10AtOQ)
make
sudo make install
get Uranium
cd <project-dir>
clone the repo as 'uranium'
cd uranium
Not sure if anything needs to be done here
get CuraEngine
cd <project-dir>
clone repo as 'engine'
cd engine
mkdir build && cd build
cmake ..
make
get Cura2
cd <project-dir>
clone repo as 'user-interface'
sudo apt-get install python3-serial python3-scipy
sudo pip install numpy-stl
Add entries in PYTHONPATH to uranium and libarcus
for direct invocation at the command line use:
export PYTHONPATH=<project-dir>/arcus/build/:<project-dir>/uranium/
With a IDE set this as part of the project's run configuration
next step is workaround (for what?)
remove conflicting package 'sudo apt-get remove python3-sip'
Next step is to run Cura once to create a cura.cfg file
<project-dir>/user-interface/cura_app.py
close Cura
Link CuraEngine
add the following line to <cura-settings-location>/cura.cfg under the [backend] section
location = <project-dir>/engine/build/CuraEngine
Cura2 is all setup to run from source now so start making changes, GOGO!
<project-dir>/user-interface/cura_app.py

Event Timeline

nickthetait created this object with visibility "Public (No Login Required)".
nickthetait created this object with edit policy "nickthetait (Nicholas Tait)".
nickthetait edited the content of this paste. (Show Details)Aug 29 2016, 3:29 PM