深圳市光明建设发展集团网站,网站建设设计模板,wordpress社交模板,wordpress 字体库Cura是著名的3D打印切片和控制软件。新的版本采用Qt和Python进行了重构#xff0c;界面变化也非常大#xff0c;目前还在开发中#xff0c;运行问题还有不少。这里介绍如何从源代码进行Cura的编译#xff0c;可以抢先体验新版的界面设计和根据需要进行订制。这个把相关的脚…Cura是著名的3D打印切片和控制软件。新的版本采用Qt和Python进行了重构界面变化也非常大目前还在开发中运行问题还有不少。这里介绍如何从源代码进行Cura的编译可以抢先体验新版的界面设计和根据需要进行订制。这个把相关的脚本都集成到一起了。做了几个重要的改进基本可以成功运行了。主要的改进包括1、可以自动判断目录如没有自动创建如有则进行源码更新。原脚本安装后更新需要手工一步步进行很麻烦。2、改变gtest的安装源到github原来的是从google下载由于国内访问不到会导致编译出错。3、合并 plugins目录将Uranium\plugins复制到Cura\plugins下避免找不到插件的错误。注意1、进libArcus将Cmakelists.txt里的add_subdirectory(examples)这一行注释掉要不编译不过去。2、目前CuraEngine编译还有些问题无法执行切片操作。把下面的内容保存到cura.sh然后sudo chmod x cura.sh添加执行权限然后./cura.sh就Ok了。需要的软件会自动下时间较长需要耐心等待。#!/bin/bash# This is a script which get the latest git repo and build them.## Tested under ubuntu 15.04, lower versions dont have PyQT 5.2.1 which is required by curacd ~if [ ! -d dev ]; thenmkdir devficd devsudo apt-get install -y git cmake cmake-gui autoconf libtool python3-setuptools curl python3-pyqt5.* python3-numpy qml-module-qtquick-controls#protobuf.#https://github.com/google/protobuf.gitecho echo Install Protobuf.if [ ! -d protobuf ]; thengit clone https://github.com/Ultimaker/protobuf.gitcd protobufelsecd protobufgit pullfiecho echo get gtest.if [ ! -d gtest ]; thengit clone https://github.com/kgcd/gtest.gitelsegit pullfiecho echo get gmock.if [ ! -d gmock ]; thengit clone https://github.com/krzysztof-jusiak/gmock.gitelsegit pullfiecho Build Protobuf../autogen.sh./configure --prefix/usrmake -j4sudo make installsudo ldconfigcd pythonpython3 setup.py buildsudo python3 setup.py installcd ../..echo echo Install libArcus.if [ ! -d libArcus ]; thengit clone https://github.com/Ultimaker/libArcuscd libArcuselsecd libArcusgit pullfiif [ ! -d build ]; thenmkdir buildficd build#cmake .. -DCMAKE_INSTALL_PREFIX/usr -DPYTHON_SITE_PACKAGES_DIR/usr/lib/python3.4/dist-packagescmake .. -DPYTHON_SITE_PACKAGES_DIR/usr/lib/python3.4/dist-packagesmake -j4sudo make installcd ../../echo echo Install CuraEngine.if [ ! -d CuraEngine ]; thengit clone https://github.com/Ultimaker/CuraEngine.gitcd CuraEngineelsecd CuraEnginegit pullfiif [ ! -d build ]; thenmkdir buildficd build#cmake .. -DCMAKE_INSTALL_PREFIX/usrcmake ..make -j4sudo make installcd ../../echo echo Install Uranium.if [ ! -d Uranium ]; thengit clone https://github.com/Ultimaker/Uranium.gitcd Uraniumelsecd Uraniumgit pullfiif [ ! -d build ]; thenmkdir buildficd build#cmake .. -DCMAKE_INSTALL_PREFIX/usr -DPYTHON_SITE_PACKAGES_DIR/usr/lib/python3.4/dist-packages -DURANIUM_PLUGINS_DIR/usr/lib/python3.4/dist-packagescmake .. -DPYTHON_SITE_PACKAGES_DIR/usr/lib/python3.4/dist-packages -DURANIUM_PLUGINS_DIR/usr/lib/python3.4/dist-packagessudo make installcd ../..echo echo Install Cura.if [ ! -d Cura ]; thengit clone https://github.com/Ultimaker/Cura.gitcd Curaelsecd Curagit pullficd ..echo Build finished.echo echo Merge Resource into Cura/resources/cp -rv Uranium/resources/* Cura/resources/echo Merge Plugins into Cura/plugins/cp -rv Uranium/plugins/* Cura/plugins/echo Link:$PWD/CuraEngine/build/CuraEnginesudo ln -s $PWD/CuraEngine/build/CuraEngine /usr/bin/CuraEngineecho Starting Cura......cd Curapython3 cura_app.pyecho You need add to /etc/profile:export PYTHONPATH/usr/lib/python3/dist-packagesecho