# Note: depends on cmake
# Note: depends on python-uranium
# Note: depends on git
# Note: depends on qtquickcontrols2 at runtime
git clone https://github.com/Ultimaker/Cura.git
cd Cura
git checkout a499a6bb66897e7a7b37cde13b8b8ccd6af98463
# Fix some bad defaults
sed -i -e '/addPreference("info\/send_slice_info"/s/True/False/' plugins/SliceInfoPlugin/SliceInfo.py
sed -i -e '/addPreference("info\/asked_send_slice_info"/s/False/True/' plugins/SliceInfoPlugin/SliceInfo.py
sed -i -e '/addPreference("general\/accepted_user_agreement"/s/False/True/' plugins/UserAgreement/UserAgreement.py
rm -rf plugins/FirmwareUpdateChecker
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
make
make install