Skip to content

Instantly share code, notes, and snippets.

@TheFeshy
Last active February 21, 2019 03:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheFeshy/6a47267495359e90627594a34c313b09 to your computer and use it in GitHub Desktop.
Save TheFeshy/6a47267495359e90627594a34c313b09 to your computer and use it in GitHub Desktop.
PKGBUILD files to run Makerbot Desktop in Archlinux (for version 3.9.1 anyway)

Makerware AUR files

What works

This is only what I could verify with my Replicator Mini; it may or may not work on your device

  • Connecting over USB and wifi (mostly; wifi connetion is lost while printing)
  • Updating firmware
  • Loading files and basic sizing/positioning
  • Printing

What doesn't work

  • Settings menu won't open; so default settings are all you get
  • conveyor.service sometimes fails to start if makerware is running (and may have to be reinstalled to make work again.)

How to install

Download PKGBUILD_BOOST to a folder, and rename it PKGBUILD. Run 'makepkg -sri' in that folder to install it. Next, download PKGBUILD and makerbot-desktop.install. Run 'makepkg -sri' in that folder to install it. Run 'sudo systemctl enable --start conveyor' to enable communication with the printer. Run 'makerware' to run the program itself.

Other issues

It'd be nice if there was a way to not have to install outdated boost libraries in /usr/lib, but at least only the versioned libraries are installed so you can't accidentaly call them.

Makerware is linked against a very old copy of jsoncpp, and for now this old version is located in /usr/bin. This will conflict with any other software you have that uses jsoncpp that expect a newer version. It'd be nice to clean that up some day.

Why don't you put this on the AUR?

Because the settings menu doesn't work, and that's a major issue. If you want to get that working and post it, be my guest! But for now, it's printing, which is just enough to keep my kids entertained.

post_remove() {
update-mime-database /usr/share/mime
update-desktop-database -q
gtk-update-icon-cache
[[ -z $2 ]] && echo -e "Stopping conveyor.service"
[[ -z $2 ]] && echo -e "Disabling conveyor.service"
systemctl stop conveyor 2>/dev/null
systemctl disable conveyor 2>/dev/null
[[ -z $2 ]] && echo -e "Removing user 'conveyor'"
userdel -r conveyor >/dev/null 2>/dev/null
[[ -z "$2" ]] && echo -e "Restoring /run/lock's permissions"
chmod g-w /run/lock
true
}
post_install() {
## Reuse post_remove code
post_remove "null" "null"
## Create conveyor user
echo -e "\nAdding user: conveyor"
if ! getent passwd conveyor >/dev/null; then
useradd --system \
-M -d /dev/null \
--shell /bin/false conveyor
gpasswd -a conveyor lp
gpasswd -a conveyor uucp
fi
# Create and set permissions for /var/run/conveyor
mkdir -p -m 3777 /var/run/conveyor
chmod g+s /var/run/conveyor
#chgrp conveyor /var/run/conveyor
chown -R conveyor:conveyor /var/run/conveyor
# Set proper permissions for any existing lock files
#chgrp conveyor /var/run/conveyor/* >/dev/null 2>&1 || true
#chown conveyor /var/run/conveyor/* >/dev/null 2>&1 || true
chmod 0644 /var/run/conveyor/* >/dev/null 2>&1 || true
# Create and set permissions for /var/log/conveyor
mkdir -p -m 3777 /var/log/conveyor
chmod g+w /var/log/conveyor
#chgrp conveyor /var/log/conveyor
# Set proper permissions for any existing log files
#chgrp conveyor /var/log/conveyor/* >/dev/null 2>&1 || true
#chown conveyor /var/log/conveyor/* >/dev/null 2>&1 || true
chown -R conveyor:conveyor /var/log/conveyor
chmod 0664 /var/log/conveyor/* >/dev/null 2>&1 || true
echo -e "Changing /run/lock's permissions. Setting g+w"
chmod g+w /run/lock
# gpasswd -a conveyor root
#chown conveyor /var/log/conveyor/conveyord.log
## Enable and start conveyor service
echo -e "Enable and start conveyor.service to be able to connect to printer\n #systemctl enable conveyor.service && systemctl start conveyor.service"
}
post_upgrade() {
#touch /var/log/conveyor/conveyord.log
#chown conveyor /var/log/conveyor/conveyord.log
echo -e "Please restart conveyor.service with\n #~ systemctl restart conveyor.service"
}
# Maintainer: Francisco Martinez <zomernifalt at gmail dot com>
pkgname=makerbot-desktop
pkgver=3.9.1
_openmeshver=3.2_3.2
pkgrel=2
pkgdesc="A complete, free 3D printing solution for discovering, managing, and sharing your 3D
prints."
arch=('x86_64')
url="https://www.makerbot.com/desktop"
license=('GPL')
depends=('boost-for-makerbot' 'glibc>=2.4' 'hicolor-icon-theme' 'dbus>=1.0.2' 'libgl' 'qt5-base>=5.3.0' 'qt5-webkit>=5.0.2' 'zenity' 'zlib>=1.1.4' 'python>=3.4' 'python-jsonschema')
conflicts=('jsoncpp')
options=('!strip')
install="$pkgname.install"
_fakeubunturelease=16.04
_baseurl="http://downloads.makerbot.com/makerware/ubuntu/pool/main"
_arch="amd64"
md5sums=(
'6aec60dd4a7a3a20857d575e841002ff'
'9a39a730e4c5d31f87f5710ddbc0e644'
'59ea097b7deec6d352a057df4baf894d'
'b4fd76e23628fcbc301e27d969600ce9'
'7a56fc6629bccb944873ad2fc191286e'
'2f202ee0f369b8967aa0f7b749058b63'
'7fd2512a4dd14641f3613810da79981b'
'c992b06dd6f7cb648ba437ee4740385e'
'79c46c1e65ce4bc5e61ecc7913409c0b'
'419ba461b954743cbadc79bac1245113'
'74175f5415e6be6fb26725fb1d02c07c'
'fb5ed20c75174e7de3b620ce86f746bc'
'214aba4e8e0a36e1dbfceab48d1ee735'
'be31f512661788e893d17a7e5b983e16'
'e3c45d0ceda92580576f774540982837'
'30cfca0bae8324016a51b781e01afba4'
'7b4f4562ce814dcfa51b319c075c16fd'
'03ef90d770466e51857010e477d66419')
source=(
"$_baseurl/m/makerware/makerware_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/conveyor_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/conveyor-common_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/conveyor-ui_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/libmbqtutils_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/libthing_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/libtinything_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/libtoolpathviz_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/mb-fopenhack_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/mb-libjsonrpc_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/mbacceleration_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/sliceconfig_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/o/openmesh/libopenmesh-${_openmeshver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/mb-pyserial_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/makerbot-driver_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/libdigitizer_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/miracle-grue_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"$_baseurl/m/makerware/mb-libjsoncpp_${pkgver}-${_fakeubunturelease}_${_arch}.deb")
noextract=(
"makerware_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"conveyor_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"conveyor-ui_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"conveyor-common_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"libmbqtutils_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"libthing_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"libtinything_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"libtoolpathviz_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"mb-libjsoncpp_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"mb-fopenhack_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"mb-libjsonrpc_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"mbacceleration_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"sliceconfig_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"libopenmesh-${_openmeshver}-${_fakeubunturelease}_${_arch}.deb"
"mb-pyserial_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"makerbot-driver_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"libdigitizer_${pkgver}-${_fakeubunturelease}_${_arch}.deb"
"miracle-grue_${pkgver}-${_fakeubunturelease}_${_arch}.deb")
install="$pkgname.install"
package() {
cd ${pkgdir}
msg2 "Extracting DEBs"
for file in $srcdir/*.deb; do ar p $file data.tar.xz | tar -xJ; done
msg2 "Using modified .desktop file to avoid attempting to call python3.4 directly"
sed -i 's/$SCRIPTDIR/env PATH=\/usr\/lib\/makerbot:$PATH $SCRIPTDIR/' usr/bin/makerware
msg2 "Moving files around"
mv lib/udev/ usr/lib/
rm -r lib
msg2 "Creating link to python3 to avoid an explicit dependence on pyhton 3.4"
ln -s /usr/bin/python3 usr/lib/makerbot/python3.4
}
# $Id$
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Kritoke <kritoke@gamebox.net>
# Contributor: Luca Roccia <little_rock@users.sourceforge.net>
pkgbase=boost
pkgname=('boost-for-makerbot')
pkgver=1.58.0
_boostver=${pkgver//./_}
pkgrel=2
url='http://www.boost.org/'
arch=('x86_64')
license=('custom')
conflicts=('boost-libs=1.58.0')
makedepends=('icu>=55.1' 'python>=3.5' 'python<3.6' 'python2' 'bzip2' 'zlib' 'openmpi')
source=(https://downloads.sourceforge.net/project/${pkgbase}/${pkgbase}/${pkgver}/${pkgbase}_${_boostver}.tar.bz2)
sha1sums=('2fc96c1651ac6fe9859b678b165bd78dc211e881')
build() {
export _stagedir="${srcdir}/stagedir"
local JOBS="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
cd ${pkgbase}_${_boostver}
./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python2 --with-libraries=program_options,filesystem,system,serialization,date_time,log
_bindir="bin.linuxx86"
[[ "${CARCH}" = "x86_64" ]] && _bindir="bin.linuxx86_64"
install -Dm755 tools/build/src/engine/$_bindir/b2 "${_stagedir}"/bin/b2
# Add an extra python version. This does not replace anything and python 2.x
# need to be the default.
echo "using python : 3.5 : /usr/bin/python3 : /usr/include/python3.5m : /usr/lib ;" \
>> project-config.jam
# Support for OpenMPI
echo "using mpi ;" >> project-config.jam
# boostbook is needed by quickbook
install -dm755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --layout=tagged will add the "-mt" suffix for multithreaded libraries
# and installs includes in /usr/include/boost.
# --layout=system no longer adds the -mt suffix for multi-threaded libs.
# install to ${_stagedir} in preparation for split packaging
"${_stagedir}"/bin/b2 \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared \
toolset=gcc \
python=3.5 \
cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
linkflags="${LDFLAGS}" \
--layout=system \
--prefix="${_stagedir}" \
${JOBS} \
install
}
package_boost-for-makerbot() {
pkgdesc='Free peer-reviewed portable C++ source libraries - runtime libraries'
depends=('bzip2' 'zlib' 'icu')
optdepends=('openmpi: for mpi support')
install -dm755 "${pkgdir}"/usr
cp -a "${_stagedir}"/lib "${pkgdir}"/usr
# We don't want any links with generic names, or else we will conflict with later versions
rm "${pkgdir}"/usr/lib/*.so
install -Dm644 "${srcdir}/"${pkgbase}_${_boostver}/LICENSE_1_0.txt \
"${pkgdir}"/usr/share/licenses/boost-for-makerbot/LICENSE_1_0.txt
}
@TheFeshy
Copy link
Author

Unfortunately I had to create a package for the old boost version as well - simply symlinking to the newer version worked for all programs except magic_grue, which segfaulted. I guess boost doesn't semver.

@d3jawu
Copy link

d3jawu commented Oct 4, 2016

Can confirm that this method works as described (had to remove cmake which also depends on jsoncpp.)

Do we know exactly what stops the settings menu from coming up? I can poke around at that and see if I can find anything.

@loffa
Copy link

loffa commented Nov 3, 2016

Hey,
I used this to build the program today and it worked, except for the settings-menu.

I was able to get some information in the log-file when I clicked the setting menu which is included here:

obj/src/util/slicelib.cpp:205: info
void SliceLibProcess::Private::start()
Thu Nov 3 09:12:35 2016
calling sliceconfig:
get_profile
-d (machine id):
replicator2x
-r (user print settings):
{
"extruders" : [ 1 ],
"quality" : 1
}

obj/src/util/slicelib.cpp:205: info
void SliceLibProcess::Private::start()
Thu Nov 3 09:12:35 2016
calling sliceconfig:
get_profile
-d (machine id):
replicator2x
-r (user print settings):
{
"extruders" : [ 1 ],
"quality" : 1
}

obj/src/view/editorwindow/editorwindow.cpp:1019: error
void EditorWindow::showSliceSettingsDialog()
Thu Nov 3 09:12:35 2016
ProfileListModel::profileAt() failed

Hope this helps. I will also try to dig a bit in why this happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment